Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Laptop won't wake from sleep (intermittent)

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Laptop won't wake from sleep (intermittent)

#1 Post by nickmdowson »

Hi,
I'm experiencing an issue waking from sleep on Debian, on a laptop, running KDE. Some of the time when I try and wake it nothing happens - screen remains off and unresponsive. I'm forced to hard restart the laptop.
Power button shows as on throughout, implying that the issue occurs during the suspend i.e. it never properly goes into sleep but crashes at this point.
I'm running Debian Stable - Bookworm - KDE Plasma 5.27.5 but the problem has been going on for a month or two now.
Laptop is Lenovo YOGA 520-14IKB
Graphics processor: Mesa Intel® HD Graphics 610

I have tried switching from X to Wayland and the problem is reproduced on both. But it's intermittent, it doesn't happen every time.
I wonder if it happens more when an external monitor is connect via HDMI but this is not conclusive.
I've tried different options for sleep to see if this makes a difference - e.g. from the ctrl-alt-delete suspend button, closing laptop lid, etc. But problem seems to occur with all options (possibly less frequently with the ctrl-alt-delete logout screen and then pressing suspend).

I've tried several of the options suggested on this Reddit post, but it hasn't solved it: https://www.reddit.com/r/kde/comments/1 ... ck_screen/
Try to disable systemd-logind's handler for handle lid close event.

Edit /etc/systemd/logind.conf file, change HandleLidSwitch and HandleLidSwitchExternalPower to ignore. Change LidSwitchIgnoreInhibited to no.

If these option is comment out(start with #), uncomment it then change the value.

Go to KDE's system setting panel → Power Management → Energy Saving, change Button events handling → When laptop lid closed to Do nothing. Change all the option in On AC, On battery and On low battery. Apply the setting, then change it back(Sleep, Hibernate or something else, depending on you default setting).
[/offtopic][/offtopic]

I've checked Debian and KDE bugtrackers but there is no clear match.
Grateful for any help to fix this!
Cheers

User avatar
yesh
Posts: 33
Joined: 2021-07-22 03:04
Has thanked: 4 times
Been thanked: 5 times

Re: Laptop won't wake from sleep (intermittent)

#2 Post by yesh »

Hi Nick, I had similar problems and tried many things, now its finally fixed. Here are some things to check first.

Check what mode/s of sleep are supported on your system, with this command:

Code: Select all

cat /sys/power/mem_sleep
Mostly this problem stems from ACPI issues due to buggy BIOS (Windows-centric) implementations. Check for these errors with this command:

Code: Select all

dmesg | grep ACPI\ Error
Post your results here.
Image Stable Xfce / HP Notebook 15 BS143TU / Intel® Core™ i5-8250U / 8GB DDR4 2400Mhz / 1 TB SATA / Intel® UHD Graphics 620 (1366x768 15.6")

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#3 Post by nickmdowson »

Hi Yesh,

Thanks for your help!

Code: Select all

cat /sys/power/mem_sleep
s2idle [deep]
Your second command returned nothing (I tried with sudo). Of course it's not possible for me to run this immediately after an error as the computer is totally unresponsive!

Searching dmesg just for acpi I found the following, among many other lines:
0.161707] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[ 0.272321] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration

Don't know if they would mean anything?
Cheers

User avatar
yesh
Posts: 33
Joined: 2021-07-22 03:04
Has thanked: 4 times
Been thanked: 5 times

Re: Laptop won't wake from sleep (intermittent)

#4 Post by yesh »

Hi Nick, if you have no ACPI errors, you are doing well. The 'dmesg' will provide clues to potential hardware/firmware issues.

Can you post also the output of:

Code: Select all

dmesg | grep ASPM
Image Stable Xfce / HP Notebook 15 BS143TU / Intel® Core™ i5-8250U / 8GB DDR4 2400Mhz / 1 TB SATA / Intel® UHD Graphics 620 (1366x768 15.6")

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#5 Post by nickmdowson »

Glad to hear it!

Just these:

Code: Select all

[    0.161707] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.271873] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.272321] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration

User avatar
yesh
Posts: 33
Joined: 2021-07-22 03:04
Has thanked: 4 times
Been thanked: 5 times

Re: Laptop won't wake from sleep (intermittent)

#6 Post by yesh »

OK. I suggest adding some kernel parameters which may help.

Edit file (as root):
/etc/default/grub

Add the 3 parameters in the line, as shown below:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="pcie_aspm=force nohibernate=1  acpi=copy_dsdt ..."
Save the file, then issue command as root:

Code: Select all

update-grub
Reboot, then test the Suspend functionality over the next week or so. Let us know how you go.


PS: You can see what kernel parameters do here:
https://www.kernel.org/doc/Documentatio ... meters.txt
Image Stable Xfce / HP Notebook 15 BS143TU / Intel® Core™ i5-8250U / 8GB DDR4 2400Mhz / 1 TB SATA / Intel® UHD Graphics 620 (1366x768 15.6")

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#7 Post by nickmdowson »

Thanks, will do!

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#8 Post by nickmdowson »

Hi,
So this seemed to help for a week or so but now i'm getting issues again. I've also re-enabled the sleep on lid close / sleep after a certain period options, so not sure if that had anything to do with it.
Tried running those codes again just now and got:

Code: Select all

sudo dmesg | grep ASPM
[    0.028841] PCIe ASPM is forcibly enabled
[    0.161754] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.273487] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.273905] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration
dmesg | grep ACPI\ Error returned nothing

The results from: dmesg | grep ACPI
included the following:

Code: Select all

[    0.205341] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.209114] ACPI: Dynamic OEM Table Load:
[    0.209114] ACPI: SSDT 0xFFFF9F7241134800 00060F (v02 PmRef  Cpu0Ist  00003000 INTL 20160527)
[    0.212266] ACPI: \_PR_.CPU0: _OSC native thermal LVT Acked
[    0.219785] ACPI: Dynamic OEM Table Load:
[    0.219795] ACPI: SSDT 0xFFFF9F724104BC00 0003FF (v02 PmRef  Cpu0Cst  00003001 INTL 20160527)
[    0.221404] ACPI: Dynamic OEM Table Load:
[    0.221413] ACPI: SSDT 0xFFFF9F7240CA9000 00065C (v02 PmRef  ApIst    00003000 INTL 20160527)
[    0.223097] ACPI: Dynamic OEM Table Load:
[    0.223104] ACPI: SSDT 0xFFFF9F724100AC00 00018A (v02 PmRef  ApCst    00003000 INTL 20160527)
[    0.229857] ACPI: EC: EC started
[    0.229858] ACPI: EC: interrupt blocked
[    0.230297] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.230300] ACPI: \_SB_.PCI0.LPCB.EC0_: Boot DSDT EC used to handle transactions
[    0.230302] ACPI: Interpreter enabled
[    0.230359] ACPI: PM: (supports S0 S3 S4 S5)
[    0.230360] ACPI: Using IOAPIC for interrupt routing
[    0.230413] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.236103] ACPI: Enabled 6 GPEs in block 00 to 7F
[    0.271315] ACPI: PM: Power Resource [FN00]
[    0.271443] ACPI: PM: Power Resource [FN01]
[    0.271567] ACPI: PM: Power Resource [FN02]
[    0.271689] ACPI: PM: Power Resource [FN03]
[    0.271842] ACPI: PM: Power Resource [FN04]
[    0.273479] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
[    0.293597] ACPI: PCI: Interrupt link LNKA configured for IRQ 11
[    0.293675] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
[    0.293749] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
[    0.293823] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
[    0.293900] ACPI: PCI: Interrupt link LNKE configured for IRQ 11
[    0.293972] ACPI: PCI: Interrupt link LNKF configured for IRQ 11
[    0.294045] ACPI: PCI: Interrupt link LNKG configured for IRQ 11
[    0.294117] ACPI: PCI: Interrupt link LNKH configured for IRQ 11
[    0.295363] ACPI: EC: interrupt unblocked
[    0.295365] ACPI: EC: event unblocked
[    0.295375] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.295376] ACPI: EC: GPE=0x50
[    0.295378] ACPI: \_SB_.PCI0.LPCB.EC0_: Boot DSDT EC initialization complete
[    0.295380] ACPI: \_SB_.PCI0.LPCB.EC0_: EC: Used to handle transactions and events
[    0.296141] PCI: Using ACPI for IRQ routing
[    0.328719] pnp: PnP ACPI init
[    0.333031] pnp: PnP ACPI: found 9 devices
[    0.351661] DMAR: ACPI device "device:73" under DMAR at fed91000 as 00:15.0
[    0.351667] DMAR: ACPI device "device:74" under DMAR at fed91000 as 00:15.1
[    0.351671] DMAR: ACPI device "device:75" under DMAR at fed91000 as 00:15.2
[    2.041596] ACPI: thermal: [Firmware Bug]: No valid trip found
[    2.041634] ACPI: thermal: [Firmware Bug]: No valid trip found
[    2.742276] ACPI: button: Lid Switch [LID0]
[    2.759188] ACPI: battery: Slot [BAT1] (battery present)
[    2.766879] ACPI: button: Power Button [PWRB]
[    2.782456] ACPI: button: Power Button [PWRF]
[    2.847144] ACPI: bus type USB registered
[    2.867808] ACPI: bus type drm_connector registered
[    3.988446] ACPI: video: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   20.987093] ACPI: AC: AC Adapter [ACAD] (off-line)
Is there anything else I can try?

User avatar
yesh
Posts: 33
Joined: 2021-07-22 03:04
Has thanked: 4 times
Been thanked: 5 times

Re: Laptop won't wake from sleep (intermittent)

#9 Post by yesh »

Hi, your situation has similarities to mine.

Try changing that first parameter (keep the other two), update-grub and reboot.

Replace this parameter:
pcie_aspm=force

With this:
pci=pcie_bus_perf

Command:

Code: Select all

update-grub
Reboot.

Then test again - do several suspends a day, as many as you like, to see if it holds. If it succeeds 50+ times, I would consider it solved.

Let us know how you go.
Image Stable Xfce / HP Notebook 15 BS143TU / Intel® Core™ i5-8250U / 8GB DDR4 2400Mhz / 1 TB SATA / Intel® UHD Graphics 620 (1366x768 15.6")

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#10 Post by nickmdowson »

Thanks, will try that!

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#11 Post by nickmdowson »

Unfortunately that hasn't solved it, problem reoccured pretty much straight away.
Not sure if this helps but in Dmesg/acpi I am now getting:

Code: Select all

[    0.271908] ACPI: PM: Power Resource [FN00]
[    0.272036] ACPI: PM: Power Resource [FN01]
[    0.272165] ACPI: PM: Power Resource [FN02]
[    0.272287] ACPI: PM: Power Resource [FN03]
[    0.272409] ACPI: PM: Power Resource [FN04]
[    0.274063] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
[    0.294411] ACPI: PCI: Interrupt link LNKA configured for IRQ 11
[    0.294488] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
[    0.294561] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
[    0.294634] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
[    0.294706] ACPI: PCI: Interrupt link LNKE configured for IRQ 11
[    0.294778] ACPI: PCI: Interrupt link LNKF configured for IRQ 11
[    0.294850] ACPI: PCI: Interrupt link LNKG configured for IRQ 11
[    0.294922] ACPI: PCI: Interrupt link LNKH configured for IRQ 11
[    0.296149] ACPI: EC: interrupt unblocked
[    0.296151] ACPI: EC: event unblocked
[    0.296161] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.296162] ACPI: EC: GPE=0x50
[    0.296164] ACPI: \_SB_.PCI0.LPCB.EC0_: Boot DSDT EC initialization complete
[    0.296166] ACPI: \_SB_.PCI0.LPCB.EC0_: EC: Used to handle transactions and events
[    0.296887] PCI: Using ACPI for IRQ routing

and also

Code: Select all

   2.036106] ACPI: thermal: [Firmware Bug]: No valid trip found
2.036144] ACPI: thermal: [Firmware Bug]: No valid trip found

	
Anything else I can do?

User avatar
yesh
Posts: 33
Joined: 2021-07-22 03:04
Has thanked: 4 times
Been thanked: 5 times

Re: Laptop won't wake from sleep (intermittent)

#12 Post by yesh »

Sad to hear. As I'm no expert with these type of issues, I could only glean clues which helped solve it for me, which took months - it's been faultless for weeks now.

I would watch the power and hard-drive LEDs when going to sleep, and it looked to me like the failures where occuring because of some delay. So I tried various things to try to speed-up and make it easier.

These commands may give you clues:

Code: Select all

dmesg
journalctl -b | grep suspend
journalctl -b -1
This is what worked for me...

Installed 'RT' kernel:

Code: Select all

apt install linux-headers-rt-amd64 linux-image-rt-amd64
Added these parameters to /etc/default/grub

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="pci=pcie_bus_perf nohibernate=1 acpi=copy_dsdt ..."

# update-grub
Edited /etc/systemd/sleep.conf

Code: Select all

[Sleep]
AllowSuspend=yes
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
SuspendState=mem freeze
This issue originally began for me, around the update of kernel 6.1.0-13. I still don't know why. The first thing I tried was a BIOS update, but this made no difference. Then I just kept experimenting with 'fixes', until settling on the above.

Hope you can solve your issue, as I know how frustrating it can be. I use suspend feature many times each day, and it's good to know that it is reliable - not frozen and requiring reboot.

Perhaps some more Debian-mature users may make suggestions here...
Image Stable Xfce / HP Notebook 15 BS143TU / Intel® Core™ i5-8250U / 8GB DDR4 2400Mhz / 1 TB SATA / Intel® UHD Graphics 620 (1366x768 15.6")

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#13 Post by nickmdowson »

Hi Yesh,
Thanks for all your help with it - much appreciated.

I think my problem occured around a similar time to yours.
I seem to have the rt kernel installed already.. I guess I could try either downgrading the kernel, or upgrading it to one from backports (but maybe that will create issues rolling it back, etx)

I've changed the sleep.conf settings to what you suggest. All mine were commented out initially.

I do wonder if the issue is also occuring for me after the system turns off for energy saving... and I wonder if it is happening more when sleeping after closing the laptop. But haven't found any consistent pattern.

greythorne
Posts: 2
Joined: 2024-03-25 03:17

Re: Laptop won't wake from sleep (intermittent)

#14 Post by greythorne »

is your problem solved?

I am having the exact same issue as you but mine is an Intel NUC Skylake 6th gen CPU. When it goes to sleep, no matter what i tried the desktop wont wake up. Neither mouse or keyboard would wake the system up. The NUC's power LED is blinking yellow in colour. The only way for me is to force shutdown by pressing the power button.

Any help would be much appreciated.

Thanks.

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#15 Post by nickmdowson »

It has seemed better the last few days, but my problem is intermittent so it's too early to tell if it's sorted. I'll update here if any more developments or if solved.
Maybe try working through the suggestions above one by one and see where you get to?

nickmdowson
Posts: 85
Joined: 2013-08-18 22:24

Re: Laptop won't wake from sleep (intermittent)

#16 Post by nickmdowson »

My problem is still not fixed unfortunately! May have to look at a different kernel.

Post Reply