[SOLVED] BSPWM - Debugging Nvidia Driver

Good day to all. Been having weird issues with the graphic’s driver as of late. Let me explain.

Have a laptop with an Nvidia GPU, as well as the integrated Intel driver, for which I use EnvyControl to switch between them.

When running on the Intel driver all seems to work fine. However, when using the Hybrid options to switch GPUs, the desktop will freeze, workspaces become unresponsive.

When using only the Nvidia driver, seems to work fine, but the BSPWM workspaces don’t seem to work at all, launching all applications under 1 workspace it seems.

Question is: what could be causing this? Used to work fine up until a recent Nvidia update.

Here’s some hardware info:

Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Dell
    driver: i915 v: kernel arch: Gen-9.5 bus-ID: 00:02.0
  Device-2: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
    bus-ID: 1-12:4
  Display: x11 server: X.Org v: 21.1.18 driver: X: loaded: intel
    unloaded: fbdev,modesetting,vesa dri: i965 gpu: i915
    resolution: 3840x2160~60Hz
  API: EGL v: 1.5 drivers: iris,swrast platforms:
    active: gbm,x11,surfaceless,device inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.2.1-arch1.2
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel UHD Graphics 630 (CFL
    GT2)
  Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings
    gpu: nvidia-settings,nvidia-smi x11: xdpyinfo, xprop, xrandr

Please help me fix the issue. I’ll gladly provide more logs when asked.

Upon further inspection did notice that I didn’t have a proper xorg.conf under /etc/X11

Ran the command: sudo nvidia-xconfig

And that generated the necessary parameters to run on Hybrid Mode. So far so good.

Still can’t figure out how to make it work flawlessly using the Nvidia mode, since all the workspaces disappear from screen, but will keep on digging.

For some reason the output did not show any Nvidia GPU device.

Could you show the full output of command

nvidia-inst --test

Please install nvidia-inst if it isn’t installed yet.

2025-08-31 19:25:38: Note: 01:00.0 3D controller [0302]: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] [10de:1f91] (rev a1)
2025-08-31 19:25:38: Note: Currently installed packages related to Nvidia:
2025-08-31 19:25:38:       cuda 12.9.1-2
2025-08-31 19:25:38:       cudnn 9.11.0.98-3
2025-08-31 19:25:38:       egl-gbm 1.1.2.1-1
2025-08-31 19:25:38:       egl-wayland 4:1.1.20-1
2025-08-31 19:25:38:       egl-x11 1.0.3-1
2025-08-31 19:25:38:       envycontrol 3.5.2-1
2025-08-31 19:25:38:       lib32-nvidia-utils 580.76.05-1
2025-08-31 19:25:38:       libvdpau 1.5-3
2025-08-31 19:25:38:       libxnvctrl 580.76.05-1
2025-08-31 19:25:38:       linux-firmware-nvidia 20250808-1
2025-08-31 19:25:38:       nvidia 580.76.05-7
2025-08-31 19:25:38:       nvidia-inst 25.7.2-1
2025-08-31 19:25:38:       nvidia-prime 1.0-5
2025-08-31 19:25:38:       nvidia-settings 580.76.05-1
2025-08-31 19:25:38:       nvidia-utils 580.76.05-4
2025-08-31 19:25:38:       opencl-nvidia 580.76.05-4
2025-08-31 19:25:38: Info: nvidia-inst version 25.7.2-1
2025-08-31 19:25:38: Info: Command line: nvidia-inst --test
2025-08-31 19:25:38: Info: Selected mode: nvidia (Nvidia's open source)
2025-08-31 19:25:38: Info: Installing packages: nvidia-open-dkms nvidia-hook
2025-08-31 19:25:38: Info: Removing packages: nvidia nvidia-prime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMMANDS TO RUN:
    pacman -Rs --noconfirm --noprogressbar --nodeps nvidia nvidia-prime
    pacman -Syuq --noconfirm --noprogressbar --needed nvidia-open-dkms nvidia-hook
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You could remove package nvidia and then install
nvidia-open since the latter is recommended for your GPU. Hope that helps.

Correct, the suggested driver would be the open one, however it doesn’t support D3 power management for laptops, which is a bummer, hence why I’m using the proprietary one instead.

If I may ask, is there a better solution for managing Optimus graphics?

As a fellow BSPWM and dual GPU user, your post caught my eye!

Do you require active GPU switching, or just when running graphically intense applications like games? If the later, I’d suggest using NVIDIA “prime render offload”, and invoke prime-run for specific applications.

For what it’s worth, I’m using nvidia-dkms.

I can provide you more information with my set up depending on your interest.

There are many alternatives, see e.g. https://wiki.archlinux.org/title/NVIDIA and
https://wiki.archlinux.org/title/NVIDIA_Optimus.

  • envycontrol
  • optimus-manager (and the -git version)
  • supergfxctl
  • nvidia-prime

to mention a few.
I don’t have experience enough to tell which is better.

1 Like

Oh for sure! Used to run Optimus to control both intel/nvidia gpus but that was cumbersome, and switched to EncyControl for an easier solution, but now I’m also running into issues where the Nvidia gpu will act up and freeze the screen, or black screens after boot and so on.

Share some tips if you can to help a brother out.

I have the defunct Intel NUC 11 desktop computer with Intel Xe and RTX 2060 Mobile GPU. My monitor is connected via Thunderbolt/USB-C which is directly to the integrated Intel GPU. Once I figured out the kernel modules, command-line parameters, and modprobe configuration, the nVIDIA sits quietly in the background waiting when needed for Vulkan. I don’t use a greeter so I login at text prompt, then run startx.

When I first obtained the computer, I made a post about my issue getting nVIDIA to work.

Here’s some relevant information about my setup:

$ inxi -G
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile] driver: nvidia
    v: 580.76.05
  Display: x11 server: X.Org v: 21.1.18 with: Xwayland v: 24.1.8 driver: X:
    loaded: modesetting,nvidia dri: iris gpu: i915 resolution: 2560x1440~60Hz
  API: EGL v: 1.5 drivers: iris,nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 25.2.1-cachyos1.6
    renderer: Mesa Intel Iris Xe Graphics (TGL GT2)
  API: Vulkan v: 1.4.321 drivers: nvidia,intel surfaces: N/A
  Info: Tools: api: eglinfo, glxinfo, vulkaninfo
    gpu: nvidia-settings,nvidia-smi wl: nwg-displays
    x11: xdpyinfo, xprop, xrandr

My effective X11 config:

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

Section "OutputClass"
    Identifier  "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection


Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    ModulePath "/usr/lib/nvidia/xorg"
EndSection

Section "ServerLayout"
    Identifier  "layout"
    Screen      0  "Thunderbolt"
    Option      "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier  "intel"
    Driver      "modesetting"
    BusID       "PCI:0:2:0"
EndSection

Section "Device"
    Identifier  "nvidia"
    Driver      "nvidia"
    BusID       "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier  "Thunderbolt"
    Device      "intel"
    Option      "TripleBuffer" "on"
EndSection

My xrandr

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 4 associated providers: 1 name:modesetting
Provider 1: id: 0x216 cap: 0x2, Sink Output crtcs: 4 outputs: 3 associated providers: 1 name:NVIDIA-G0

And /etc/kernel/cmdline (I’m using systemd-boot and dracut):

nvme_load=YES nowatchdog rw root=UUID=.... systemd.unit=multi-user.target \
nvidia-drm.fbdev=1 \
nvidia-drm.modeset=1 \
nvidia-drm.NVreg_EnableGpuFirmware=1 \
nvidia-drm.NVreg_RegistryDwords=RMIntrLockingMode=1 \
nvidia-drm.NVreg_RegistryDwords=RmEnableAggressiveVblank=1  \
verbose loglevel=3

(NOTE: Formatted for the sake of this post. Not valid unless all on one line in the file.)

Some of these items may not be necessary or deprecated now. But once I had things working I generally have left everything “set and forget”!

Here are my installed nVIDIA packages:

yay -Qs nvidia | grep "^local" | sort
local/egl-gbm 1.1.2.1-1.1
local/egl-wayland 4:1.1.20-1.1
local/egl-x11 1.0.3-1.1
local/lib32-libvdpau 1.5-3
local/lib32-nvidia-utils 580.76.05-2
local/libnvidia-container 1.17.8-1.1
local/libva-nvidia-driver 0.0.14-1.1
local/libvdpau 1.5-3.1
local/libxnvctrl 580.76.05-2
local/linux-firmware-nvidia 1:20250808-1
local/nvidia-container-toolkit 1.17.8-1.1
local/nvidia-dkms 580.76.05-4
local/nvidia-hook 1.5.2-1
local/nvidia-inst 25.7.2-1
local/nvidia-prime 1.0-5
local/nvidia-prime-rtd3pm 1.1-1
local/nvidia-settings 580.76.05-2
local/nvidia-utils 580.76.05-4
local/nvtop 3.2.0-1.1
local/opencl-nvidia 580.76.05-4

Let me know if there’s anything specific you want to see.

1 Like

So you only use PRIME to handle hybrid graphics? Think I might just switch to that, as it seems like the less hassle-free option out there.

1 Like

Yes. I wanted Intel to be used for the majority of time to reduce power if I wasn’t intending on doing anything graphically intense (e.g. gaming, watching 2K/4K videos).

Here’s something I adapted from the 580 release feedback & discussion of the NVIDIA Developer Forum, to show which GPU is handling OpenGL for example.

Intel GPU:

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Iris(R) Xe Graphics (TGL GT2) (0x9a49)
    Version: 25.2.2
    Accelerated: yes
    Video memory: 63933MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Iris(R) Xe Graphics (TGL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.2.2-cachyos1.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.2.2-cachyos1.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 25.2.2-cachyos1.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

nVIDIA GPU:

$ prime-run glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 6144 MB
    Total available memory: 6144 MB
    Currently available dedicated video memory: 5728 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 2060/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 580.82.09
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 580.82.09
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 580.82.09
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

I don’t know the details of your laptop, but you should confirm the NVIDIA hardware is in fact accessible through the default screen output, versus from an external monitor.

Once you have the kernel drivers loading properly the xrandr command I mentioned earlier should show you which devices are available to X windows.

Also, I just noticed that you have a little older NVIDIA card, so you may be forced to using the open or nouveau modules now. The “nvidia-inst --drivers" command will tell you if official drivers can be used.

Did a deep purge of all Nvidia drivers, utils, settings, and other conflicting apps (looking at you Optiums). In the end, chose to run Nividia-Prime as it is intended, and have had no issues ever since.

Guess the trick is to install the correct drivers, and let them be.