-
-
Save jordi-t/a740f6a3fb0d18064e26dc66f9be4f1d to your computer and use it in GitHub Desktop.
| # Tested with kernel: 4.9.20-040920-generic | |
| # | |
| # Make sure to install following packages | |
| # | |
| sudo apt install acpi acpi-call-dkms | |
| # | |
| # To manually disable, you can run the following command | |
| # | |
| echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call # via root | |
| echo '\_SB.PCI0.PEG0.PEGP._OFF' | sudo tee /proc/acpi/call # via your own user | |
| # | |
| # To automate on startup, do the following: | |
| # | |
| echo acpi_call > /etc/modules-load.d/acpi_call.conf | |
| # Create /usr/lib/systemd/user/dgpu-off.service with the following contents: | |
| [Unit] | |
| Description=Power-off dGPU | |
| After=graphical.target | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/bin/sh -c "echo '\\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call" | |
| [Install] | |
| WantedBy=graphical.target | |
| # Enable the new unit file | |
| systemctl enable /usr/lib/systemd/user/dgpu-off.service |
@jseris I think this line https://gist.github.com/jseris/a740f6a3fb0d18064e26dc66f9be4f1d#file-disable-dgpu-xps9560-ubuntu-1610-L12 should have \ in front missing
@quentin-sommer you are correct, I have updated the gist with your correction. Thanks 👍
@jseris first off, thanks a ton for writing this up - very useful for those who don't want to use bumblebee but still want to disable the GPU. I can confirm that this also works for Ubuntu 16.04.4. There is just one thing left, for some reason when I boot up I get stuck at a black screen unless I add the following kernel parameter nouveau.modeset=0. Since I have blacklisted the module I don't understand why this would still be necessary (and would of course prefer to avoid doing this). Any advice/pointers are appreciated.
@jseris Thanks for sharing! Much cleaner solution than what I had been using.