Laptop GPU order reversed from normal causes boot_vga/drm issues
I recently picked up an ASUS GA605W series laptop which comes with a Strix-Point, plus NVIDIA RTX.
The major issue is that the nvidia dGPU is being marked as boot_vga
and this appears to cause issues with anything that reads that attribute to determine if the GPU selected might be primary or iGPU.
A secondary issue and one I'm not sure will be easily fixed without coordination with all affected projects (such as system76 cosmic) is that the dGPU is the first GPU, and some projects just accept that as the primary/iGPU regardless. In the case of cosmic it results in crash since the dGPU does not have DRM enabled. DRM disabled is a work around that also prevents NVIDIA outputs working - so it seems that the issue might need to be tackled on two fronts; desktops, and driver level.
My lspci
(trimmed) is:
65:00.0 VGA compatible controller: NVIDIA Corporation AD106M [GeForce RTX 4070 Max-Q / Mobile] (rev a1)
65:00.1 Audio device: NVIDIA Corporation AD106M High Definition Audio Controller (rev a1)
66:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Strix [Radeon 880M / 890M] (rev c1)
66:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
66:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Device 17e0
66:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 151e
66:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 70)
66:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
I added some debug print to vga_is_boot_device()
Oct 09 22:35:13 kernel: vgaarb: vga_is_firmware_default(pdev): 0
Oct 09 22:35:13 kernel: vgaarb: cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY): 0
(the end of the vga_is_boot_device() is reached with `if (!boot_vga)` == true)
Oct 09 22:35:13 kernel: pci 0000:65:00.0: vgaarb: setting as boot VGA device
The full log (without the debug print added) is ga605w-boot-dgpu
And attribute boot_vga
is 1
for Nvidia.
The above prevents the dGPU from ever suspending if a desktop is used. In a TTY it will suspend find.