Budgie Panel fails to expand to full width on Primary Monitor in Wayland (Labwc)

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-randr to become available.

  • Dynamically identifies the connected outputs (eDP and HDMI/DP).

  • Temporarily turns off the internal laptop display (--off).

  • Runs budgie-panel --replace while 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

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.

Thanks for digging in - very comprehensive.

I think this might actually be fixed in the very latest release available from upstream. If you are willing - please give it a test and feedback.

If it is indeed fixed - would you be willing to work with me to try some test installs narrowing down the actual fixes? I’m more than happy to backport to a stable 26.04 release.

To test, backup the folder ~/.config/budgie-desktop/labwc

Then add our test PPA

sudo add-apt-repository ppa:ubuntubudgie-dev/wayland-test
sudo apt full-upgrade
reboot --

You can rollback to the stable release

sudo ppa-purge ppa:ubuntubudgie-dev/wayland-test
reboot --

Then restore your backed up folder to ~/.config/budgie-desktop/labwc - followed by a logout and login.

Hi @fossfreedom.

Disabled my script, added the PPA, and rebooted. The new primary display selection behavior is active. As soon as the external monitor is designated as the Primary Display, budgie-panel immediately snaps to it and scales to the correct 1080p full width edge-to-edge without any geometry clamping issues.

Let me know if there’s anything else I can help with.

Cheers for confirming - I’ll look at the 10.10.2 to 10.10.3 changes to confirm which panel changes are needed to help resolve this. Will ping when I’ve got something for you to help test with. Thanks again.