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

Merge with nvidia-xrun-pm #94

Closed
michelesr opened this issue Feb 1, 2019 · 3 comments
Closed

Merge with nvidia-xrun-pm #94

michelesr opened this issue Feb 1, 2019 · 3 comments

Comments

@michelesr
Copy link
Contributor

Hello @Witko, I would like to thank you for your brilliant project. I've been working on a fork that basically removed bbswitch and added a systemd service for automatically shutdown the NVIDIA card at boot. I've seen now that you somehow removed bbswitch by using a similar approach so maybe it makes sense to have a look if my fork could be merged again into the main project.

Let me know your thoughts.

@michelesr
Copy link
Contributor Author

michelesr commented Feb 3, 2019

There's something I don't understand about your approach: you're basically using the BUS_ID variable (that by default maps to 0000:00:01.0 that is the PCIe controller bus id).

Removing the PCIe port from the kernel, at least in my system (Dell XPS 9570) seems to power the card back again... it's like a reset for the controller.

In my fork instead I make sure the power control for the controller is set to auto and to keep the card idle: you wouldn't really need the remove command on the PCIe controller to power the card off, but unfortunately unless you issue the remove command programs will be able to load the nvidia module again and turn the card on by side effect (for example GNOME shell does that, and X does that as well if you use the modesetting driver when running the Intel card).

So in my fork instead of removing the actual controller, I remove the card (0000:01:00.0) directly, and then set back the controller to auto in order to power save. That seems to work properly (the card is powered off all the time, and programs won't be able to load the nvidia module anymore). Before rescanning though, you need to turn the controller power state on on otherwise the card won't be detected.

I tried your version of the scripts but is giving me problems, like:

  • sometimes the modules won't load
  • sometimes the remove command on the controller just hangs till I reboot the system

EDIT: the system hangs because the modules don't get unloaded (see #95)

@michelesr
Copy link
Contributor Author

@Witko: any update on this?

@Witko
Copy link
Owner

Witko commented May 3, 2019

Hi @michelesr ,
thanks for your work. I had laptop issues(my Alienware R1 burned out) and it took some time to get a replacement. Now I'm a bit struggling with the new one - it has ACPI issues. So right now im still unable to test it. But i've merged the pull request as the change is obvious:)
Thanks again!!

@Witko Witko closed this as completed May 3, 2019
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