wrong acpi_call sent at boot, how to disable discrete graphic card?

Bug #1973633 reported by Jeremy Lapierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi to the Ubuntu team,

--------------------
Key info:
MSI Delta 15 A5EFK laptop
dual boot Ubuntu 22.04 LTS/Windows 11
Ubuntu 5.15.0-27.28-generic 5.15.30
hybrid graphic cards: AMD RX6700M + AMD Radeon 8 Graphics Renoir (in AMD Ryzen 9 5900HX)
open source amdgpu drivers
--------------------

I tried to combined one bug report with one related question hoping this is fine.

-The bug-
I've noticed the following error when booting on my ubuntu partition:

[ 0.649628] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCIO.GP17.MP2], AE_NOT_FOUND (20210730/psargs-330)
[ 0.650162] ACPI Error: Aborting method \_SB.GPIO._EVT due to previous error (AE_NOT_FOUND) (20210730/psparse-529) /dev/nvme0n1p6: clean, 219896/6725632 files, 3948761/26880000 blocks

I did not really worried about that first. But then when I wanted to reduce my battery draining on my ubuntu partition (half of the battery life on my windows partition for similar usage) I've seen that disabling my discrete graphic card could be one thing to try to reduce power consumption. So I thought about using (i) acpi_call as stated or (ii) vga_switcheroo as stated in https://help.ubuntu.com/community/HybridGraphics . However, for (i) I need to know the correct calls to send to ACPI and my latptop is not listed here: https://hybrid-graphics-linux.tuxfamily.org/index.php?title=ACPI_calls and obviously the call that the kernel is trying to send at boot (for whatever reason) is also wrong. For (ii) I think that vga_switcheroo is also using acpi_call under the hood to disable the discrete graphic card. Which leads now to:

-Question-
Can I use vga_switcheroo knowing that my kernel is sending false acpi_call? I just want to be really sure about what I'm doing here because the doc states to modifiy the grub config and I'm really not confortable with dealing with the boot manager knowing the above bug. Is there a way to find the correct ACPI call?
Adittional output asked by the doc:
mustang@MSI:~$ sudo grep -i switcheroo /boot/config-*
/boot/config-5.15.0-25-generic:CONFIG_VGA_SWITCHEROO=y
/boot/config-5.15.0-27-generic:CONFIG_VGA_SWITCHEROO=y

Thank you for you help,
Best regards,
Jeremy
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2022-05-08 (8 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
MachineType: Micro-Star International Co., Ltd. Delta 15 A5EFK
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-27-generic root=UUID=78719e21-6069-4e4d-b5a1-a64916f89efe ro quiet splash acpi_backlight=vendor vt.handoff=7
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
RelatedPackageVersions:
 linux-restricted-modules-5.15.0-27-generic N/A
 linux-backports-modules-5.15.0-27-generic N/A
 linux-firmware 20220329.git681281e4-0ubuntu3
Tags: jammy
Uname: Linux 5.15.0-27-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 10/28/2021
dmi.bios.release: 1.5
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: E15CKAMS.105
dmi.board.asset.tag: Default string
dmi.board.name: MS-15CK
dmi.board.vendor: Micro-Star International Co., Ltd.
dmi.board.version: REV:1.0
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 10
dmi.chassis.vendor: Micro-Star International Co., Ltd.
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrE15CKAMS.105:bd10/28/2021:br1.5:svnMicro-StarInternationalCo.,Ltd.:pnDelta15A5EFK:pvrREV1.0:rvnMicro-StarInternationalCo.,Ltd.:rnMS-15CK:rvrREV1.0:cvnMicro-StarInternationalCo.,Ltd.:ct10:cvrDefaultstring:sku15CK.1:
dmi.product.family: Delta
dmi.product.name: Delta 15 A5EFK
dmi.product.sku: 15CK.1
dmi.product.version: REV:1.0
dmi.sys.vendor: Micro-Star International Co., Ltd.

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1973633

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected jammy
description: updated
Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : AudioDevicesInUse.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : CRDA.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : IwConfig.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : Lspci.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : Lspci-vt.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : Lsusb.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : Lsusb-t.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : Lsusb-v.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : PaInfo.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : ProcEnviron.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : ProcModules.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : PulseList.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : RfKill.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : UdevDb.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : WifiSyslog.txt

apport information

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote : acpidump.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

The acpi_call is totally unnecessary. What's the purpose? For more powersaving?

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

Yes as I said I ignored this error first (I did not even know what this meant). But then I experienced very low battery life on my ubuntu partition so I dug into that problem and learned that disabling my discrete graphic card could be an option. Doing so involves knowing the correct acpi_call to send it directly or via vga_switcheroo which I guess will send this same false call that the kernel is sending at boot.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

[ 5.835732] amdgpu 0000:03:00.0: amdgpu: Using BOCO for runtime pm

Please attach output of `cat /sys/bus/pci/devices/0000:03:00.0/power_state`.

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

Sure, here is the output of `cat /sys/bus/pci/devices/0000:03:00.0/power_state`:
D0

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks. Please attach output of
`grep . /sys/bus/pci/devices/0000:03:00.0/power/*`

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

here is the output of: `grep . /sys/bus/pci/devices/0000:03:00.0/power/*` :

/sys/bus/pci/devices/0000:03:00.0/power/async:enabled
/sys/bus/pci/devices/0000:03:00.0/power/autosuspend_delay_ms:5000
/sys/bus/pci/devices/0000:03:00.0/power/control:auto
/sys/bus/pci/devices/0000:03:00.0/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:03:00.0/power/runtime_active_time:8029428
/sys/bus/pci/devices/0000:03:00.0/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:03:00.0/power/runtime_status:active
/sys/bus/pci/devices/0000:03:00.0/power/runtime_suspended_time:1519
/sys/bus/pci/devices/0000:03:00.0/power/runtime_usage:2
/sys/bus/pci/devices/0000:03:00.0/power/wakeup:disabled

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Thanks! That means the dGPU is not runtime suspended, so it's draining the power all the time.

Can you please again attach the output of
`cat /sys/bus/pci/devices/0000:03:00.1/power_state`
`grep . /sys/bus/pci/devices/0000:03:00.1/power/*`

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

Here are the outputs:

mustang@MSI:~$ cat /sys/bus/pci/devices/0000:03:00.1/power_state
D0
mustang@MSI:~$ grep . /sys/bus/pci/devices/0000:03:00.1/power/*
/sys/bus/pci/devices/0000:03:00.1/power/async:enabled
/sys/bus/pci/devices/0000:03:00.1/power/autosuspend_delay_ms:0
/sys/bus/pci/devices/0000:03:00.1/power/control:auto
/sys/bus/pci/devices/0000:03:00.1/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:03:00.1/power/runtime_active_time:656490
/sys/bus/pci/devices/0000:03:00.1/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:03:00.1/power/runtime_status:active
/sys/bus/pci/devices/0000:03:00.1/power/runtime_suspended_time:11048
/sys/bus/pci/devices/0000:03:00.1/power/runtime_usage:0
/sys/bus/pci/devices/0000:03:00.1/power/wakeup:disabled

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

(I ran out of battery so I had to reboot between the first `grep . /sys/bus/pci/devices/0000:03:00.1/power/*` and the 2nd one)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Is there any external monitor connected?

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

Yes, one to my dGPU and one to my integrated GPU, but the battery life is not so different with and without I think (when traveling, the battery life is also terrible compared to when I'm on my windows partition for which I can get ~9h of autonomy, but maybe it's just MSI and windows softwares that are very well optimized for my laptop, MSI really pushed forward the battery life on this model). I can still do a proper check though, I'll keep you in touch in the next week.

Revision history for this message
Jeremy Lapierre (alchemist2401) wrote :

I tried to use my MSI laptop with and without external displays, with battery saver mode + wifi disabled (ethernet connection) + Bluetooth disabled; and the battery life I have from 60% to 10% is of 1h55min with external monitors and of 2h28min without. So no drastic difference, here are the outputs of `cat /sys/bus/pci/devices/0000:03:00.1/power_state` and `grep . /sys/bus/pci/devices/0000:03:00.1/power/*` without external displays:

mustang@MSI:~/mnt/gwdg$ cat /sys/bus/pci/devices/0000:03:00.1/power_state
D0
mustang@MSI:~/mnt/gwdg$ grep . /sys/bus/pci/devices/0000:03:00.1/power/*
/sys/bus/pci/devices/0000:03:00.1/power/async:enabled
/sys/bus/pci/devices/0000:03:00.1/power/autosuspend_delay_ms:0
/sys/bus/pci/devices/0000:03:00.1/power/control:auto
/sys/bus/pci/devices/0000:03:00.1/power/runtime_active_kids:0
/sys/bus/pci/devices/0000:03:00.1/power/runtime_active_time:18655975
/sys/bus/pci/devices/0000:03:00.1/power/runtime_enabled:enabled
/sys/bus/pci/devices/0000:03:00.1/power/runtime_status:active
/sys/bus/pci/devices/0000:03:00.1/power/runtime_suspended_time:19568
/sys/bus/pci/devices/0000:03:00.1/power/runtime_usage:0
/sys/bus/pci/devices/0000:03:00.1/power/wakeup:disabled

I can also do a test with my windows partition if you wish, but I know I have ~9 to 10h of battery life from a 100% charge with battery saver mode, I don't think we'll ever match what I get with ubuntu atm. It's really a shame that MSI does not work more closely with linux distributions for those new high end laptops... (btw the keyboard backlight cannot be turned off on ubuntu neither, I have (i) to boot on windows, (ii) disable keyboard backlight with MSI center tool and (iii) reboot on my ubuntu partition. I've already tried almost everything proposed on the web).

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

So it's because the audio part of the discrete GFX is not runtime suspended.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you please give more recent kernel a try:
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.18.4/amd64/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.