Refresh rate issues after sleep

Hello

I’ve got an issue with my setup, I have a single monitor connected with HDMI 2.1, it’s a 32:9 5120x1440 monitor, at boot everything is fine, HDR works, 240Hz refresh rate everything is fluid, but if I lock my computer and come back later, the screen gets blocked at 60Hz, I have no idea why it is hapenning

Here is the cachyOS bugreport : fb579ec

And here is the output of kscreen-doctor -o after the issue happenned :

 8s
❯ kscreen-doctor -o
Output: 1 HDMI-A-1 493de255-09a9-4e65-88c9-82755fad6707
        enabled
        connected
        priority 1
        HDMI
        replication source:0
        Modes:  1:3840x1080@119.97!  2:3840x2160@59.94  3:3840x2160@50.00  4:5120x1440@60.00*  5:3840x1080@59.96  6:2560x1440@119.99  7:2560x1440@59.95  8:1920x1080@119.88  9:1920x1080@59.94  10:1920x1080@50.00  11:1680x1050@59.95  12:1600x900@60.00  13:1280x1024@60.02  14:1440x900@59.89  15:1280x800@59.81  16:1280x720@60.00  17:1280x720@59.94  18:800x600@60.32  19:720x480@59.94  20:640x480@75.00  21:640x480@59.94 
        Geometry: 0,0 5120x1440
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: Never
        RgbRange: unknown
        HDR: enabled
                SDR brightness: 203 nits
                SDR gamut wideness: 0%
                Peak brightness: 400 nits, overridden with: 400 nits
                Max average brightness: 248 nits
                Min brightness: 0 nits
        Wide Color Gamut: enabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer accuracy
        Brightness control: supported, set to 100% and dimming to 100%
        DDC/CI: allowed
        Color resolution: unknown
        Allow EDR: unsupported
        Sharpness control: unsupported

Could you help me diagnose the issue ? After rebooting, the screen goes back to 240Hz without issue

I’m adding the output of kscreen-doctor -o after a reboot :

Output: 1 HDMI-A-1 493de255-09a9-4e65-88c9-82755fad6707
        enabled
        connected
        priority 1
        HDMI
        replication source:0
        Modes:  1:3840x1080@119.97!  2:3840x2160@59.94  3:3840x2160@50.00  4:5120x1440@240.00*  5:5120x1440@120.00  6:5120x1440@60.00  7:3840x1080@239.96  8:3840x1080@59.96  9:2560x1440@239.98  10:2560x1440@119.99  11:2560x1440@59.95  12:1920x1080@239.99  13:1920x1080@119.88  14:1920x1080@59.94  15:1920x1080@50.00  16:1680x1050@59.95  17:1600x900@60.00  18:1280x1024@60.02  19:1440x900@59.89  20:1280x800@59.81  21:1280x720@60.00  22:1280x720@59.94  23:800x600@60.32  24:720x480@59.94  25:640x480@75.00  26:640x480@59.94 
        Geometry: 0,0 5120x1440
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: Never
        RgbRange: unknown
        HDR: enabled
                SDR brightness: 203 nits
                SDR gamut wideness: 0%
                Peak brightness: 400 nits, overridden with: 400 nits
                Max average brightness: 248 nits
                Min brightness: 0 nits
        Wide Color Gamut: enabled
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer accuracy
        Brightness control: supported, set to 100% and dimming to 100%
        DDC/CI: allowed
        Color resolution: unknown
        Allow EDR: unsupported
        Sharpness control: unsupported

Right now it’s running in 240Hz just fine

Does the monitor turn off/go to sleep if you lock the PC? What happens if you disable auto sleep/monitor turn off?

I had a similar issue with an NVIDIA GPU and AV receiver and a TV connected to it. Happened during boot and it was stuck at 1080p 60 Hz and no HDR whereas the TV does 4K 120hz HDR VRR perfectly on Windows.

Dumped the TV edid and forced Nvidia to load that edid on the HDMI port and it has been flawless ever since.

The monitor does turn off after locking the PC, not doing so is not an option for me because it’s an oled monitor, it would increase burn in

In that case (assuming Nvidia, Wayland and Systemd boot) you can hard code the EDID.

Make sure you have a spare display port cable/adapter and a display port capable monitor to use in case your HDMI output stops working after booting.

Identify the HDMI port name:

ls /sys/class/drm/

Assuming its:

card1-HDMI-A-1

Connect the monitor directly to the HDMI port. Dump the Monitor EDID to a file. You can change the edid name to anything, I just named mine to TV:

sudo cat /sys/class/drm/card1-HDMI-A-1/edid > ~/tv.edid

Verify:

ls -lh ~/tv.edid
file ~/tv.edid

Should be “data” around 1-2 KB.

Move the EDID to a system location:

sudo mkdir -p /etc/X11/edid

Note it says X11 but it works fine in Wayland. I am using it right now with no issues.

sudo cp ~/tv.edid /etc/X11/edid/tv.edid
sudo chmod 644 /etc/X11/edid/tv.edid

Configure NVIDIA driver to use the EDID:

sudo nano /etc/modprobe.d/nvidia-edid.conf
options nvidia NVreg_UseEDID=0 NVreg_UseEDIDFromFile=1 NVreg_CustomEDID="HDMI-A-1:/etc/X11/edid/tv.edid"

Save and exit.

Regenerate initramfs:

sudo mkinitcpio -P

Assuming you use mkinitcpio.

Reboot and check after the monitor wakes up from sleep.

[EDIT]

If you ever change your monitor, make sure to undo the steps, regenerate the initramfs and reboot then change the monitor.

Does not work for me, still have my refresh rate slashed in half

Assuming your EDID is named dummy_2560_1600_120.edid

This is confirmed working on the latest CachyOS and Nvidia RTX 5090, Gnome, Wayland. Need to re add to the bootloader and regenerate initramfs after each update.

```
sudo cp ~/dummy_2560_1600_120.bin /etc/X11/edid/dummy_2560_1600_120.edid
```

```
sudo chmod 644 /etc/X11/edid/dummy_2560_1600_120.edid
```

```
sudo mkdir -p /usr/lib/firmware/edid
```

```
sudo cp /etc/X11/edid/dummy_2560_1600_120.edid /usr/lib/firmware/edid/
```

Check:

```
sudo ls /usr/lib/firmware/edid/
```

Add the EDID to bootloader (need to re-add after every update, can add before restart):

```
sudo nano /boot/loader/entries/linux-cachyos.conf
```

At the end of options add:

```
drm.edid_firmware=HDMI-A-1:edid/dummy_2560_1600_120.edid
```

Save and exit.

Add the EDID file to mkinitcpio config:

```
sudo nano /etc/mkinitcpio.conf
```

Find the FILES=() and replace with:

```
FILES=(/usr/lib/firmware/edid/dummy_2560_1600_120.edid)
```

Save and exit.

Regenerate initramfs:

```
sudo mkinitcpio -P
```

And reboot.

I tried, i don’t have /boot/loader/entries/linux-cachyos.conf, added the parameter to limine bootloader config but did not seem to work

The check was positive and in /etc/mkinitcpio.conf, i have added FILES=(/usr/lib/firmware/edid/dummy_2560_1600_120.edid)to the config and regenerated

Not sure why it’s not working

EDIT: I found this error *ERROR* Invalid firmware EDID "edid/dummy_2560_1600_120.edid"

This worked

  1. Capture clean EDID at boot: cp /sys/class/drm/card1-DP-1/edid ~/aw3425dw.bin
  2. Install as firmware override: sudo cp ~/aw3425dw.bin /lib/firmware/edid/aw3425dw.bin
  3. Add kernel parameter: drm.edid_firmware=DP-1:edid/aw3425dw.bin
  4. Rebuild initramfs: sudo mkinitcpio -P