3

On a freshly installed default Ubuntu 18.04.3 with gdm3 on a Dell Optiplex 7020 with Intel i7 BuiltIn Graphics, my display settings will be lost after I lock the screen and come back after a few hours (for example lock in the evening, log in in the morning). The resolution on my primary display has gone to 1024x768 and which monitor is left or right is reset. Right now my solution is to power off the monitor and power it back on, afterwards I can reconfigure my displays with the correct resolution settings (at least once a day). I already tried to debug the issue and tested a few solutions I found on the internet (listed below). My display settings are kept if I restart, no problem there.

Symptoms:

  • gnome-shell[1745]: Failed to use stored monitor configuration: Invalid mode 1920x1200 (59,950172) for monitor 'ENC EV2455'
  • xrandr does not offer the correct resolution anymore for my primary display
  • I can create a custom mode line with cvt and add it via xrandr to my DP-1 display, but I cannot activate that mode, it has no effect

A workaround like forcing xrandr to re-read the Monitors EDID would be okay, although I would prefer to identify the underlying issue. I read xrandr manpage, but could not find an option to re-read the EDID information. I noticed that the xrandr output differs in working and failure case: Correct xrandr:

Screen 0: minimum 320 x 200, current 3600 x 1200, maximum 16384 x 16384
VGA-1 connected (normal left inverted right x axis y axis)
   1920x1200     59.95 +
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    59.94  
   720x400       70.08  
DP-1 connected primary 1920x1200+1680+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1920x1200     59.95*+
   1920x1080     60.00    59.94  
   1600x1200     60.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     60.02  
   1280x800      59.81  
   1280x720      60.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
   720x400       70.08  
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected 1680x1050+0+18 (normal left inverted right x axis y axis) 474mm x 297mm
   1680x1050     59.88*+
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  

xrandr output after few hours of lock screen:

Screen 0: minimum 320 x 200, current 2704 x 1050, maximum 16384 x 16384
VGA-1 connected (normal left inverted right x axis y axis)
   1920x1200     59.95 +
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    59.94  
   720x400       70.08  
DP-1 connected primary 1024x768+1680+0 (normal left inverted right x axis y axis) 519mm x 324mm
   1024x768      60.00*  
   800x600       60.32  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
   720x400       70.08  
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected 1680x1050+0+18 (normal left inverted right x axis y axis) 474mm x 297mm
   1680x1050     59.88*+
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  

Any hint in which direction I could go for debugging is appreciated. Where does xrandr get its EDID information from?

What I tried (and reverted after non success):

  • Script for applying the config from monitors.xml https://gist.github.com/azappa/4da1e8dc0b0f8a481d1a - no effect when run manually in failure case
  • disable VGA-1 via xrandr in /etc/gdm3/Init/Default
  • gsettings set org.gnome.desktop.session idle-delay 0
  • caffeine

My display setup: I have two monitors connected and the problematic device is connected twice via VGA and DisplayPort, because I have an VGA KVM Switch connected. VGA Display is disabled in Ubuntu. Sometimes it is enabled again after a few hours of lock screen.

0

After some more research and testing, I came to this workaround: My primary monitor seemingly was slow getting out of DPMS (Display Power Management Signaling) modes like sleep or suspend. So I disabled these functions via a xorg.conf file. I placed the file 11-monitor.conf in /usr/share/X11/xorg.conf.d/ with following Content:

Section "Extensions"
        Option "DPMS" "Disable"
EndSection

Now the primary monitor stays on all the time, but at least I do not have issues with my monitor/screen setup. You can show information about your monitor's DPMS with the command

xset q

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.