[CentOS] Setting GDM resolution without knowing the monitor specs

Gianluca Cecchi gianluca.cecchi at gmail.com
Thu Feb 21 23:42:53 UTC 2019


On Thu, Feb 21, 2019 at 8:00 PM Warren Young <warren at etr-usa.com> wrote:

> We had a complaint recently from a customer that received a server we
> shipped out that their monitor just showed a black screen.  It turns out
> that they’d hooked it up to an ancient POS with 800x600 as its best
> resolution, and gdm in CentOS 7 apparently assumes at least 1024x768.  It
> was apparently a major hassle for them to hunt down a reasonable monitor
> for us.
>
>
Hi, I would try the old days way at a lower level..

Create a file 00-monitor.conf under /etc/x11/xorg.conf.d

Something like this below, using conservative range values for horiz and
vert syncs

[root at desktop xorg.conf.d]# cat 00-monitor.conf
Section "Device"
    Identifier    "Default Video Device"
EndSection

Section "Monitor"
    Identifier    "Default Monitor"
    HorizSync       30.0-62.0
    VertRefresh     50.0-70.0
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "Default Monitor"
    Device        "Default Video Device"
    DefaultDepth    24
    SubSection "Display"
        Depth    24
        Modes     "800x600"
    EndSubSection
EndSection
[root at desktop xorg.conf.d]#

This way it should be forced to use 800x600 resolution, also because of
conservative values the vesa settings for higher resolutions should be out
of range.
I tried with a CentOS 7 VM in oVirt where by default it gets 1024x768 and
after these settings and reboot, both gdm and graphical sessions got 800x600

In Xorg.0.log I get

[    15.554] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    15.554] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    15.558] (==) No Layout section.  Using the first Screen section.
[    15.558] (**) |-->Screen "Default Screen" (0)
[    15.558] (**) |   |-->Monitor "Default Monitor"
[    15.559] (**) |   |-->Device "Default Video Device"
[    15.559] (==) Automatically adding devices
[    15.559] (==) Automatically enabling devices
[    15.559] (==) Automatically adding GPU devices
. . .
[    15.659] (II) qxl(0): Not using mode "1920x1200" (hsync out of range)
[    15.659] (II) qxl(0): Not using mode "1920x1080" (hsync out of range)
[    15.659] (II) qxl(0): Not using mode "1600x1200" (hsync out of range)
[    15.659] (II) qxl(0): Not using mode "1680x1050" (hsync out of range)
[    15.659] (II) qxl(0): Not using mode "1400x1050" (hsync out of range)
[    15.659] (II) qxl(0): Not using mode "1280x1024" (hsync out of range)
[    15.659] (II) qxl(0): Not using mode "640x480" (hsync out of range)
[    15.659] (II) qxl(0): Printing probed modes for output Virtual-0
[    15.659] (II) qxl(0): Modeline "800x600"x59.9   38.25  800 832 912
1024  600 603 607 624 -hsync +vsync (37.4 kHz UP)
[    15.659] (II) qxl(0): Modeline "1024x768"x59.9   63.50  1024 1072 1176
1328  768 771 775 798 -hsync +vsync (47.8 kHz P)
. . .
[    15.659] (--) Depth 24 pixmap format is 32 bpp
[    15.662] (II) UXA(0): Driver registered support for the following
operations:
[    15.662] (II)         solid
[    15.662] (II)         copy
[    15.662] (II)         composite (RENDER acceleration)
[    15.662] (II)         put_image
[    15.663] (II) qxl(0): RandR 1.2 enabled, ignore the following RandR
disabled message.
[    15.664] resizing primary to 1024x768


HIH,
Gianluca


More information about the CentOS mailing list