Bug 465399 - In a VM, screen will not wake up after Screen Energy Saving activates due to Powerdevil crashing
Summary: In a VM, screen will not wake up after Screen Energy Saving activates due to ...
Status: RESOLVED DUPLICATE of bug 466181
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.90
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-07 01:55 UTC by Forest
Modified: 2023-03-22 13:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
powerdevil stack trace (31.49 KB, text/plain)
2023-02-08 02:57 UTC, Forest
Details
Failed to query DPMS state (4.95 KB, image/png)
2023-03-01 17:03 UTC, Félim Whiteley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forest 2023-02-07 01:55:16 UTC
The KDE Neon Live image session blanks the screen after sitting idle for about ten minutes. Mouse and keyboard activity do not wake it up.

STEPS TO REPRODUCE
1. Boot the KDE Neon Testing live image in a virtual machine. (I used virt-manager/libvirt.)
2. Let it sit idle for about ten minutes, until the screen turns black.
3. Move the mouse or press keyboard buttons.

OBSERVED RESULT

The screen remains black.

EXPECTED RESULT

The screen should have awakened.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: KDE Neon Testing Edition neon-testing-20230206-1112.iso
Operating System: KDE neon Testing Edition
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 5.15.0-58-generic (64-bit)
Graphics Platform: X11
Processors: 2 × Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)
Memory: 3.8 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: QEMU
Product Name: Standard PC (Q35 + ICH9, 2009)
System Version: pc-q35-5.2

ADDITIONAL INFORMATION

The OS is still running. Control+Alt+Fn can still switch between virtual consoles. Restarting sddm from another VC succeeds at killing the GUI session and starting a new one.

Screen Locking: Lock screen automatically is not checked
Power Management: Energy Saving: Screen Energy Saving is checked (Switch off after 10 min.)

$ journalctl _UID=999 |tail
Feb 07 01:26:49 neon plasmashell[1493]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"
Feb 07 01:26:50 neon plasmashell[1493]: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"
Feb 07 01:27:01 neon pulseaudio[1308]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Feb 07 01:27:01 neon kded5[1448]: kf.bluezqt: PendingCall Error: "Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)"
Feb 07 01:36:40 neon org_kde_powerdevil[1527]: org.kde.kscreen.dpms: Failed to query DPMS state, cannot trigger
Feb 07 01:36:40 neon org_kde_powerdevil[1527]: XIO:  fatal IO error 0 (Success) on X server ":0"
Feb 07 01:36:40 neon org_kde_powerdevil[1527]:       after 366 requests (365 known processed) with 0 events remaining.
Feb 07 01:36:40 neon org_kde_powerdevil[1527]: The X11 connection broke: Unsupported extension used (code 2)
Feb 07 01:36:59 neon systemd[1300]: app-org.kde.plasma\x2dwelcome@autostart.service: Consumed 3.884s CPU time.
Comment 1 Forest 2023-02-07 02:05:57 UTC
Note: Waking the screen immediately will not reproduce the problem. Let it stay idle for 20 seconds or so after the screen turns black.
Comment 2 Nate Graham 2023-02-07 19:14:48 UTC
So it only happens in the live session in a VM? Does it also happen in the live session on bare metal, or with an installed system on bare metal, or with an installed system in a VM?
Comment 3 Forest 2023-02-07 20:25:18 UTC
VM live session: bug is present
VM installed: unknown (I'll try to find time to test this, but I have no ETA)
Bare metal live session: bug does not occur on my hardware
Bare metal installed:  unknown  (I do not have the spare hardware for testing this)
Comment 4 Forest 2023-02-08 02:51:40 UTC
Update:

VM live session: Bug is present
VM installed session: Bug is present
Bare metal live session: Bug does not occur on my hardware
Bare metal installed session:  unknown  (I do not have the spare hardware for testing this)
Installed session + system updates: unknown (updates rendered system unbootable; see bug 464869)

A few more things I noticed:

- Since the screen blanker likes to engage while the Neon installer is doing its work, someone trying to install Neon is likely to find a an unresponsive black screen midway through, and have to start all over.

- When switching to another VC and back to the desktop VC, the desktop sometimes appears for a fraction of a second before turning black. I don't know if that glimpse is the actual desktop or just a stale video buffer. Keyboard and mouse activity still don't restore it.

- Sometimes, the Energy Saving settings panel opens with a translucent overlay, briefly showing a red speech bubble and this error message: "Power Management configuration module could not be loaded. The Power Management Service appears not to be running." The overlay then disappears to reveal the settings panel. 

- After that error overlay appears, the KDE Crash Handler triggers, reporting that org_kde_powerdevil closed unexpectedly.
Comment 5 Forest 2023-02-08 02:57:25 UTC
Created attachment 156056 [details]
powerdevil stack trace
Comment 6 Nate Graham 2023-02-13 01:34:54 UTC
Ok so it seems like being run in a VM is important. Seems like maybe we're sending an invalid DBus message and causing the X11 connection to crash.
Comment 7 Forest 2023-02-13 04:54:13 UTC
Another log capture with slightly different messages:

Feb 13 04:38:14 neon pulseaudio[1306]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Feb 13 04:48:08 neon org_kde_powerdevil[1526]: org.kde.kscreen.dpms: Failed to query DPMS state, cannot trigger
Feb 13 04:48:08 neon org_kde_powerdevil[1526]: XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
Feb 13 04:48:08 neon org_kde_powerdevil[1526]:       after 367 requests (366 known processed) with 0 events remaining.
Feb 13 04:48:08 neon org_kde_powerdevil[1526]: The X11 connection broke: Unsupported extension used (code 2)
Feb 13 04:48:08 neon systemd[1298]: plasma-powerdevil.service: Main process exited, code=exited, status=1/FAILURE
Feb 13 04:48:08 neon systemd[1298]: plasma-powerdevil.service: Failed with result 'exit-code'.
Feb 13 04:48:09 neon systemd[1298]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 1.
Feb 13 04:48:09 neon systemd[1298]: Stopped Powerdevil.
Feb 13 04:48:09 neon systemd[1298]: Starting Powerdevil...
Feb 13 04:48:09 neon org_kde_powerdevil[1792]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
Feb 13 04:48:09 neon org_kde_powerdevil[1792]: org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed
Feb 13 04:48:09 neon org_kde_powerdevil[1792]: org.kde.kscreen.dpms: DPMS extension not available
Feb 13 04:48:09 neon systemd[1298]: Started Powerdevil.
Feb 13 04:48:09 neon org_kde_powerdevil[1792]: org.kde.powerdevil: Handle button events action could not check for screen configuration
Feb 13 04:48:09 neon org_kde_powerdevil[1792]: org.kde.powerdevil: The profile  "AC" tried to activate "DimDisplay" a non-existent action. This is usually due to an installation problem, a configuration problem, or because the action is not supported
Feb 13 04:48:09 neon org_kde_powerdevil[1792]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
Comment 8 Félim Whiteley 2023-03-01 17:02:20 UTC
Also effects me ever since 5.27 update
Comment 9 Félim Whiteley 2023-03-01 17:03:35 UTC
Created attachment 156890 [details]
Failed to query DPMS state

Could switch to another virtual terminal and check journalctl
Comment 10 Nate Graham 2023-03-01 18:34:20 UTC
Pasting the backtrace inline for searchability:


Thread 1 (Thread 0x7f58f0801940 (LWP 1202)):
[KCrash Handler]
#6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140019968776512) at ./nptl/pthread_kill.c:44
#7  __pthread_kill_internal (signo=6, threadid=140019968776512) at ./nptl/pthread_kill.c:78
#8  __GI___pthread_kill (threadid=140019968776512, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#9  0x00007f58f5648476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#10 0x00007f58f562e7f3 in __GI_abort () at ./stdlib/abort.c:79
#11 0x00007f58f4fafed6 in ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#12 0x00007f58f4fd6690 in _dbus_warn_check_failed () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#13 0x00007f58f4fc5b57 in dbus_message_iter_append_basic () from /lib/x86_64-linux-gnu/libdbus-1.so.3
#14 0x00007f58f601b317 in q_dbus_message_iter_append_basic (value=0x7ffc8c41ce60, type=98, iter=0x7ffc8c41cfc0) at ./src/dbus/qdbus_symbols_p.h:338
#15 qIterAppend (arg=0x7ffc8c41ce60, type=98, ba=<optimized out>, it=0x7ffc8c41cfc0) at ./src/dbus/qdbusmarshaller.cpp:54
#16 QDBusMarshaller::append (arg=<optimized out>, this=0x7ffc8c41cfa0) at ./src/dbus/qdbusmarshaller.cpp:79
#17 QDBusMarshaller::appendVariantInternal (this=this@entry=0x7ffc8c41cfa0, arg=...) at ./src/dbus/qdbusmarshaller.cpp:438
#18 0x00007f58f5fed93f in QDBusMessagePrivate::toDBusMessage (message=..., capabilities=..., error=error@entry=0x7ffc8c41d130) at ./src/dbus/qdbusmessage.cpp:197
#19 0x00007f58f5fdc519 in QDBusConnectionPrivate::send (this=0x7f58e8001c00, message=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#20 0x00007f58f5fe12c5 in QDBusConnectionPrivate::deliverCall (this=<optimized out>, object=<optimized out>, msg=..., metaTypes=..., slotIdx=<optimized out>) at ./src/dbus/qdbusintegrator.cpp:1014
#21 0x00007f58f5fe4fa7 in QDBusConnectionPrivate::activateCall (this=this@entry=0x7f58e8001c00, object=0x5602797249e0, flags=flags@entry=273, msg=...) at ./src/dbus/qdbusintegrator.cpp:911
#22 0x00007f58f5fe56ec in QDBusConnectionPrivate::activateCall (msg=..., flags=273, object=<optimized out>, this=0x7f58e8001c00) at ./src/dbus/qdbusintegrator.cpp:853
#23 QDBusConnectionPrivate::activateObject (this=0x7f58e8001c00, node=..., msg=..., pathStartPos=<optimized out>) at ./src/dbus/qdbusintegrator.cpp:1503
#24 0x00007f58f5fe7a9c in QDBusActivateObjectEvent::placeMetaCall (this=0x7f58e801e260) at ./src/dbus/qdbusintegrator.cpp:1623
#25 0x00007f58f5d41ade in QObject::event (this=0x56027966a800, e=0x7f58e801e260) at kernel/qobject.cpp:1347
#26 0x00007f58f5d1407a in QCoreApplication::notifyInternal2 (receiver=0x56027966a800, event=0x7f58e801e260) at kernel/qcoreapplication.cpp:1064
#27 0x00007f58f5d17167 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x56027959da60) at kernel/qcoreapplication.cpp:1821
#28 0x00007f58f5d6e487 in postEventSourceDispatch (s=0x5602795a7fa0) at kernel/qeventdispatcher_glib.cpp:277
#29 0x00007f58f475ed3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f58f47b36c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f58f475c3e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f58f5d6dad8 in QEventDispatcherGlib::processEvents (this=0x5602796634b0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007f58f5d1299b in QEventLoop::exec (this=this@entry=0x7ffc8c41d830, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007f58f5d1af34 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#35 0x0000560278751a50 in ?? ()
#36 0x00007f58f562fd90 in __libc_start_call_main (main=main@entry=0x560278751520, argc=argc@entry=1, argv=argv@entry=0x7ffc8c41db58) at ../sysdeps/nptl/libc_start_call_main.h:58
#37 0x00007f58f562fe40 in __libc_start_main_impl (main=0x560278751520, argc=1, argv=0x7ffc8c41db58, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc8c41db48) at ../csu/libc-start.c:392
#38 0x0000560278752535 in ?? ()
Comment 11 Nate Graham 2023-03-01 18:35:39 UTC
Crashing in DBus indicates that we're sending an invalid DBus message somewhere.

This miiiiiight be Bug 466181, which is fixed in Plasma 5.27.2. Can affected folks upgrade to that version of later and see if it's fixed now?
Comment 12 Félim Whiteley 2023-03-07 10:04:34 UTC
I'm afraid not, I've 5.27.2, Frameworks 5.103.0 with kernel 5.19.0-35 on X11 (an up-to-date Neon). If there is anything you need me to try let me know. Easy to repro though, just leave a Neon VM for a bit and it'll end up in that state.
Comment 13 Nate Graham 2023-03-07 18:07:34 UTC
Fixed moar bettarer in Plasma 5.27.3 now, so I'll mark this as a duplicate of Bug 466181.

Forest, if you still experience the issue in Plasma 5.27.3, feel free to re-open this bug report and we'll investigate more deeply. Thanks a lot for your patience!

Félim, if you still experience it in Plasma 5.27.3, can you submit a new bug report for it? Thanks to you too!

*** This bug has been marked as a duplicate of bug 466181 ***
Comment 14 tagwerk19 2023-03-07 21:52:48 UTC
Have a look at what video you are using...

I see an issue
    https://bugs.kde.org/show_bug.cgi?id=466697#c6
with X11 when working with QXL driver (F37 guest) , if I switch to Virtio I'm OK.

Corroborative evidence maybe, but it would be intesting to know if you see the same pattern.
Comment 15 Félim Whiteley 2023-03-22 13:54:14 UTC
(In reply to Nate Graham from comment #13)
> Fixed moar bettarer in Plasma 5.27.3 now, so I'll mark this as a duplicate
> of Bug 466181.
> 
> Forest, if you still experience the issue in Plasma 5.27.3, feel free to
> re-open this bug report and we'll investigate more deeply. Thanks a lot for
> your patience!
> 
> Félim, if you still experience it in Plasma 5.27.3, can you submit a new bug
> report for it? Thanks to you too!
> 
> *** This bug has been marked as a duplicate of bug 466181 ***

Fixed for me as of 5.27.3 Cheers for the help! :-)