Static Multi-monitor setup - Desktop Scrambled at startups - xfce-pbw.sh makes it worse

Long time KDE user, new user of XFCE as my primary desktop. I really like XFCE, but I have one major hurdle, the desktop gets scrambled.

This is a desktop computer with multiple monitors, all the same, always connected, no hardware or software changes, other than normal pacman updates. When I reboot I expect the desktop to be the same every time and stable.

But on many start-up/reboots, my desktop becomes scrambled, icons repositioned, mouse confused. The only way I’ve found to get a working desktop is to go to a tty and

systemctl isolate multi-user.target
restore ~/.config/xfce4 from a good backup
systemctl isolate graphical.target

This situation also makes XFCE Display Profiles useless because XFCE sees the connected displays differently for some reason. As Simon’s Secret explains:

It is important to note that the list of available profiles is always filtered based on the currently connected displays. To be exact: this means that at least the currently connected displays need to be part of the profile definition for the profile to appear in the list.
New xfce4-settings release – Simon's Secret

I’m not sure why XFCE creates a new icons.screen0-RESOLUTION.rc file under ~/.config/xfce4/desktop so often. One case seems to be if the user changes the panel size, but that is not the case here.

In “XFCE Settings Manager” > “Session and Startup” > “Application Autostart”, there is an entry, “XFCE-Panel Workaround”, which is a shell script that executes

xfsettingsd --replace &

three times with a 5, 15, 25 second sleep in-between.

Unchecking this Application Autostart entry seems to have improved XFCE desktop’s stability, but not completely

Question
I don’t know the history of “XFCE-Panel Workaround”, but is it still needed?
It probably doesn’t hurt for single monitor environments. At least don’t make it Autostart by default.

In “Some issues related to "Respect physical display sizes" commit (#190) · Issues · Xfce / xfce4-settings · GitLab”, the author says,

“When I run xfsettingsd --replace multiple times, I don’t always have the same result, but can’t have a reproductible way for now.”

Perhaps since xfsettingsd is getting different informaiton, running it multiple times is multiplying the problem.

Question
Why are the monitor/output identifiers changing from boot to boot? This can be seen via xrandr. In a multi monitor setup, sometimes, especially for Display Port connections, a monitor number is skipped when no physical connection has changed?

The chain of events for the scrambled desktop might be:

  • Monitors change names
    • Orientation to each other, size, & dpi is done (by whom?)
      • xfsettingsd is getting a different screen layout each time
        and thinking the physical monitors have changed causing new resolution
        files (icons.screen0-RESOLUTION.rc), which affects the layout of icons
        (icon grid).

Question
I’m not sure what to do here. Is there a solution for static multi-monitor users and XFCE?
Is xorg.conf required for a stable XFCE desktop?

Versions:
xfcedesktop: 4.14.2
xfsettingsd: 4.14.3
kernel: 5.4.74

1 Like

This reply contains solutions.

I think this is the solution. In my environment, there is graphic support in the Intel processor and there is a pci video card. All the monitors are connected to the pci video card. Blacklisting i915 module in /etc/modprobe.d/99-no-i915.conf seems to have solved the monitor/output identifiers changing from boot to boot.

/etc/modprobe.d/99-no-i915.conf

blacklist i915

It seems that Xorg is not serializing the assignment of names to monitor/output identifiers between multiple video cards, therefore this is highly dependent on timing, and it really messed up XFCE xfsettingsd multiple monitor support.

I still wonder if the XFCE-Panel Workaround, xfce-pbw.sh, is required. I’ve kept it disabled.

New Issue/Solved
Lightdm has a problem without an xorg conf file defining the monitor positions, but I can live with this. I tried the archlinux solution of display-setup-script=xrandr…. The alternative solution of modifying /etc/lightdm/lightdm-gtk-greeter.conf worked.

The xorg.conf file is not necessary.

/etc/lightdm/lightdm-gtk-greeter.conf

[greeter]
active-monitor=HDMI-A-0

Replace 0 with the desired display number.

Although the archllinux solution says the above, the ‘0’ may also be the monitor/output identifier of the desired monitor.

1 Like

This issue is the only thing left outstanding.

A better way to disable i915 is to add module_blacklist=i915 to the kernel boot parameters in GRUB_CMDLINE_LINUX_DEFAULT found in /etc/default/grub.

The original solution became unstable after latest update.

2 Likes

I’m glad this bird pooped on someone more well versed in Linux first. Thank you for not only running this down, but for sharing your findings with the community.