2

I recently upgraded to Xubuntu 14.04 on my laptop. Prior to 14.04, I used xrandr (through a script) to configure my preferred layout, which involved an external VGA monitor and the built in laptop monitor. Prior to 14.04, when I closed the lid with that layout active, the layout remained the same (ie, the built-in monitor was off, but still present in the layout).

After upgrading to 14.04, my xrandr layout is retained only for as long as I don't close the lid on the laptop. After the lid is closed, the external monitor is reconfigured as the only display. After the lid is reopened, Xfce seems to restore whatever configuration I had set for the two monitors in the displays dialog prior to closing the lid. This is suboptimal for me, as I cannot make the monitors bottom-aligned through that dialog, which is why I'd prefer my xrandr layout be respected through lid closes.

A previous question suggests looking into ACPI configuration and removing lid close scripts there, but I seem to have no scripts that do anything with the lid in /etc/acpi. I also haven't been able to find anything to do with lid closes in /etc/udev. Xfce power manager is set to do nothing with lid closes, and that setting seems to be respected – if I set it to suspend, it suspends. The "Configure new displays when connected" checkbox in Xfce display settings is unchecked.

D__
  • 21
  • Perhaps the values for the lid in the "/etc/systemd/logind.conf" can help you. Or is there anything in the "/proc/acpi/" folder ? – TuKsn May 02 '14 at 09:29
  • logind.conf is set to ignore lid events entirely. I have /proc/acpi/ibm/video (I'm on a Thinkpad), which allows me to turn auto expansion of displays on or off, but regardless of what state I leave that setting in, the same thing happens when I close the lid. Not sure if that's a bug or intended behavior. – D__ May 02 '14 at 14:21
  • Did you change it with root permissions ? There are any options for the lid behavior in the BIOS-Settings ? – TuKsn May 02 '14 at 14:29
  • video requires root to cat or write to, so yes. catting video shows the auto option toggled as it was told to, but it has no tangible effect otherwise. BIOS setup has nothing about lids. – D__ May 03 '14 at 01:44
  • Perhaps this answers will help http://askubuntu.com/questions/15520/how-can-i-tell-ubuntu-to-do-nothing-when-i-close-my-laptop-lid If not you can report it as an bug if you want https://help.ubuntu.com/community/ReportingBugs. – TuKsn May 03 '14 at 08:52
  • Unfortunately, after some more exploration and skimming through xfsettingsd source code, it seems like this is a feature rather than a bug. I do suppose I could open a feature request somewhere (Xfce or Launchpad) for an option to suppress disabling of LVDS output on lid events. – D__ May 03 '14 at 14:07

1 Answers1

0

After many cycles over many weeks, today I solved the two external monitors being reconfigured incorrectly after screen unlock problem with xfce and other desktops:

Different monitors have different "start up" or "monitor boot" latency - in the order of a second, perhaps more with monitors I don't have.

This latency means that even using a keyboard combo to run own xrandr config (perhaps embedded in a script file), has often failed.

Tried using xrandr to first disable all outputs, then wait say 3 seconds. This did not work - it's the monitors "turning on" where this problem lies and my old (~7 years?) Intel i7-2640M with inbuilt "Intel HD Graphics 3000", presumably fails to maintain the desired display port output config for long enough for at least one of my (4K) external monitors to start up.

SOLUTION: run xrandr in 2 steps - first enable one external monitor only, then sleep 1s (I've tried 0.6s, but that was insufficient), then enable both monitors, e.g. like so (vary to suit your monitors of course):

xrandr --output LVDS1 --off --output DP1 --mode "3840x1080" --pos "0x580" --rate 60 --output DP2 --off                                                                                              
sleep 1s
xrandr --output LVDS1 --off --output DP1 --mode "3840x1080" --pos "0x580" --rate 60 --output DP2 --mode "3840x2160" --pos "3840x0"

Attach such a sequence (in a script) to your chosen keyboard shortcut, then after unlocking the screen (XFCE, KDE, whatever), use the shortcut to run this script.

Apparently same issue here (posted same answer there):

https://forum.xfce.org/viewtopic.php?pid=54610#p54610

zenaan
  • 111