Bug 2232711 - disable KDE autosuspend in a VM (to avoid potential VM hang)
Summary: disable KDE autosuspend in a VM (to avoid potential VM hang)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: powerdevil
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F39BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2023-08-18 05:19 UTC by Jens Petersen
Modified: 2023-09-16 01:28 UTC (History)
12 users (show)

Fixed In Version: powerdevil-5.27.7-5.fc39 powerdevil-5.27.8-1.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-06 23:37:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE GitLab plasma powerdevil merge_requests 230 0 None opened profiledefaults: don't automataically suspend by default if running in a virtual machine 2023-09-01 19:59:21 UTC
KDE Software Compilation 473835 0 NOR UNCONFIRMED disable auto-suspend for VMs by default to avoid virtio hang 2023-08-28 07:54:21 UTC

Description Jens Petersen 2023-08-18 05:19:31 UTC
With virtio drivers KDE VM's currently hang when suspending (see bug 2232549).

To avoid this it would be better if KDE disabled auto-suspend in a VM,
which it is less useful anyway: GNOME 45 seems to do this now
(autosuspend is no longer even offered in its Power settings).

It should be possible to detect being run in a VM:
maybe just need to work out how gnome is doing this (gnome-settings-daemon?).

Reproducible: Always

Steps to Reproduce:
1. Boot up and login to default Fedora KDE Plasma session
2. Leave the desktop running idle for 15min

Actual Results:  
Desktop auto-suspends by default

If running in virt-manager for example, the system hangs hard and can only be reset.

(If run directly by qemu, the system does not hang and can wake out of sleep.)

Expected Results:  
Not auto-suspend for VM since this is susceptible to a system hang.

Comment 1 Neal Gompa 2023-08-18 05:25:38 UTC
Switched to powerdevil, as that's where power management is in KDE

Comment 3 Adam Williamson 2023-08-24 18:16:47 UTC
Proposing as a blocker on Jens' suggestion: we previously accepted https://bugzilla.redhat.com/show_bug.cgi?id=2232549 as a blocker, but it does seem more sensible to take *this* one as the blocker, as disabling auto-suspend on VMs is likely easier to implement than fixing the virtio suspend problem.

Comment 4 Adam Williamson 2023-08-27 16:12:47 UTC
+7 in https://pagure.io/fedora-qa/blocker-review/issue/1196 , marking accepted.

Comment 5 Jens Petersen 2023-08-28 07:08:17 UTC
Reported upstream in https://bugs.kde.org/show_bug.cgi?id=473835

Comment 6 Neal Gompa 2023-09-01 19:59:21 UTC
Upstream work in progress: https://invent.kde.org/plasma/powerdevil/-/merge_requests/230

Comment 7 Adam Williamson 2023-09-01 23:48:49 UTC
I think the current state of the PR looks good enough to give it a shot, and it's Friday before a holiday weekend after which there are only two days to go/no-go, so...I'm going to do it.

Comment 8 Fedora Update System 2023-09-02 01:09:26 UTC
FEDORA-2023-b527d83d26 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b527d83d26

Comment 9 Fedora Update System 2023-09-02 01:09:28 UTC
FEDORA-2023-bee52a0301 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-bee52a0301

Comment 10 Fedora Update System 2023-09-03 02:12:50 UTC
FEDORA-2023-b527d83d26 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b527d83d26`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b527d83d26

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-09-03 02:22:46 UTC
FEDORA-2023-bee52a0301 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-bee52a0301`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-bee52a0301

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-09-04 01:40:00 UTC
FEDORA-2023-bee52a0301 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-bee52a0301`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-bee52a0301

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-09-04 01:48:39 UTC
FEDORA-2023-b527d83d26 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b527d83d26`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b527d83d26

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Lukas Ruzicka 2023-09-04 12:56:14 UTC
With the above advisories installed, the KDE does not suspend even when left longer than the pre-defined inactivity limits. I believe the fix is verified.

Comment 15 Lukas Ruzicka 2023-09-04 13:13:19 UTC
After leaving the KDE VM in the background for a while, it suspended and cannot be woken up. Reset was necessary.

Comment 16 Adam Williamson 2023-09-04 14:47:10 UTC
How long is a while? Do the logs indicate why it suspended?

Comment 17 Adam Williamson 2023-09-04 17:53:54 UTC
from discussion on IRC it seems like Lukas didn't realize you need to create a new user account after installing the update (due to how KDE handles default settings), so his test wasn't valid. setting back to ON_QA for now.

Comment 18 Fedora Update System 2023-09-05 02:00:30 UTC
FEDORA-2023-b527d83d26 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b527d83d26`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b527d83d26

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2023-09-05 02:22:06 UTC
FEDORA-2023-bee52a0301 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-bee52a0301`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-bee52a0301

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Lukas Ruzicka 2023-09-05 12:01:42 UTC
Ok, now I have created a new user and indeed, the fix works as intended.

Comment 21 Fedora Update System 2023-09-06 23:37:47 UTC
FEDORA-2023-b527d83d26 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2023-09-16 01:28:46 UTC
FEDORA-2023-1710532efa has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.