I'm running Ubuntu 19.04 on a Lenovo ThinkPad X1 Extreme laptop. It has a native display resolution of 3840x2160. But on the 15" laptop, that's tiny. Rather than dealing with application scaling (and the inevitable application that doesn't scale correctly), my preference is to simply run the display at 1920x1080 resolution.
Unfortunately, 1920x1080 is not an option in the Gnome Display Settings app (I'm using vanilla-gnome-desktop). The only option available is 3840x1080 (maybe something isn't detected correctly?).
However, I am able to run at 1920x1080 resolution using the nvidia-settings application after installing the proprietary Nvidia driver. Unfortunately, it seems that any changes I make in this app are lost on reboot. This seems to be a common "problem" - there are tons of questions about it all over the internet, with a pretty wide range of solutions.
Currently, my display runs at the default native resolution 3840x2160 when I log in. I've put the command nvidia-settings --assign "CurrentMetaMode=DPY-3: nvidia-auto-select @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=3840x2160+0+0}"
into a .desktop
file that I can run easily to reset the resolution. This works, but it's not a great experience to run this every time I log in or lock the screen.
What is the proper way to persist this setting?
Or, How can I make other resolutions available to Gnome Display Settings (which generally remembers its config in my experience)?
As man nvidia-settings suggests, I've tried making a ~/.xinitrc
that does nvidia-settings --load-config-only &
before continuing to load /etc/X11/xinit/xinitrc
, but this does not work for me since my ~/.nvidia-settings-rc
file does not seem to contain display resolution, even after saving my settings from the application. I've also tried using nvidia-settings --assign
(as above) in my ~/.xinitrc
, but this doesn't appear to have any effect.