Adjusting the screen resolution under CentOS 6

With sincere thanks to the link above, this is how you can adjust the screen resolution under CentOS 6.

Run this command (with the appropriate resolution):

cvt 1920 1080

You’ll get output similar to this:

# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline “1920x1080_60.00″ 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

Copy the modeline and paste it after –newmode, like so:

xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

Then assign the new mode to the device:

xrandr --addmode VGA-1 "1920x1080_60.00"

This was done on a clean stock CentOS 6.4 installation, no custom drivers.

To get the settings to persist across sessions, I created /etc/gdm/PostLogin/Default
like so:

Code

#!/bin/sh
#
if [ -f "$HOME/.gdm/PostLogin/Default" ];
then
  exec -l "$SHELL" -c "$HOME/.gdm/PostLogin/Default"
fi;

Under the account, I add the Default file:

Code

xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA-1 "1920x1080_60.00"
xrandr --output VGA-1 --mode "1920x1080_60.00"

Be sure to grant execute permissions on both /etc/gdm/PostLogin/Default and $HOME/.gdm/PostLogin/Default.

Adding nVidia drivers didn’t help, adding hplip didn’t help. There is a Tripp-Lite KVM switch. This was the answer.

And, it looks great.