Set default Resolution system wide
6,995
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
Related videos on Youtube
Author by
Addicted
Updated on September 18, 2022Comments
-
Addicted over 1 year
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 to1024x768
(maybe because1024x768
is 1st entry in xrandr)
If I runxrandr --output HDMI-0 --primary --mode 1920x1080
, it's set to1920x1080
. 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:
- changing
/etc/lightdm/lightdm.conf
& adding xrandr command.so it would executexrandr --output HDMI-0 --primary --mode 1920x1080
at lightdm service start. This doesn't work. - Hard-linking
~/.config/monitor.xml
to `/var/lib/lightdm/.config/monitor.xml. Linking failed because of an invalid cross device link. - 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.
-
Addicted almost 8 yearsManually coping Monitor.xml is not solution.It's workarround
-
Jacob Vlijm almost 8 yearsThis 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.
- changing
-
Addicted almost 8 yearsis 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. -
Jacob Vlijm almost 8 yearsI 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.
-
Addicted almost 8 years& 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
-
Jacob Vlijm almost 8 yearsTo 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.
-
Huygens almost 5 yearsHardlinking probably fails because your
/home
and/var
are on different partitions. Hardlinks can only work within a single partition.