Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program / daemon hang when system76-power graphics power off under certain determined circumstances #448

Open
DFINITYManu opened this issue Feb 26, 2025 · 0 comments

Comments

@DFINITYManu
Copy link

If anything at all has the NVIDIA card open when that command is invoked, both the CLI command and the daemon will hang forever, and the daemon will become unkillable. This is true even in compute mode.

The kernel log says something to the effect of

Feb 26 18:22:12 adder kernel: NVRM: Attempting to remove device 0000:01:00.0 with non-zero usage count!

In my case, for the command to ever succeed, I needed to:

  • stop the ollama service
  • stop the nvidia-persistenced.service
  • stop the nvidia-powerd.service
  • kill my user session's Xwayland

How did I know I had to do this? lsof /dev/nvidia0.

I recommend your daemon implement a preemptive check doing exactly that command, and then erroring out notifying the user that so-and-so processes have the NVIDIA card open, and therefore it is not possible to power the card off.

Also recommend better error handling when the daemon is rmmoding things, checking for errors and also checking for whether the operation has hung.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant