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.
2
  • 1
    Manually coping Monitor.xml is not solution.It's workarround
    – Addicted
    Jul 5 '16 at 0:17
  • This is a misunderstanding. The initial monitors.xml file, or default resolution if you want, is the result of a discussion between the screen and your graphics driver, in which you do not take part. Apart from that, there is no "default resolution", until you manually set it. Jul 5 '16 at 7:09
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

6
  • is that a problem??i didn't know.New to askubuntu.May be what you tell is to keep this site clean from duplicate.anyway thanks.& may be stop messing with new user.Why copy this from a previous answer, (to an obvious dupe question).Say that in a positive attitude,people would appreciate help.
    – Addicted
    Jul 5 '16 at 17:59
  • I tried helping you by linking to the dupe and by explaining what is wrong in your assumption (in the comment to your question). Nothing more, nothing less. Nothing to feel offended about. Jul 5 '16 at 18:06
  • I tried many solution.But in the end, your given link worked.So i was hoping to write what helped me in short.I obviously had a working ~/.config/monitors.xml from the start.Only because lightdm was not taking resolution from it,i was hoping alternative.& i came across a solution about HardLinking ~/.config/monitor.xml to /var/lib/lightdm/.config/monitor.xml which didn't worked.But coping it worked.So i just wrote that if it may help someone.(it seems helping me was not your only objective.you want to take credit so badly you tried to force me to accept i'm wrong.Mint comm. is friendly)
    – Addicted
    Jul 6 '16 at 4:43
  • & the -ve rating from the start (may be you gave me that cause you knew answer & it's a silly question to you) is like discouraging me from asking question
    – Addicted
    Jul 6 '16 at 4:46
  • 2
    To be honest, it is not about being right or wrong at all. If a question really is a dupe, it should be marked as such. Future readers will be able to find the answer then. Furthermore, marking as dupe is no qualification whatsoever, no silly question at all. Copying content from the "original" of a duplicate, to create duplicated answers on duplicated questions is not improving clarity at the same time, that was what I downvoted it for, now reverted. Jul 6 '16 at 4:58

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