Bug 2232549 - VM running KDE Plasma hangs after idle a while
Summary: VM running KDE Plasma hangs after idle a while
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-17 10:29 UTC by Jens Petersen
Modified: 2023-08-17 20:34 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jens Petersen 2023-08-17 10:29:24 UTC
I have been seeing this for a while in the last months.

KDE VM seems to hang hard after a while idle.
It completely locks and can only be hard reset.

Reproducible: Always

Steps to Reproduce:
1. Boot current Fedora 39 (or Rawhide) KDE Plasma Live image in virt-manager
2. Leave the liveuser session running idle for some time (maybe ~10min +-).
3.
Actual Results:  
System seems to hang with console cursor showing in top left corner.

Expected Results:  
No hang expected

Comment 1 Steve Cossette 2023-08-17 11:00:59 UTC
Some tests I made on this:

1- This only happens on the publically released F38 iso (https://download.fedoraproject.org/pub/fedora/linux/releases/38/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-38-1.6.iso) but does not happen on the August respin iso, which leads me to think it got fixed since release.

2- The way I tested this is to download the publically released f38 iso, and adding it in a VM in virt-manager. Not sure it matters, but I gave it 8gb of ram and 80gb hard drive.

3- To repro this, you don't even need to install fedora, simply boot the livecd and let it sit on the desktop for 20-30minutes. It'll go to sleep and never come back. (Screen will show that the graphical console has been disconnected, but the VM is still running)

Comment 2 Steve Cossette 2023-08-17 11:03:22 UTC
Just for additional clarification, on the public f38 iso, once it goes to sleep, you wont be able to bring it back. Move the mouse over the VM window, press keys, try to bring up other TTYs, nothing will work.

On the respin livecd, once it goes to sleep, it'll come back just by moving the mouse over the window (as expected).

Comment 3 Steve Cossette 2023-08-17 12:48:24 UTC
Nevermind, it happens on the f38 respin iso too.

Basically, launch the live cd, and go in power management settings. Change the "Suspend the system after 15 minutes" to 1 minute and wait.

I waited 2-3 minutes and the screen was frozen solid.

Comment 4 Geraldo Simião 2023-08-17 13:56:59 UTC
After some testing we found that it is something related to the VM video drivers at virt-manager:

=> virtio (default) -> freeze
=> virtio (with 3d acceleration enabled and openGL) -> freeze
=> VGA -> returns ok from sleep
=> QXL -> returns ok from sleep



This behavior is consistent both on live sessions VMs and installed system VMs, and both release gold iso (Fedora-KDE-Live-x86_64-38-1.6.iso) and last respin tested (F38-KDE-x86_64-LIVE-20230816.iso)
All VMs where UEFI

I tested too a live USB made with Fedora-KDE-Live-x86_64-38-1.6.iso runing a live session on my notebook, baremetal, and it returned from sleep three times, without errors, just pressing the return key on keyboard (it doesn't wake with mouse clicks, only pressing the return key, wich I think is expected behaviour)

Comment 5 Steve Cossette 2023-08-17 14:00:10 UTC
BTW booting a Fedora 38 Workstation iso (Latest respin) also has this freezing behavior. No freezing with VGA here either so it seems to be related to the virtio driver and likely not DE specific.

Comment 6 Jens Petersen 2023-08-17 16:19:07 UTC
Good observations, moving this to qemu

Comment 7 Jens Petersen 2023-08-17 16:21:53 UTC
Though it would be better if KDE didn't autosuspend in a VM I guess.
I _think_ GNOME inhibits autosuspend in a VM.

Comment 8 Jens Petersen 2023-08-17 16:23:31 UTC
In fact F39 WS doesn't seem to suspend at all for me.

Comment 9 Steve Cossette 2023-08-17 17:12:54 UTC
You can trigger the issue without waiting for the DE with:

sudo systemctl suspend

Comment 10 Geraldo Simião 2023-08-17 20:34:37 UTC
Here some background on this, and why it's different at gnome
https://bugzilla.redhat.com/show_bug.cgi?id=2180047


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