Hey everyone,
I'm trying to figure out an annoying issue with the NVIDIA GTX 1060 in my Surface Book 2.
I'm running Omarchy (Arch-based) with the Linux Surface kernel, and the GPU works perfectly as long as I don't detach the screen. nvidia-smi detects it, the driver loads normally, everything is fine.
The problem starts as soon as I detach the screen and attach it again. The GPU is still detected by lspci, but the NVIDIA driver is no longer bound to it, nvidia-smi says No devices were found, and the NVIDIA render node disappears.
I checked the kernel logs and found this:
pcieport 0000:00:1c.4: pciehp: Slot(4): Link Down
pcieport 0000:00:1c.4: pciehp: Slot(4): Card not present
[drm] [nvidia-drm] [GPU ID 0x00000200] Removing device
[drm] [nvidia-drm] [GPU ID 0x00000200] Unloading driver
NVRM: Attempting to remove device 0000:02:00.0 with non-zero usage count!
This looks very similar to NVIDIA issue #1451, which describes a deadlock when hot-unplugging a GPU in a detachable Surface Book base.
My setup:
- Surface Book 2
- NVIDIA GTX 1060 Mobile (Pascal)
- Intel UHD 620
- Omarchy / Arch Linux
- Linux Surface kernel
7.2.15-arch1-1-surface - NVIDIA proprietary driver
580.178.04 - Hyprland / UWSM
- Surface DTX daemon installed and running
I noticed that Hyprland has open handles to /dev/nvidia0, /dev/nvidiactl and the NVIDIA render node before detachment.
I also looked into the workaround proposed in issue #1451, involving RMForceExternalGpu=1. Unfortunately, my driver package only contains the proprietary RM binary, so I don't have the source files needed to apply that patch. And since the GTX 1060 is Pascal, switching to the open NVIDIA kernel modules isn't an option either.
Has anyone managed to get the NVIDIA GPU working properly after detaching and reattaching the screen on a Surface Book 2?
I'm particularly interested in whether there's a safe way to unload the driver before detachment, or whether anyone has found a workaround using DTX, PCI power management or ACPI.
I'd really like to keep using the detachable GPU instead of having to disable it.Hey everyone,I'm trying to figure out an annoying issue with the NVIDIA GTX 1060 in my Surface Book 2.I'm running Omarchy (Arch-based) with the Linux Surface kernel, and the GPU works perfectly as long as I don't detach the screen. nvidia-smi detects it, the driver loads normally, everything is fine.The problem starts as soon as I detach the screen and attach it again. The GPU is still detected by lspci, but the NVIDIA driver is no longer bound to it, nvidia-smi says No devices were found, and the NVIDIA render node disappears.I checked the kernel logs and found this:pcieport 0000:00:1c.4: pciehp: Slot(4): Link Down
pcieport 0000:00:1c.4: pciehp: Slot(4): Card not present
[drm] [nvidia-drm] [GPU ID 0x00000200] Removing device
[drm] [nvidia-drm] [GPU ID 0x00000200] Unloading driver
NVRM: Attempting to remove device 0000:02:00.0 with non-zero usage count!This looks very similar to NVIDIA issue #1451, which describes a deadlock when hot-unplugging a GPU in a detachable Surface Book base. My setup:Surface Book 2
NVIDIA GTX 1060 Mobile (Pascal)
Intel UHD 620
Omarchy / Arch Linux
Linux Surface kernel 7.2.15-arch1-1-surface
NVIDIA proprietary driver 580.178.04
Hyprland / UWSM
Surface DTX daemon installed and runningI noticed that Hyprland has open handles to /dev/nvidia0, /dev/nvidiactl and the NVIDIA render node before detachment.I also looked into the workaround proposed in issue #1451, involving RMForceExternalGpu=1. Unfortunately, my driver package only contains the proprietary RM binary, so I don't have the source files needed to apply that patch. And since the GTX 1060 is Pascal, switching to the open NVIDIA kernel modules isn't an option either.Has anyone managed to get the NVIDIA GPU working properly after detaching and reattaching the screen on a Surface Book 2?I'm particularly interested in whether there's a safe way to unload the driver before detachment, or whether anyone has found a workaround using DTX, PCI power management or ACPI.I'd really like to keep using the detachable GPU instead of having to disable it.