Change Display Resolution i Rocky Linux 9

How do I change the display resolution in Rocky Linux 9?

I built a computer with the following:
Motherboard: Gigabyte Z690 AERO G (rev. 1.x)
CPU: Intel i7-12700K

I’m using the built in Intel graphics on the HDMI port.

My monitor is Samsung F32TU87.

Here are some more info:

lshw -c video
  *-display UNCLAIMED       
       description: VGA compatible controller
       product: AlderLake-S GT1
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:41000000-41ffffff memory:50000000-5fffffff ioport:3000(size=64) memory:c0000-dffff memory:43000000-49ffffff
       product: EFI VGA
       physical id: 3
       logical name: /dev/fb0
       capabilities: fb
       configuration: depth=32 resolution=1024,768
lspci -k | grep -EA3 'VGA|3D|Display'
00:02.0 VGA compatible controller: Intel Corporation AlderLake-S GT1 (rev 0c)
    DeviceName: Onboard - Video
    Subsystem: Gigabyte Technology Co., Ltd Device d000
    Kernel modules: i915
lspci -nn | grep -i vga
00:02.0 VGA compatible controller [0300]: Intel Corporation AlderLake-S GT1 [8086:4680] (rev 0c)

I tried adding the resolution with xrandr but I got an error:

xrandr -q
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1024 x 768, current 1024 x 768, maximum 1024 x 768
default connected primary 1024x768+0+0 0mm x 0mm
   1024x768      76.00*
gtf 3840 2160 30
  # 3840x2160 @ 3000 Hz (GTF) hsync: 65.91 kHz; pclk: 339.57 MHz
  Modeline "3840x2160_30.00"  339.57  3840 4080 4496 5152  2160 2161 2164 2197  -HSync +Vsync
xrandr --newmode "3840x2160_30.00"  339.57  3840 4080 4496 5152  2160 2161 2164 2197  -HSync +Vsync
xrandr: Failed to get size of gamma for output default

Do you use X11 or Wayland session? Latter is default. The xrandr works only with X11.

@jlehtone I did a default install. The only change I’ve made is to switch to Gnome classic during login. If I use loginctl to get the session and get the type from the session “loginctl show-session -p Type” then I get X11

With a default install, you should be on Wayland, but anyway, you should be able to choose it in GDM just before you log in.

Other than that, if you go to “settings”, from top right corner in Gnome Classic, you should see “Display” and then “Resolution”. But, it might be restricted on HDMI, so do you have DisplayPort?

Ok, you have X11.

I don’t have gnome-classic; I exclude that package. I tried on machine nouveau NVidia.
Chose Gnome Settings, there Display, and in Resolution drop-down menu a lower
resolution. (I don’t recall trying that before.)

The result? Black screen. Luckily, Ctrl-Alt-F4 and Ctrl-Alt-Del did reboot and original
resolution was there. This might have been nouveau “feature”.

I do have a faint recollection that once upon a time, if you had multiple resolutions
(in xorg.conf?), some X11 key combo did switch between them.
(I’ve never learned to use the xrandr.)

@gerry666uk The settings don’t allow me to change the display resolution. The motherboard and monitor have a DisplayPort but I don’t have a DP cable.

@jlehtone I don’t have the option to go into Wayland. On the computer I see standard (X11 display server), gnome classic, custom, and user script. If I create a virtual machine and install the iso, I get the Wayland option.

What I tested (and did fail) was a X11 session of Gnome.

It’s worth testing with a DisplayPort cable, if you can get one, or borrow one.
But, you need to find out why you don’t have the Wayland optoin in GDM, It should be there.

Regarding the black screen when testing from GUI settings applet on X11, that’s obviously not ideal. I seem to remember on very early CentOS 8.0 you would wait 10 seconds and then it would jump back to the old resolution, but meybe they broke that part. Overall, the whole issue of black screens is getting worse, e.g. when the monitor can’t understand the digital output. I had a similar problem where I couldn’t use the BIOS due to the motherboard, GPU and monitor not agreeing on a resolution. In my case switching from DVI to DisplayPort got it working.

I erased Rocky Linux 9 and installed the first version of Rocky Linux (RHEL 8 clone). The first version of Rocky Linux display works as expected. Also, the “xrandr: Failed to get size of gamma for output default” error went away. I could also see Wayland as an option when I was logged in.

Rocky Linux 9 is definitely the problem. I’ve tried all the solutions I could find and none worked. I’m wondering if I could be hitting this bug: 2107102 – is missing from mesa-dri-drivers-21.3.4-2.el9 but it seems I have different hardware.

Any ideas to get Rocky Linux 9 working? If not, where do I need to file this bug? I’m leaning toward going with the first Rocky Linux.

That thread has some info plus a link to the bugzilla report. Issue is with the Alder Lake support. My issues are gone with RHEL 9.1, so Rocky 9.1 should likewise also have these same fixes. I haven’t tested but RHEL/Rocky 8.7 may also have had these fixes backported. It isn’t clear which version of Rocky you installed last, you said ‘first version’, which would have been 8.3. To my knowledge there was no official Alder Lake support in that version.

I’m using AMD, so maybe that’s why I’m not seeing the issue.

I also forgot something fairly important.

In year 2022, and with flat panel displays, the term “resolution” might be wrong.
The idea is to lock to the native resolution of the panel, and then then use scaling instead of resolution. For example in my case, to make the text bigger, at the expense of slightly less screen space.

I don’t think you need xrandr with Wayland, the ‘x’ is something to do with

@JimWright For Rocky Linux 9, I installed the DVD iso Rocky-9.0-20220808.0-x86_64-dvd.iso. For the first version of Rocky Linux, I installed the DVD iso Rocky-8.7-x86_64-dvd1.iso. In other words, by “first rocky linux” I meant the first major release of Rocky Linux (i.e., 8.x). After I installed the OS, I used yum update to update the packages.

I found a staging version of Rocky Linux 9.1:

I’ll test the stagging version out to see if the display works. If this works, do you know where the drivers are located? I’d assume I’d need to compile the driver.

I looked more into the i915 driver for different versions of Rocky Linux.

With Rocky Linux 8, the graphics work as expected. modinfo i915 returns “filename: /lib/modules/4.18.0-425.3.1.el8.x86_64/kernel/drivers/gpu/drm/i915/i915.ko.xz”.

With Rocky Linux 9.0 that I’m having trouble with, modinfo i915 returns “filename: /lib/modules/5.14.0-70.17.1.el9_0.x86_64/kernel/drivers/gpu/drm/i915/i915.ko.xz”.

With Rockly Linux 9.1 RC2, the graphics work as expect. modinfo i915 returns “filename: /lib/modules/5.14.0-162.6.1.el9_1.x86_64/kernel/drivers/gpu/drm/i915/i915.ko.xz”.

Is there a way to get the i915 driver from Rockly Linux 9.1 RC2 in 9.0? Also, if I install RC2 will yum update update to 9.1 production when 9.1 is relased?

Unfortunately I can’t help with either of those questions, but I assume that the driver is built against a specific kernel version and will have issues running elsewhere.

The Rocky 8.7 which was recently released will have all of the latest fixes backported to it, so in some regards will be ‘better’ than Rocky 9.0 which was released prior to 8.7. When 9.1 is released, it will have all the latest updates built against the 9.x kernel.

It shouldn’t take very long now for 9.1 to be officially released, it would be best to wait for that release, unless you’re happy with 8.7. But going from 8.x to 9.x on a running system basically involves an install from scratch, no easy upgrade path is available.

Have you tried a “dnf upgrade”? That should update your system, but keep your OS version as is, just with patches & fixes. You may get a newer Kernel & modules that way, & your Alderlake may then work as expected.

This was a bug in the i915 driver. The bug was fixed in Rocky Linux 9.1 released on 26 November 2022