Re: [BUG] MECHREVO Yilong15Pro GM5HG7A: lid switch causing unwanted s2idle wakeups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/3/25 11:23 AM, aprilgrimoire wrote:
Hi!
Opening or closing the lid causes my laptop Yilong15Pro GM5HG7A to wake up from s2idle, similar to the symptom described in

https://community.frame.work/t/tracking-waking-from-sleep-when-plugged-in-amd-k-ubuntu-22-04/44168

This issue for Framework 13 has been fixed in

https://lore.kernel.org/platform-driver-x86/20231212045006.97581-5-mario.limonciello@xxxxxxx/

For me specifically, two interrupts appear on such unwanted wakeups: IRQ1 and IRQ7. IRQ1 is the lid switch, with DRIVER==button. IRQ7 has SUBSYSTEM==serio and DRIVER==amd_gpio. I tried some workarounds and got to disable IRQ1, but IRQ7 doesn't support disabling and the issue persists.

I did some modifications to the kernel code:

----- drivers/platform/x86/amd/pmc/pmc.c

static int amd_pmc_wa_irq1(struct amd_pmc_dev *pdev)
{
         ...
         if (device_may_wakeup(d)) {
                 dev_info_once(d, "Disabling IRQ1 wakeup source to avoid platform firmware bug\n");
                 disable_irq_wake(1);
                 dev_warn(d, "Also disabling IRQ7!!! This is bad practice!!! Remove after testing IMMEDIATELY!!!");
                 disable_irq_wake(7);
                 device_set_wakeup_enable(d, false);
         }
         ...
}

----- drivers/platform/x86/amd/pmc/pmc-quirks.c
         ...
         {
                 .ident = "MECHREVO Yilong15Pro Series GM5HG7A",
                 .driver_data = &quirk_spurious_8042,
                 .matches = {
                         DMI_MATCH(DMI_SYS_VENDOR, "MECHREVO"),
                         DMI_MATCH(DMI_PRODUCT_NAME, "Yilong15Pro Series GM5HG7A"),
                         /* Not matching BIOS version: MECHREVO doesn't support Linux officially, so no expectation of them fixing the bios. */
                 }
         },
         ...

But IRC7 cannot be disabled:

(base) ➜  ~ echo disabled | sudo tee /sys/kernel/irq/7/wakeup
Password:
tee: /sys/kernel/irq/7/wakeup: Permission denied

In dsdt.dsl, I also nuked some code about the lid state and changed all SharedAndWake to Shared, however it didn't work either.

Mechrevo officially only supports Windows, and this lid issue doesn't appear on Windows. Does this indicate this issue can be workaround in the driver level? What can be done next?

Thanks!

Hi,

Can you please reproduce the issue using 'amd-s2idle' from https://pypi.org/project/amd-debug-tools/ ?

Basically install the wheel, run 'amd-s2idle test'. When prompted how long, set it for ~20 seconds. Then wait for the LED to flash and close the lid and it should wake up and generate a report.

This will capture a lot of artifacts about the problem in the report and we can go from there on next steps. Ideally if you can put the report on a new issue here and tag me (@superm1): https://gitlab.freedesktop.org/drm/amd/-/issues
We can iterate back and forth on it to come up with the best solution.

Thanks,




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux