5

I'm trying to change my screen resolution to 1920x1200 with no luck. I actually did successfully change it, but once I log in it changes back to 800x600

4 Answers 4

1

The following has worked for me. Try running this on the command line:

First, make a backup of the config file:

cp /etc/X11/xorg.conf /etc/x11/backup.xorg.conf

Then configure the display to the resolution you want:

system-config-display --reconfig --set-resolution=1920x1200

You then have to restart X with ctrl-alt-backspace. I don't know of anyway to restart it on the command line but there could be a way. When I did this for the first time, I didn't restart X, and was mystified at why the resolution wasn't changing.

2
  • 4
    Doesn't work in CentOS 7 Mar 22, 2017 at 13:56
  • 8
    ^^ CentOS 7 - system-config-display: command not found
    – treyBake
    Nov 8, 2017 at 10:40
3

For my CentOS 7.2 I wanted to have 2560x1440 resolution to fit my iMac monitor First I executed

$ sudo xrandr
Screen 0: minimum 32 x 32, current 1920 x 1200, maximum 32768 x 32768
VNC-0 connected primary 1920x1200+0+0 0mm x 0mm
   1024x768      60.00  
   1920x1200     60.00* 
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     60.00  
   1400x1050     60.00  
   1360x768      60.00  
   1280x1024     60.00  
   1280x960      60.00  
   1280x800      60.00  
   1280x720      60.00  
   800x600       60.00  
   640x480       60.00 

Since max is 32768x32768 we can definitely do 2560x1440 resolution! First, added the new resolution mode:

$ sudo xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

Then added that mode to my VNC-0 screen

$ sudo xrandr --addmode VNC-0 "2560x1440_60.00"

Then, Under:

Applications Menu =>System Tools =>Settings =>Hardware:Dispays =>Unknown Display (Double click) =>Resolution =>2560x1440

You do not even need to restart GNU Desktop :)

2
  • I had issues figuring out what options to use for the --new-mode parameter. So just to expand on your answer-- in order to get the Modeline options needed for the --new-mode parameter to xrandr you can use the cvt command. Install the xorg-x11-server-Xorg package in order to use it. Just run: cvt X_RES Y_RES
    – Kentgrav
    May 28, 2019 at 16:53
  • 1
    what's a good way to make these changes permanent? I can change the resolution to e.g. 1920x1080 by manually running a script every time I log in, but that's annoying and it would be good for it to run automatically.
    – nachose
    Apr 16, 2020 at 10:37
0

before sudo xrandr --newmode you must do this

gtf 2560 1440 60 -x then use the command sudo xrandr --newmode and pick up the numbers from the gtf

or simply see https://unix.stackexchange.com/questions/245497/how-to-manually-configure-a-monitor-in-centos7-attached-via-kvm

0

I have found a very simple solution to set resolution in Hyper-v(for CentOS-8):

$ su root
$ grubby --update-kernel=ALL --args="video=hyperv_fb:1920x1080"
$ reboot

Where 1920x1080 is your expected resolution.

This puts following entry in grub file:

[root@localhost /]# cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto resume=/dev/mapper/cs-swap rd.lvm.lv=cs/root rd.lvm.lv=cs/swap rhgb quiet video=hyperv_fb:1920x1080"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
[root@localhost /]# 

This should work on all CentOS versions as it updates kernel entry for resolution.

On CentOS-9 you can easily change it through Settings->Displays->Resolution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .