Casey Bralla via plug on 9 Jan 2023 16:14:01 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Kludge Fix: Monitor Troubles Waking from Sleep


I filed a bug report on XFCE's display problem as Soren suggested.  In the meantime, I've come up with a horrible kludge of a fix.  It (mostly) works. 

I wrote a batch file: resetmonitors.sh that resets the displays using randr.  It runs every 60 seconds from cron.  Luckily, it doesn't consume many resources, so ti's not a terrible program to run every minute.  But "elegant" it is NOT!

This works as long as all 3 monitors have come back to life.

#!/bin/sh
#
# Reset the monitors to the correct format
#
#
export DISPLAY=:0.0
xrandr --screen 0 --output DisplayPort-0 --auto --pos 0x870 --rotate normal        --output DisplayPort-1 --auto --rotate right --pos 3840x0 --primary          --output DisplayPort-2 --mode 3840x2160 --rotate normal --pos 6000x870

#


On 1/2/23 10:03, Casey Bralla via plug wrote:
I've been having a problem when my Gentoo desktop awakens from sleep or
hibernation.

I've got a 3-monitor setup, with the middle monitor rotated to portrait
mode.  For the last month or so, whenever the system awakens from sleep,
the middle monitor returns to landscape mode instead of staying in
portrait mode.  [Luckily, it helpfully opens up the xfce display setting
program automatically because it somehow knows it's hosed my displays.]

I can execute a simple xrandr script to reset the displays, or futz with
the display setting application, but this is a pain.  A while ago,
everything just worked, but I'm on the bleeding edge with Gentoo (~AMD64
mode), so I have to accept a few problems.

Anybody have an idea where I can look to troubleshoot this?

Alternately, is it possible to run a script when a system comes back
from sleep/hibernation?

TIA for advice!

Casey


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug