4

I'm using Ubuntu 16.04.

addicted@ADDICTED:~$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      70.07 +  60.00  
   1920x1080     59.93* 
   1680x1050     59.95    59.88  
   1440x900      59.89  
   1400x1050     59.98  
   1360x768      59.96    59.80  
   1280x1024     60.02  
   1280x960      60.00  
   1152x864      70.00    60.00  
   960x540       59.99  
   840x525       60.01    59.88  
   800x600       72.19    60.32    56.25  
   720x450       59.89  
   700x525       59.98  
   680x384       59.96    59.80  
   640x480       59.94  
   512x384       70.07    60.00  
   400x300       72.19  
   320x240       60.05  
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

I want to set resolution of 1920x1080 system wide irrespective of user.
If I delete ~/.config/monitors.xml, my resolution changes to 1024x768 (maybe because 1024x768 is 1st entry in xrandr)
If I run xrandr --output HDMI-0 --primary --mode 1920x1080 , it's set to 1920x1080. But only temporarily.
The only permanent solution is using ~/.config/monitors.xml. But this also doesn't change resolution at login screen.

How to set 1920x1080 resolution system wide?

What I tried so far:

  1. changing /etc/lightdm/lightdm.conf & adding xrandr command.so it would execute xrandr --output HDMI-0 --primary --mode 1920x1080 at lightdm service start. This doesn't work.
  2. Hard-linking ~/.config/monitor.xml to `/var/lib/lightdm/.config/monitor.xml. Linking failed because of an invalid cross device link.
  3. Adding modeset to /etc/X11/xorg.conf which leads to issues. This failed failed with "Input device not supported", I then had to boot into recovery mode & resetting that xorg.conf.
Jacob Vlijm
  • 85,475

1 Answers1

2

sudo cp --preserve=timestamps /home/CorrectUser/.config/monitors.xml /var/lib/lightdm/.config/

This fixed my resolution in login screen. When i tried to hardlink instead of copy,it didn't worked.(the hardlinking operation failed)Weird