How to make Xrandr Custom Resolutions Permenant?

Hi I’ve been reading p on how to add a custom resolution using xrandr. However, using xrandr only works for that session. I;d like to make these changes consistent. Ive attempted to change my xorg.conf. Here is what it looks like… any idea as to why SUSE is not picking up on my resolutions? See below…

nvidia-settings: X configuration file generated by nvidia-settings

nvidia-settings: version 340.76 (buildmeister@swio-display-x86-rhel47-01) Thu Jan 22 12:12:09 PST 2015

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0” 0 0
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
Option “Xinerama” “0”
EndSection

Section “Files”
EndSection

Section “InputDevice”
# generated from data in “/etc/sysconfig/mouse”
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “IMPS/2”
Option “Device” “/dev/input/mice”
Option “Emulate3Buttons” “yes”
Option “ZAxisMapping” “4 5”
EndSection

Section “InputDevice”
# generated from default
Identifier “Keyboard0”
Driver “kbd”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Unknown”
ModelName “CRT-0”
Modeline “1920x1080_60.00” 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
Option “PreferredMode” “1920x1080_60.00”
EndSection

Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce GTX 650 Ti”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
Option “Stereo” “0”
Option “nvidiaXineramaInfoOrder” “DFP-2”
Option “metamodes” “DVI-I-0: nvidia-auto-select +1920+0 {viewportin=1920x1080}, HDMI-0: 640x480 +3840+300, DVI-D-0: nvidia-auto-select +0+0”
Option “SLI” “Off”
Option “MultiGPU” “Off”
Option “BaseMosaic” “off”
SubSection “Display”
Depth 24
EndSubSection
EndSection

The monitor in question is labeled Monitor0/CRT-0 above. Any thoughts? Also, it seems that KDE’s “Display Configuration” never matches up to my xorg.conf, and it never refreshes to include the new modes I added in xrandr. Strange… any ideas? Thanks everybody.

You can add your xrandr lines to /etc/X11/xinit/xinitrc

This recent post will be of interest to you

https://forums.opensuse.org/showthread.php/507397-Adjusting-screen-resolution-on-a-system-with-no-monitor-connected?p=2710248#post2710248

You do have to restart X to get KDE to sync up. Log out then back in. You should not need to play with xrandr for a custom display res

deano_ferrari: I did just as you instructed, rebooted my computer, and Viola! Worked flawlessly during the KDE login manager splash… unfortunately, then it switched back to the lower resolution upon loading the desktop fully. Curiously enough, it seems as though whatever resolution you have set in KDE display manager overrides any potential modifications to Res, whether it be in xinit or Xorg.conf… The good news is, when I checked out KDE display manager again, it actually added the modeline into the dropdown menu, so I was simply able to pull the slider up to 1920x1080 (which was previously unavailable. Looks great! My guess is the xrandr edits are set to load via the script you directed me to before KDE loads up, so KDE loads with the newly created Resolution available - however - in that case, my last session was set to 1024x768, thus the override. Hopefully upon reboot KDE display manager remembers my selection… in any case, it still solved the problem. And gogalthorp, you were right as to KDE syncing with the resolutions, however it only syncs to those that are presented to it before KDE loads up. Seeing as though logging out ends your session, when you log back in, KDE does not load up your modifications. Anyways, thanks guys for your help! Greatly appreciated :slight_smile:

You can add the xrandr lines to an executable startup script (~/.kde4/Autostart/directory) eg screen.sh so that it will take effect as you log in.

Further to this, it is possible to set the preferred display mode as default and apply via the KDE Display and Monitor utility. BTW, the config file(s) are located in the ~/.kde4/share/apps/kscreen/ directory.