Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save lmonkiewicz/4dc795f1190dcde7a92176485f86646a to your computer and use it in GitHub Desktop.

Select an option

Save lmonkiewicz/4dc795f1190dcde7a92176485f86646a to your computer and use it in GitHub Desktop.
Disabling dGPU on Dell XPS 9560 on Ubuntu 16.10
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment