How to generate X server config file to enable high resolution modes ?

When we upgrade the X server on our Linux machine, the high resolution mode sometimes gets disabled.

This happens because the X configuration file gets removed by the new package.

To enable the modes we need to create the X server config file again and then define various high resolution modes in the configuration file.

 

1. Try to create the new configuration file.

[root@ngelinux-1 ~]# Xorg :1 -configure
_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
[root@ngelinux-1 ~]#

It failed because X server is running on the machine.
Take X server downtime confirmation from the team/server owner and then run below command to kill all GUI windows.

 

2. Stop all X server applications.

# systemctl isolate multi-user.target

# killall /usr/bin/X*

 

3. Now generate the configuration file again.

[root@ngelinux-1 ~]# Xorg  -configure
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
Build Operating System:  3.10.0-862.2.3.el7.x86_64
Current Operating System: Linux ngelinux-1 3.10.0-957.5.1.el7.x86_64 #1 SMP Wed Dec 19 10:46:58 EST 2018 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-957.5.1.el7.x86_64 root=UUID=b0d20d13-81ed-4d24-abfd-157b34845775 ro crashkernel=auto nomodeset rhgb quiet intel_pstate=disable
Build Date: 13 December 2018  01:42:15PM
Build ID: xorg-x11-server 1.20.1-5.2.el7_6
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Thu Apr 28 08:10:35 2022
List of video drivers:
        ati
        dummy
        intel
        nouveau
        openchrome
        qxl
        radeon
        v4l
        vmware
        modesetting
(++) Using config file: "/root/xorg.conf.new"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"


Xorg detected your mouse at device /dev/input/mice.
Please check your config if the mouse is still not
operational, as by default Xorg tries to autodetect
the protocol.

Your xorg.conf file is /root/xorg.conf.new

To test the server, run 'X -config /root/xorg.conf.new'

(EE) Server terminated with error (2). Closing log file.

 

4. Copy the generated configuration file to target location.

[root@ngelinux-1 ~]# cp -p /root/xorg.conf.new  /etc/X11/xorg.conf
[root@ngelinux-1 ~]# ls -l /etc/X11/xorg.conf
-rw-r--r-- 1 root root 1996 Apr 28 08:10 /etc/X11/xorg.conf

 

5. Now generate the mode lines for which you want to enable the resolution.

[root@ngelinux-1 ~]# cvt -v 1280 720
# 1280x720 59.86 Hz (CVT 0.92M9) hsync: 44.77 kHz; pclk: 74.50 MHz
Modeline "1280x720_60.00"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync
[root@ngelinux-1 ~]# cvt -v 1920 1200
# 1920x1200 59.88 Hz (CVT 2.30MA) hsync: 74.56 kHz; pclk: 193.25 MHz
Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
[root@ngelinux-1 ~]# cvt -v 3840 2160
# 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHz
Modeline "3840x2160_60.00"  712.75  3840 4160 4576 5312  2160 2163 2168 2237 -hsync +vsync
[root@ngelinux-1 ~]#

 

6. Put all the modelines in below format in a file called 10-monitor.conf.

[root@ngelinux-1 xorg.conf.d]# cat 10-monitor.conf
Section "Monitor"
        Identifier "1920x1200"
        Modeline "1920x1200_60.00"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync

        Identifier "3840x2160"
        Modeline "3840x2160_60.00"  712.75  3840 4160 4576 5312  2160 2163 2168 2237 -hsync +vsync

        Identifier "2048x1080"
        Modeline "2048x1080_60.00"  183.75  2048 2176 2392 2736  1080 1083 1093 1120 -hsync +vsync

        Identifier "2560x1440"
        Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync

        Identifier "4096x2160"
        Modeline "4096x2160_60.00"  760.00  4096 4432 4880 5664  2160 2163 2173 2237 -hsync +vsync
EndSection
[root@ngelinux-1 xorg.conf.d]#

 

7. Start the graphical mode.

# systemctl isolate graphical.target

Start the graphical mode and confirm from user/team if they can take desktop in high resolution mode.
You will not able to see in console as the resolution doesn’t support that.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments