Fedora 40, Nvidia GPU, Wayland, intermittent black screen with full screen applications

Hello,

I’m not seeing anyone else having this issue. As the topic title states, when running full screen applications (players, games, even browser media players) the screen will intermittently go black for a second or two. There are no messages of signal loss. The issue only appears in full screen.

With previous Nvidia GPU driver version it seemed to occur more frequently so I opted to wait for a new update and while that helped a bit, the issue is still present. After the update I did wait for good 20 minutes and then performed a reboot.

Thanks.

inxi -Fz
System:
  Kernel: 6.10.7-200.fc40.x86_64 arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.1.4 Distro: Fedora Linux 40 (KDE Plasma)
Machine:
  Type: Desktop Mobo: Micro-Star model: MAG B550 TOMAHAWK (MS-7C91) v: 2.0
    serial: <superuser required> UEFI: American Megatrends LLC. v: A.F0
    date: 10/19/2023
CPU:
  Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP cache: L2: 4 MiB
  Speed (MHz): avg: 2868 min/max: 2200/4426 cores: 1: 4273 2: 2200 3: 2048
    4: 2121 5: 2683 6: 4163 7: 4275 8: 2139 9: 2200 10: 2130 11: 2102 12: 2013
    13: 2854 14: 2143 15: 4276 16: 4279
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] driver: nvidia v: 560.35.03
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 24.1.2
    compositor: kwin_wayland driver: X: loaded: nvidia gpu: nvidia
    resolution: 2560x1440
  API: EGL v: 1.5 drivers: nvidia,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 560.35.03
    renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2
  API: Vulkan v: 1.3.290 drivers: N/A surfaces: xcb,xlib,wayland
Audio:
  Device-1: NVIDIA GP104 High Definition Audio driver: snd_hda_intel
  Device-2: AMD Starship/Matisse HD Audio driver: snd_hda_intel
  Device-3: SAVITECH SA9023 audio controller
    driver: hid-generic,snd-usb-audio,usbhid type: USB
  Device-4: Tenx USB AUDIO driver: hid-generic,snd-usb-audio,usbhid
    type: USB
  API: ALSA v: k6.10.7-200.fc40.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.7 status: active
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
  IF: enp6s0 state: down mac: <filter>
  Device-2: Realtek RTL8125 2.5GbE driver: r8169
  IF: enp42s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 10.92 TiB used: 3.92 TiB (35.9%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 980 PRO 2TB size: 1.82 TiB
  ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 1TB
    size: 931.51 GiB
  ID-3: /dev/sda vendor: Crucial model: CT2000BX500SSD1 size: 1.82 TiB
  ID-4: /dev/sdb vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB
  ID-5: /dev/sdc vendor: Seagate model: ST6000NM0115-1YZ110 size: 5.46 TiB
Partition:
  ID-1: / size: 58.76 GiB used: 20.62 GiB (35.1%) fs: ext4 dev: /dev/nvme1n1p5
  ID-2: /boot/efi size: 299.4 MiB used: 130 MiB (43.4%) fs: vfat
    dev: /dev/nvme1n1p3
  ID-3: /home size: 117.85 GiB used: 84.11 GiB (71.4%) fs: ext4
    dev: /dev/nvme1n1p6
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 53.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB available: 31.26 GiB used: 10.86 GiB (34.7%)
  Processes: 480 Uptime: 1h 47m Shell: Bash inxi: 3.3.34

Removed amd, pipewire, server

I have ran “journalctl --lines 500 --follow”, then entered in fullscreen mode, waited for 30 seconds for the screen to go to black and there was nothing showing up in the log at the time.

This may be caused by VRR, because many monitors report wrong range limits in their EDID data.
Quick test would be to disable VRR in kwin. Maybe it’s possible to override the reported range limits. Usually, setting the lower end of the range to 48Hz will prevent the monitor to blank for a few seconds.

OK, that could be the issue. I have freesync monitor that should also be turned on in Nvidia settings. I’ll check that out.


I toggled GLGSYNCAllowed off. That does not appear to change anything.


Display & Monitor > Adaptive sync → Never seems to obviate the issue.

I don’t use KDE plasma so I’m not sure if nvidia even use these settings with wayland!

Gnome disables VRR in the compositor, which can be overriden with gsettings.
With VRR enabled my monitor (freesync) also starts to blank out, because it support’s FHD@24hz (blue ray) but the freesync range starts at 48Hz and not 24Hz for this monitor.

KDE Plasma enables VRR by default. You may try to reproduce with X11.

https://wiki.archlinux.org/title/Variable_refresh_rate

Turning adaptive sync off resolves the problem. Which makes me think something is off with minimum FR detection, something that must have been introduced with some of the recent updates.

Any ideas how to set this thing manually?

Adaptive sync is another name for VRR = Variable refresh rate

see wiki link from my previous answer.
check EDID data, what the monitor reports as supported Freesync range.

If you have windows available then you can see this with cru = ‘Custom Resolution Utility’

Yes, I did check CRU. It says the valid range is 40-144. I have no reason to doubt this setting as it used to work very well up to some weeks ago.

My question for configuring the range was on the OS side. The wiki in 7.1.2. offers options for xorg. Are you aware of something equivalent for wayland? I searched yesterday, but could not find it. There is cornucopia of various issues, while I think my only problem here is telling the card about the minimum framerate under which it should not go.
I saw some guides on how to use nvidia settings application to obtain something similar, however nvidia setting applet on fedora is quite limited to the one available, for example, on Arch.

With wayland it is very limited. With xorg it provides much more info and control.

https://rubensolvang.com/2022/custom-monitor-resolution-on-wayland/
https://wiki.archlinux.org/title/Kernel_mode_setting

But I think the current nvidia drivers will disable VRR. I don´t need VRR so I simply leave it disabled for now in GNOME.

KDE should have some more options like kscreen-doctor? You can of course try to experiment in a X11 session if you install kwin-x11.

I have X11 installed and ready, there is no issue in X11.