What is waking my dGPU?

Hey gang!

I'm using the newly released Asus Flow X16. There is a community build around writing custom software for Asus Laptops; I am using the custom kernel and ctls they have developed. (thats why some of my inxi info looks alien).

I am using Garuda Dragonized Gaming 2.6.6-1, installed with Nouveau drivers w/ manually installed Nvidia drivers.
Doing this, I was able to achieve all the functionality of Garuda and asusctl, EXCEPT for gpu-switching into integrated mode specifically.

I've ruled it down to something scanning the PCI bus and waking the dGPU, but have no idea what it is.

Does anyone have any idea what it might be? I'm a college student and could really use the extra battery life.

Thanks in advance.

Obligatory garuda-inxi:

System:
  Kernel: 5.19.4-arch1-g14-1 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: ibt=off pm_debug_messages amd_pmc.enable_stb=1
    amd_pmc.dyndbg="+p" acpi.dyndbg="file drivers/acpi/x86/s2idle.c +p"
    BOOT_IMAGE=/@/boot/vmlinuz-linux-g14
    root=UUID=ce89ec47-6e0e-4cd5-9604-f44d17ebdb7f rw [email protected]
    quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=d5202c9f-8eca-4719-9469-62dc3af19619 loglevel=3
    nvidia-drm.modeset=1
  Console: pty pts/0 wm: kwin_x11 DM: SDDM Distro: Garuda Linux
    base: Arch Linux
Machine:
  Type: Convertible System: ASUSTeK product: ROG Flow X16 GV601RM_GV601RM
    v: 1.0 serial: <filter>
  Mobo: ASUSTeK model: GV601RM v: 1.0 serial: <filter> UEFI: American
    Megatrends LLC. v: GV601RM.303 date: 05/13/2022
Battery:
  ID-1: BAT0 charge: 87.2 Wh (100.0%) condition: 87.2/90.0 Wh (96.9%)
    volts: 16.0 min: 16.0 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
    status: discharging
  Device-1: hid-0018:04F3:2FC3.0007-battery model: ELAN9008:00 04F3:2FC3
    serial: N/A charge: N/A status: N/A
CPU:
  Info: model: AMD Ryzen 7 6800HS with Radeon Graphics socket: FP7 bits: 64
    type: MT MCP arch: Zen 3+ gen: 4 built: 2022 process: TSMC n6 (7nm)
    family: 0x19 (25) model-id: 0x44 (68) stepping: 1 microcode: 0xA404101
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 3571 high: 4785 min/max: 400/4785 boost: enabled
    base/boost: 3200/4750 scaling: driver: amd-pstate governor: performance
    volts: 1.2 V ext-clock: 100 MHz cores: 1: 3168 2: 3167 3: 3168 4: 3161
    5: 3168 6: 3168 7: 3169 8: 4785 9: 3169 10: 3168 11: 4785 12: 3167
    13: 3169 14: 4785 15: 3168 16: 4785 bogomips: 102247
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: ASUSTeK
    driver: nvidia v: 515.65.01 alternate: nvidia_drm non-free: 515.xx+
    status: current (as of 2022-07) arch: Ampere code: GAxxx process: TSMC n7
    (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 8 link-max:
    lanes: 16 ports: active: none empty: DP-6,HDMI-A-2,eDP-2 bus-ID: 01:00.0
    chip-ID: 10de:2520 class-ID: 0300
  Device-2: AMD Rembrandt [Radeon 680M] vendor: ASUSTeK driver: amdgpu
    v: kernel arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22
    pcie: gen: 4 speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: DP-1,
    DP-2, DP-3, DP-4, DP-5, HDMI-A-1 bus-ID: 09:00.0 chip-ID: 1002:1681
    class-ID: 0300
  Device-3: Quanta USB2.0 HD UVC WebCam type: USB driver: uvcvideo
    bus-ID: 5-1:2 chip-ID: 0408:30c3 class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1600 s-dpi: 96 s-size: 677x423mm (26.65x16.65")
    s-diag: 798mm (31.43")
  Monitor-1: eDP-1 mapped: eDP model: AU Optronics 0x8e9d built: 2021
    res: 2560x1600 hz: 165 dpi: 189 gamma: 1.2 size: 344x215mm (13.54x8.46")
    diag: 406mm (16") ratio: 16:10 modes: max: 2560x1600 min: 640x480
  OpenGL: renderer: AMD YELLOW_CARP (LLVM 14.0.6 DRM 3.47
    5.19.4-arch1-g14-1) v: 4.6 Mesa 22.1.7 direct render: Yes
Audio:
  Device-1: NVIDIA GA106 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 8
    link-max: lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228e class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 09:00.1 chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: ASUSTeK
    driver: snd_pci_acp6x v: kernel
    alternate: snd_pci_acp3x,snd_rn_pci_acp3x,snd_pci_acp5x,snd_sof_amd_renoir
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 09:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-4: AMD Family 17h/19h HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 09:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.19.4-arch1-g14-1 running: yes
  Sound Server-2: PulseAudio v: 16.1 running: no
  Sound Server-3: PipeWire v: 0.3.57 running: yes
Network:
  Device-1: MEDIATEK vendor: AzureWave driver: mt7921e v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 port: N/A bus-ID: 06:00.0 chip-ID: 14c3:7922
    class-ID: 0280
  IF: wlp6s0 state: up mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device type: USB driver: btusb v: 0.8
    bus-ID: 1-4:3 chip-ID: 13d3:3568 class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 953.87 GiB used: 42.63 GiB (4.5%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron
    model: 3400 MTFDKBA1T0TFH size: 953.87 GiB block-size: physical: 512 B
    logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: P7MA001 temp: 27.9 C scheme: GPT
  SMART: yes health: PASSED on: 16 hrs cycles: 30 read-units: 1,848,844
    [946 GB] written-units: 796,141 [407 GB]
Partition:
  ID-1: / raw-size: 937.19 GiB size: 937.19 GiB (100.00%) used: 42.63 GiB
    (4.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 608 KiB
    (0.2%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 937.19 GiB size: 937.19 GiB (100.00%) used: 42.63
    GiB (4.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-4: /var/log raw-size: 937.19 GiB size: 937.19 GiB (100.00%) used: 42.63
    GiB (4.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-5: /var/tmp raw-size: 937.19 GiB size: 937.19 GiB (100.00%) used: 42.63
    GiB (4.5%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 14.89 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 16.38 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 45.2 C mobo: N/A gpu: amdgpu temp: 43.0 C
  Fan Speeds (RPM): cpu: 0
Info:
  Processes: 399 Uptime: 8m wakeups: 6 Memory: 14.89 GiB used: 4.19 GiB
  (28.2%) Init: systemd v: 251 default: graphical tool: systemctl
  Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pacman: 2007 lib: 554
  Shell: garuda-inxi (sudo) default: Bash v: 5.1.16 running-in: yakuake
  inxi: 3.3.20
e[1;34mGaruda (2.6.6-1):e[0m
e[1;34m  System install date:e[0m     2022-09-03
e[1;34m  Last full system update:e[0m 2022-09-06
e[1;34m  Is partially upgraded:  e[0m No
e[1;34m  Relevant software:      e[0m NetworkManager
e[1;34m  Windows dual boot:      e[0m No/Undetected
e[1;34m  Snapshots:              e[0m Snapper
e[1;34m  Failed units:           e[0m 

Hmm, it looks like you succeeded though.

2 Likes

My graphics platform is indeed the iGPU, but the dGPU is needlessly on and drawing power.

How are you determining your GPU is not going to sleep? This is default functionality in Garuda Linux and I feel it's quite pointless to debug this as a distro issue given that:

You know?

4 Likes

If you are probing the GPU with nvidia-smi, System Monitor, nvtop or something similar, the GPU will stay on. This is how I check if GPU is drawing power:

  • Unplug power source.
  • Start powertop.
  • Go to its "tunables" section and set all entries related to Nvidia to "good"
  • Go to default tab where you can see the rate of watts used
  • Wait 1 min
  • Start nvtop. If power draw increases, the GPU is sleeping. (and you woke it up)
2 Likes

I was told by an Asus-kernel dev that I should use systemctl | grep "01:00\."and if I see any devices, that means my dGPU is awake.

I should've made this a bit more clear in my initial question.

Is there any known package/software that ships with Garuda Dragonized Gaming that would probe my PCI bus?

No, you asked your question correctly. Please check https://xyproblem.info.
I don't know what else to tell you thank that this doesn't happen on a default dr460nized install (tested by reading the sysfs power state entry). I don't have a dr460nized-gaming install anywhere so I can't help answer that question.