Hi everyone,
After moving to Ubuntu Budgie 26.04 and testing the pure Wayland (labwc / wlroots) session, I noticed a persistent geometry issue with my dual-monitor setup (laptop internal display + external HDMI monitor).
Even though the external monitor is configured as the primary display at the (0,0) coordinate, budgie-panel incorrectly calculates the available screen geometry during session startup. It clamps the panel width to the laptop’s native resolution (e.g. 1366px), leaving large, awkward gaps on both sides of a 1080p primary display.
Since standard dconf / gsettings overrides don’t bypass this initial geometry calculation issue in the current Wayland backend, I wrote a small workaround to handle it automatically at login.
Since shell scripting isn’t my primary strength, I drafted the logic and worked with Gemini to generate the specific wlr-randr / awk detection script, which I’ve thoroughly tested on my setup.
How It Works
The script:
-
Waits for the Wayland socket and
wlr-randrto become available. -
Dynamically identifies the connected outputs (
eDPandHDMI/DP). -
Temporarily turns off the internal laptop display (
--off). -
Runs
budgie-panel --replacewhile only the external display is active, forcing the panel to recalculate its geometry using the external display’s dimensions. -
Waits for the panel layout to settle, then restores the laptop display using its original refresh rate and position.
-
Exits cleanly if no external display is detected, leaving single-display laptop sessions untouched.
Prerequisites
Before proceeding, make sure that wlr-randr is installed on your system:
sudo apt update
sudo apt install wlr-randr
Quick Installation (Recommended)
I built an automated installer that detects the internal display’s current mode, including fractional refresh rates such as 60.012001 Hz, and its current position. It then configures both the fix script and the autostart entry automatically.
git clone https://github.com/kuscadev/budgie-wayland-panel-fix.git
cd budgie-wayland-panel-fix
chmod +x install.sh
./install.sh
Manual Setup
If you prefer to set it up manually:
1. Create the fix script (~/.local/bin/budgie-panel-fix.sh):
#!/usr/bin/env bash
set -euo pipefail
# Wait for Wayland/wlr-randr to become ready (5-second timeout)
for _ in {1..50}; do
if wlr-randr >/dev/null 2>&1; then
break
fi
sleep 0.1
done
# Detect outputs
INTERNAL_OUTPUT=$(wlr-randr | awk '/^eDP/ {print $1; exit}')
EXTERNAL_OUTPUT=$(wlr-randr | awk '/^(HDMI|DP)/ {print $1; exit}')
# Exit cleanly if no external display is connected
if [[ -z "${EXTERNAL_OUTPUT:-}" ]]; then
exit 0
fi
# Capture the internal display's current position and mode
POS=$(wlr-randr | awk -v out="$INTERNAL_OUTPUT" '
$1 == out {found=1}
found && /Position:/ {print $2; exit}
')
MODE=$(wlr-randr | awk -v out="$INTERNAL_OUTPUT" '
$1 == out {found=1}
found && /current/ {
print $1 "@" $3 "Hz"
exit
}
')
# Execute the layout workaround
wlr-randr --output "$INTERNAL_OUTPUT" --off
budgie-panel --replace &
# Give the panel time to recalculate its geometry
sleep 1.5
# Restore the internal display using its original mode and position
wlr-randr \
--output "$INTERNAL_OUTPUT" \
--on \
--mode "$MODE" \
--pos "$POS"
Make sure the script is executable:
chmod +x ~/.local/bin/budgie-panel-fix.sh
2. Configure autostart (~/.config/autostart/budgie-panel-fix.desktop):
[Desktop Entry]
Type=Application
Name=Budgie Panel Multi-Monitor Fix
Exec=/bin/bash -c "$HOME/.local/bin/budgie-panel-fix.sh"
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Source Code & Technical Deep Dive
-
GitHub Repository: GitHub - kuscadev/budgie-wayland-panel-fix · GitHub
-
Blog Post: Ubuntu Budgie 26.04 (Wayland): Multi-Monitor Panel Width Bug and Workaround
Your screen may flicker for a split second immediately after login while the internal display is temporarily disabled. Once the panel is restarted and the display layout is restored, the panel should snap to the correct edge-to-edge geometry on the primary monitor.
Hopefully, this helps anyone experiencing the same issue until proper multi-monitor geometry handling is implemented upstream.
