32
submitted 11 months ago* (last edited 11 months ago) by shaked_coffee@feddit.it to c/linux@lemmy.ml

UPDATE:

After some more testing, trying to disable one by one the entries on proc/acpi/wakeup and comparing them with the output of lspci, I think I found out that the problem is related with the PCIE components that idk why send a wake-up signal to the system every time it enters sleep mode. As a temporary fix, I created a service that runs a script to disable those four lines every time I start / reboot the system, waiting for a proper fix in a future kernel update. Here are the two files I created:

/etc/systemd/system/disable-PCIE-wakeup.service:

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/disable-PCIE-wakeup.sh

[Install]
WantedBy=multi-user.target

/usr/local/bin/disable-PCIE-wakeup.sh:

#!/bin/sh
for i in $(cat /proc/acpi/wakeup | grep RP | grep enabled | grep S4 | awk '{print $1}'); 
  do 
    echo $i > /proc/acpi/wakeup; 
  done

(and after creating those files, I enabled the new service with sudo systemctl enable disable-PCIE-wakeup.service)


ORIGINAL POST:

Some time ago I posted on Fedora Discussion because my Fedora system (MSI Summit e16 flip running Fedora 38) started having problems with sleep mode after a kernel update (actually, starting from kernel 6.3.x and with all later versions).

Unfortunately I didn't receive that many replies there, so I tried to troubleshoot by myself and I found out that what's causing this problem is probably an internal device of the laptop that is supposed to be used to wake up the laptop from sleep (like the touchpad or the fingerprint reader? idk) and that instead is misfunctioning and waking it up immediately after it reached the sleep state. I'm saying so because I tried to temporarily disable all the lines in /proc/acpi/wakeup using this simple script below that I found somewhere online and, after doing that until the next time I reboot, the laptop stays asleep as expected.

So now my question is: how do I isolate which device is causing the problem? And how can I permanently fix this issue? I suspect that the problematic device could be the fingerprint reader since it was unsupported up until Fedora 38 and doesn't still work properly since it keeps forgetting the fingerprints I add... is there a way for me to disable it completely and try to see if it fixes the issue?

(I’m not sure about if this is the proper place to ask questions like this, or if I should report this issue somewhere else, since it seems more a kernel issue. Recommendations about better place to ask it are welcomed 🙃)

top 9 comments
sorted by: hot top controversial new old
[-] burtek@programming.dev 4 points 11 months ago

Have same issue with my LMDE, so interested in what answers you'll receive here cause it might be something similar on my side

[-] cerement@slrpnk.net 4 points 11 months ago

recently switched from Nvidia to AMD graphics card and now my desktop won’t go to sleep – I haven’t had any luck on a fix yet, but I stumbled across How To Suspend Pop!_OS in the process which described the same steps of working through /proc/acpi/wakeup and showed how to make the fix permanent if you’re working with systemd

[-] shaked_coffee@feddit.it 1 points 11 months ago

Thank you! I'll check it out and see if I can turn it into a permanent fix

[-] Pat@kbin.run 3 points 11 months ago

Having a similar problem on endeavour os. When I try to sleep or hibernate it gives it a shot but I get a quick flash of a message about a device preventing sleep. Nothing plugged into the laptop, no fancy built in accessories.

[-] SpaceNoodle@lemmy.world 2 points 11 months ago

Plenty of boring built-in components are connected via USB.

[-] fratermus@lemmy.sdf.org 1 points 11 months ago

I get a quick flash of a message about a device preventing sleep

In my case it was the NIC. Not using it so I disabled it in BIOS and sleep started working again.

[-] treadful@lemmy.zip 3 points 11 months ago

I would also love to know if this is logged somewhere to be able to narrow it down. One of my Arch installs keeps waking up and killing the battery and shutting off overnight. Been pretty frustrating.

[-] shaked_coffee@feddit.it 1 points 11 months ago

I've tried to look at kernel logs opening journalctl -f or sudo dmsg -H -W before suspending the system but I'm not an expert and I didn't found anything weird to me. It just seems that immediately after the sleep state was reached I asked the system to wake up

[-] treadful@lemmy.zip 1 points 11 months ago

If there was anything relevant, it would be logged during waking up, not before suspending. Mine doesn't wake as immediate as yours, but the cause might be the same.

this post was submitted on 06 Aug 2023
32 points (97.1% liked)

Linux

45530 readers
1188 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS