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

Systemd service file only works if GPU is plugged in at startup #121

Open
WhyNotHugo opened this issue Jun 3, 2019 · 5 comments
Open

Systemd service file only works if GPU is plugged in at startup #121

WhyNotHugo opened this issue Jun 3, 2019 · 5 comments

Comments

@WhyNotHugo
Copy link
Contributor

Given that this only runs one and exits, the systemd service only turns of the GPU if it's plugged in during startup.

If I turn on my laptop, and plug in the GPU a minute later, then the service will have already exited, and has no effect.

I believe that is should actually linger in background, or somehow monitor new devices being plugged in to work properly.

@michelesr
Copy link
Contributor

michelesr commented Jun 3, 2019 via email

@WhyNotHugo
Copy link
Contributor Author

I'm using an eGPU, which stays on my desk, but go back and forth with my laptop.

@michelesr
Copy link
Contributor

Oh yeah, eGPU. Didn't know you could do that in GNU/Linux too. I'd say that given that the PM logic on nvidia-xrun relies primarily on device add/remove, that daemon could clash with it quite easily if not implemented in the right way.

Meanwhile, isn't there a way to physically turn the card off (like a switch or simply unplugging maybe)? Because you can simply set ENABLE_PM=0 and turn off the card when it's not used.

@WhyNotHugo
Copy link
Contributor Author

WhyNotHugo commented Jun 3, 2019

The case itself provides power to the laptop and the PCI-E data over the same cable, so turning it off means I'd start to run on battery (it's also a USB hub as well).

I'd actually like to turn off the video card because it's quite noisy when not being used too (as well as wasting power).

@michelesr
Copy link
Contributor

I understand. Right now the only way is to restart the systemd service or run the command manually (as root user):

$ TURN_GPU_OFF_ONLY=1 /usr/bin/nvidia-xrun

Maybe you can hook this to a udev rule?

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

2 participants