On some Display Manager events (login, screen-lock, etc) screen resolution changes to 800x600 forcefully, even though user setting is different.
LightDM's display-setup-script
or .config/autostart
methods does not fix this problem.
These methods changes resolution after specified events by executing xrandr
command,
but other events (escpecially screen-lock) reset resolution to 800x600 and annoy me.
I experienced this symptom on Lubuntu 17.04 and 17.10, both installed on VMware WS 12. I think other ubuntu and its derivatives may have similar symptom.
The symptom occurs because Lubuntu preferrs 800x600 screen resolution on VMware WS/Player.
$ xrandr -q
Screen 0: minimum 1 x 1, current 1920 x 1200, maximum 16384 x 16384
Virtual1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x600 60.00 + 60.32
...
1920x1200 59.88*
...
640x480 59.94
Virtual2 disconnected (normal left inverted right x axis y axis)
...
The plus sign +
after screen resolution ([email protected] in this example) is preferred resolution sign.
Because 800x600 is preferred, LightDM changes screen resolution to it when some events are occured.
The following process changes preferred resolution to 1920x1200. Do with root priviledge. (use sudo
)
- Create X11 config file
Because you may be already running X server, append :2
to specify new session number.
# Xorg :2 -configure
...
Your xorg.conf file is /root/xorg.conf.new
To test the server, run 'X -config /root/xorg.conf.new'
- Edit X11 config file
Open created file with your preferred text editor (nano
or vi
), and remove all sections except Section "Monitor"
, Section "Device"
and Section "Screen"
.
Then specify Option "PreferredMode" "1920x1200"
into Section "Monitor"
. You may change 1920x1200
to your preferred one.
The result should look like:
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
Option "Primary" "true"
Option "PreferredMode" "1920x1200"
EndSection
Section "Device"
...blahblah...
EndSection
Section "Screen"
...blahblah...
EndSection
(I also appended Option "Primary"
, which forces that the monitor is primary display.)
- Move to correct location
By default, Lubuntu does not create xorg.conf.d
directory. Create it then copy the conf file.
# mkdir /etc/X11/xorg.conf.d
# cp xorg.conf.new /etc/X11/xorg.conf.d/10-monitor.conf
- Reboot and the symptom should be fixed.
$ xrandr -q
Screen 0: minimum 1 x 1, current 1920 x 1200, maximum 16384 x 16384
Virtual1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1920x1200 59.88*+
800x600 60.00 + 60.32
...
640x480 59.94
Virtual2 disconnected (normal left inverted right x axis y axis)
...
If Lubuntu does not show proper graphic environment after reboot;
- Press
Ctrl+Alt+F1
to change to console environment - Login with your ID/PW
- Delete
/etc/X11/xorg.conf.d/10-monitor.conf
- Reboot