GBM does not work with Hyprland/Sway, games have FPS drops below 30 every few mins

I have a laptop with an Intel UHD 630 and NVIDIA GTX 1660Ti with NVIDIA PRIME offloading set up. Plugging in a monitor works fine and I can use it, except if I try to use NVIDIA GBM backend with GBM_BACKEND=nvidia-drm, Hyprland/Sway crashes. I’m on Arch Linux with kernel 6.5.9-zen2-1-zen and NVIDIA driver version 535.113.01, using Hyprland since Sway has flickering issues. Here’s a relevant Hyprland issue which might have some more details: #1878.

Also, my FPS drops down below 30 every few minutes in most games on my external monitor. Didn’t used to have this issue before when I was only using my laptop monitor. Temperatures seem to be staying the same as it used to be with only the laptop monitor so it can’t be thermal throttling, although I do not know of a way to confirm it for sure. Thought it might be some weird issue with PRIME so I tried running external monitor on only NVIDIA card using WLR_DRM_DEVICES=/dev/dri/card1 to pick the NVIDIA card which I got the same results with. Nothing much else I’ve found that I can try, so creating a bug report which hopefully helps fix this.

nvidia-bug-report.log.gz (643.7 KB)

Update: Without WLR_DRM_DEVICES=/dev/dri/card0 (it changed since I did a full reinstall) Hyprland and Sway both crash when the GBM backend is enabled but currently with sway-git and WLR_DRM_DEVICES=/dev/dri/card0, Sway does not crash. However, Hyprland still crashes with or without the variable if I try to enable the GBM backend. Sway does crash if I am not exclusively using the NVIDIA GPU using WLR_DRM_DEVICES=/dev/dri/card0.

Update 2: Hyprland and Sway no longer crashes with GBM_BACKEND=nvidia-drm as of NVIDIA driver version 545.29.02 with or without WLR_DRM_DEVICES=/dev/dri/card0. However, the FPS drops remain.

Update 3: Tried my best to confirm that my CPU was not thermal throttling by disabling thermald daemon and auto-cpufreq, then trying throttled to make sure my CPU is not being throttled early. Still having the FPS drops on both Hyprland and Sway, regardless of whether WLR_DRM_DEVICES=/dev/dri/card0 variable is present or not.

Nevermind, I’m dumb. CPU was indeed thermal throttling, had zero FPS drops when I tried disabling BD PROCHOT. It was kinda weird that it only happened when external monitor was plugged in and since it didn’t happen on Windows I went ahead and assumed it wasn’t related to throttling but now it’s all fine.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.