glxgears has a black screen with PRIME Render Offload

Can’t really tell whats wrong with the configuration since I don’t really know. Vulkan works after patching the paths in the icd files. glmark2 also ends up with a black screen as well. The actual setup for the GPU itself seem to be fine, since the output NVIDIA-G0 was created and the GPU initializes in low-power mode. The bug report can be found here [1].

Issue on Github [2].


That nixos stuff is confusing. That one doesn’t look correct in terms of libglvnd: => /nix/store/mlxbm6hyg1d5nrzfqv1vx114b7bcy14m-libGL-1.0.0/lib/ should end up at effectively. Maybe check for that.

Bumped libglvnd to 1.1.1 and can verify exists. Rebuilding the entire system right now because it seems libglvnd looks like a base dependency for a lot of things so it’ll be a while before I can verify whether that was the issue.

Doesn’t seem like it fixed the issue, now points to but I still get a black screen. Using the script below as the offloading command (nvidia-offload) and tried without it but no differences were seen in the behavior. Updated the gist with the strace output of glxgears and a refreshed nvidia-bug-report.log.

export __VK_LAYER_NV_optimus=NVIDIA_only
exec -a "$0" "$@"

There’s a drm error in dmesg, might point to mesa being used on the nvidia gpu so an incomplete glvnd setup. For debugging purposes, I’d recommend to disable nvidia drm kms, i.e. nvidia-drm.modeset=0

[   17.030836] Call Trace:
[   17.030841]  nv_drm_atomic_helper_disable_all+0xaa/0x250 [nvidia_drm]
[   17.030842]  nv_drm_master_drop+0x25/0x60 [nvidia_drm]
[   17.030847]  drm_drop_master+0x28/0x40 [drm]
[   17.030850]  drm_master_release+0x91/0xb0 [drm]
[   17.030853]  drm_file_free.part.5+0x2e2/0x2f0 [drm]
[   17.030858]  drm_release+0x46/0x80 [drm]
[   17.030861]  __fput+0xba/0x230
[   17.030864]  task_work_run+0x8a/0xb0
[   17.030866]  do_syscall_64+0x39b/0x3ee
[   17.030868]  entry_SYSCALL_64_after_hwframe+0x44/0xa9

appears even when I use PRIME sync and still appears even when explicitly disabling modeset through the kernel parameter. Like before, still getting a black screen. I’ll try to cross compare things from sync to the offload setup and see if I can pinpoint the problem from there.