Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop goes to sleep but actively wakes up after a few seconds of sleeping #1928

Open
nicknamenamenick opened this issue Nov 26, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@nicknamenamenick
Copy link
Contributor

Describe the bug

I can suspend my desktop manually, but if it suspends on its own then it never actually sleeps. It wakes up repeatably and I know by system sounds that KDE Plasma makes when it happens.

What did you expect to happen?

I expect the computer to go into sleep mode when I am away for the default KDE Plasma suspend time.

Output of rpm-ostree status

● ostree-image-signed:docker://ghcr.io/ublue-os/bazzite:stable
                   Digest: sha256:e4abb77ebd9a30e64ebac3aa6da1cd62a5c277b04cf16a456b18a0fdc65c80fd
                  Version: 41.20241118.2 (2024-11-19T02:56:07Z)

Hardware

Operating System: Bazzite 41
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.8-305.bazzite.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 3 5300G with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon RX 5500
Manufacturer: HP
Product Name: HP Pavilion Gaming Desktop TG01-2xxx

Extra information or context

This is a prebuilt HP PC... Don't judge me! 😆

@dosubot dosubot bot added the bug Something isn't working label Nov 26, 2024
@arantes555
Copy link

Seeing the same with a custom built PC

Processor: 5700X3D
RAM: 32 GiB
GPU: AMD Radeon RX 6700
MoBo: Gigabyte B550M DS3H (rev. 1.7)

@nicknamenamenick
Copy link
Contributor Author

I think Aurora does this too which probably means it's a KDE Plasma 6 bug, but keeping it open here for traction.

@arantes555
Copy link

For me, this only happens with the 5700x3D. It does not happen when I switch it to a 5600G.

@arantes555
Copy link

(I also tried resetting the BIOS to defaults, does not help)

@Voyded
Copy link

Voyded commented Dec 11, 2024

Hi,
I've signed in just to shed some light on the problem.
It's a bug on Gigabyte motherboards caused by PCI bridge sending a wake signal right after suspend and crashing the board.
I have fixed it on Arch in the past by creating a service that would block it, however I'm not sure how to achieve it on Bazzite.
I'll troubleshoot it further tomorrow, here's the post that led me to solution previously.
https://bbs.archlinux.org/viewtopic.php?id=284401

@arantes555
Copy link

@Voyded Thank you ! Looks like the problem described there is not exactly equivalent, as what we are seeing is not a complete system freeze when entering sleep, only an instant wake up. I'll try your solution to disable GPP0 and GPP8 also. Not sure i'll be able to automate it with a systemd service on bazzite, being immutable and all (maybe with a user service instead of a system one ?), but it will at least allow us to confirm that this is the cause.

@Voyded
Copy link

Voyded commented Dec 11, 2024

You can narrow down what's waking up your PC by trial and error, if it happens to be caused by something else.
Disable a single device with wake enabled from cat /proc/acpi/wakeup output and suspend to test.

@Voyded
Copy link

Voyded commented Dec 11, 2024

Managed to create a service that automates GPP0 & GPP8 disable for me.

cd /etc/systemd/system
sudo touch gpp-disable.service
sudo nano gpp-disable.service

Content of custom service:

[Unit]
Description=Prevent system from waking immediately after suspend

[Service]
ExecStartPre=/bin/sh -c '/bin/echo GPP0 > /proc/acpi/wakeup'
ExecStart=/bin/sh -c '/bin/echo GPP8 > /proc/acpi/wakeup'
Type=oneshot

[Install]
WantedBy=multi-user.target

With oneshot type I believe you can use multiple lines of ExecStart, but this is how I did it.

To enable run these commands:
sudo systemctl daemon-reload
sudo systemctl enable --now gpp-disable.service

Reboot and check output of cat /proc/acpi/wakeup.

voyd@192:~$ cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
GP12	  S4	*enabled   pci:0000:00:07.1
GP13	  S4	*enabled   pci:0000:00:08.1
XHC0	  S4	*enabled   pci:0000:0b:00.3
GP30	  S4	*disabled
GP31	  S4	*disabled
PS2K	  S3	*disabled
GPP0	  S4	*disabled  pci:0000:00:01.1
GPP8	  S4	*disabled  pci:0000:00:03.1
SWUS	  S4	*enabled   pci:0000:07:00.0
SWDS	  S4	*enabled   pci:0000:08:00.0
PTXH	  S4	*enabled   pci:0000:02:00.0
PT20	  S4	*disabled
PT21	  S4	*disabled
PT22	  S4	*enabled   pci:0000:03:02.0
PT23	  S4	*disabled
PT24	  S4	*enabled   pci:0000:03:04.0
PT26	  S4	*disabled
PT27	  S4	*disabled
PT28	  S4	*enabled   pci:0000:03:08.0
PT29	  S4	*disabled

In case GPP0 & GPP8 is not the issue, replace it with correct device in ExecStart line of the service.
I'm not entirely sure if this is going to stick after updates, but will find out once new OS updates are released.

@arantes555
Copy link

@Voyded thank you So much for your detailed comments ! Sleep now works for me :D

Looks like GPP0 was enough for me, I did not need to disable GPP8.

Thank you again !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants