How Can I Turn off the DGPU?

Even though this is not a particularly hardware specific question, here is a link to the HCL for hardware specs.

I love this laptop for Qubes, but I have 2 problems. It runs hot and uses a lot of power. I’m trying to decrease temps and power consumption by turning off the DGPU.

I’ve managed to ‘hide’ the DGPU from dom0 in GRUB with rd.qubes.hide_pci=03:00.0 following instructions from here but I don’t see any improvement in temps or battery life. I think it’s still receiving full voltage even though it’s hidden from dom0.

Is there any way to actually cut power to the DGPU?

1 Like

https://wiki.archlinux.org/title/hybrid_graphics#Fully_power_down_discrete_GPU

1 Like

I looked through the linked Arch documentation and tried some of those suggestions, replacing nouveau with radeon because I have an AMD GPU, but that had no effect.

Unfortunately, there is no toggle to disable the dedicated GPU in the BIOS either.

I tried adding radeon.modset=0 rd.driver.blacklist=radeon video=vesa:off in grub as suggested here but that had no effect either.

On non-Qubes Linux I use the MUX switch provided by asus-linux/asusctl but it depends on asus-nb-wmi which has been deliberatly omitted from Qubes for security reasons.

I feel like the answer is right in front of my face, but I can’t see it.

1 Like

I have the same problem. My system runs too hot when using Qubes, even when it’s not doing much.

I hope the developers improve this. There are options to change power in dom0 but they have never helped much.

1 Like

Here is the lspci output for my DGPU:

03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6650 XT / 6700S / 6800S] [1002:73ef] (rev c2)
	Subsystem: ASUSTeK Computer Inc. Device [1043:1dec]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

It looks like somebody has figured out how to do it with a udev rule on similar hardware:
https://bbs.archlinux.org/viewtopic.php?id=292457

Following the same suggestions that @apparatus linked.

I still need some help though. I don’t really know how to write udev rules, or custom tailor them to my specific hardware.

1 Like

@dispuser Where are the power options in Dom0 that you’re referring to? Can you use them to cut power to othe DGPU?

1 Like

Check the output of this command:

udevadm info -q property -p /sys/bus/pci/devices/0000:03:00.0

Specifically PCI_CLASS property.
Then add the same udev rule as in your link:

ACTION=="add", \
  KERNEL=="0000:03:00.0", \
  SUBSYSTEM=="pci", \
  ATTR{class}=="0x03[0-9]*", \
  ATTR{power/control}="auto", \
  ATTR{remove}="1"

But change:

ATTR{class}=="0x03[0-9]*", \

According to your GPU PCI_CLASS property.
Maybe also try to add pci_stub=1002:73ef as a kernel parameter.

1 Like

Thank you. I’ve been trying that. The class I think is the missing piece of the puzzle. I’ve run:

[wahcha@dom0 ~]$ udevadm info -q property -p /sys/bus/pci/devices/0000:03:00.0
DEVPATH=/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0
DRIVER=amdgpu
PCI_CLASS=30000
PCI_ID=1002:73EF
PCI_SUBSYS_ID=1043:1DEC
PCI_SLOT_NAME=0000:03:00.0
MODALIAS=pci:v00001002d000073EFsv00001043sd00001DECbc03sc00i00
SUBSYSTEM=pci
USEC_INITIALIZED=25426685
ID_PCI_CLASS_FROM_DATABASE=Display controller
ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
ID_MODEL_FROM_DATABASE=Navi 23 [Radeon RX 6650 XT / 6700S / 6800S]
[wahcha@dom0 ~]$ 

But I still don’t know what to change my class to.

1 Like

You have the same PCI_CLASS so try to use the same udev rule without any change.

1 Like

I did. It boot loops. Tried setting pci_stub=1002:73ef at grub, but still bootlooping.

1 Like

I think I might have got it. I set pci-stub.ids=1002:73ef from here in grub and got past the boot loop. Now my dgpu is no longer showing with the sensors command or in lspci.

There is no noticeable improvement in temps or battery life though. If anything, it’s running hotter now. Since that pci device is no longer visable to dom0, I have no way to check and confirm if it’s still getting voltage or not :confused:

1 Like

I’m going to end up cutting the blue wires again…

1 Like