How to force screen resolution on CentOS machine
11,294
You could try creating a new resolution mode with xrandr and setting the display output to the new mode. The following example assumes that your external monitor is on HDM1 and you want a 1920x1080 resolution.
cvt 1920 1080 # Get the correct settings for the new mode
# Output for me: "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode HDMI1 1920x1080_60.00 # Change HDMI1 to whatever output you want to use
xrandr --output HDMI1 --mode 1920x1080_60.00
After executing the last command, your display should be using the new resolution.
Related videos on Youtube
Author by
jackhab
Updated on September 17, 2022Comments
-
jackhab over 1 year
I have CeontOS machines connected to LCD via KVM which causes failure to properly detect screen resolution and I'm stuck with 800x600 until I reset X server with the LCD connected directly to the PC. How can I enforce higher screen resolutions?
Thanks.
EDIT: I followed the advise and left only one resolution in my xorg.conf but it didn't help.
Section "Screen" Identifier "Screen0" Device "Videocard0" DefaultDepth 16 SubSection "Display" Viewport 0 0 Depth 16 Modes "1440x900" EndSubSection EndSection