Bug 455297 - Screen goes black, unresponsive, upon waking up laptop from sleep (but it blinks periodically, and system is still alive)
Summary: Screen goes black, unresponsive, upon waking up laptop from sleep (but it bli...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.4
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-15 01:17 UTC by jdally987
Modified: 2024-01-16 02:56 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jdally987 2022-06-15 01:17:11 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Upon putting the laptop to sleep, and then waking it up, the screen will turn back on and display the cursor very briefly (maybe 0.25 seconds), during which time it is movable/controllable, before shutting back off to black. Then it will start blinking, at a rate of about once per second, for a tiny instant (like, even less than the 0.25s the cursor was visible before). Strangely, during the "blinks", the content of the screen *is* barely discernable for that split second - I'll see a glimpse of the lockscreen wallpaper or the chrome tabs I had open, for the infinitesimal duration that the screen has "blinked" on.
Additionally, the OS seems to be alive, but barely - more like in a coma - because if I plug it into AC power, the KDE "power connected" chime plays out of the speakers just fine. However, nothing else seems to work. I tested by opening spotify, starting to play a song, locking the computer (without sleeping it) and making sure my sxhkd shortcut for media play/pause (which I bound to Meta+Z) indeed played & paused the music on the lockscreen. Then I slept the computer and woke it a couple seconds later. Following the cursor disappearing and display turning black & starting to blink, I tried Meta+Z a few times, and nothing happened. Assuming it had gotten to the lockscreen, as I have enabled lock after wake in plasma settings, the key combo should've unpaused the music like before. But it doesn't - despite the "power connected" chime functioning correctly as I mentioned.

Finally, I've noticed this only happens maybe 9 out of 10 times. Sometimes the computer will awake from sleep and show the lockscreen without killing the display & blinking incessantly, and let me log back in no problem. I haven't nailed down what causes it to work or not yet, but I noted the other day it worked correctly when the battery dropped under 15% (the "low" level) and thus went to sleep on its own. When I woke it up it worked swimmingly. Since this bug has caused me a lot of grief, I set my Energy Saving settings to NOT suspend automatically, but I forgot to uncheck that on the "On Low Battery" tab, hence why it surprised me to find the laptop had slept by itself (thinking I'd now have to reboot, because of the bug), and then doubly-surprised me when I woke it and found it DIDN'T exhibit the buggy behavior.


Anyway this is weird; I'd love to attach a backtrace but I'm not sure what exactly is crashing. I'm filing this under powerdevil because it seems to have something to do with suspend/wake, but I suppose it could be something with kscreen or something as well. Regardless I've scoured my syslog to try & find anything out of the ordinary after the bug occurred & I had to reboot, but haven't found anything suspicious, so if someone can provide me guidance on how to figure out what exactly needs to be backtraced in the first place, I'll gladly go ahead & do that. (ps: on the suggested How_to_create_useful_crash_reports wiki page, under the "Ubuntu-based distros" section, 2 out of the 3 links it points to are dead, which was another roadblock to me getting any kinds of debugging output)


STEPS TO REPRODUCE
1. Suspend/sleep the system
2. Press power button to wake
3. Move the mouse around frantically as it wakes, to see the cursor move for 0.25s before the screen shuts off, then observe it blinking once/second

OBSERVED RESULT
The display goes black/unresponsive after what looks to be the OS waking from sleep normally (evidenced by the brief period where the cursor is visible and responsive).

EXPECTED RESULT
The display should come on about a second after pressing the power button, then the lockscreen should be displayed about another second later, and NOT turn off suddenly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 21.10, Linux 5.18.3
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
One more notable detail is the laptop I'm using is an LG Gram, 2021 model, which I just recently bought. However, I started experiencing this behavior just a few weeks *before* I bought this model - at which time I was still using my older, 2019 model LG Gram. I kind of hoped it was some hardware quirk that would be resolved by, well... switching hardware lol, until I got the new 2021 Gram and installed kubuntu on it, only to find the same bug. I actually tested both laptops side-by-side just to make sure they both did the exact same thing. Previously though, my older gram worked fine with suspend/wake; and that was the same exact system, still Kubuntu 21.10, with the KDE backports PPA, so I'm very confident I didn't make any major changes to the system or anything. All I can deduce is it must have been from an update of some sort, around the time of the middle of April 2022 (as I ordered the new laptop model on Apr. 23, and remember this bug driving me crazy for at least a couple weeks or so previous to that). So in other words, I know it's not just some weird quirk of my particular hardware, as many problems have been for me in the past.
Comment 1 Zamundaaa 2022-07-05 07:57:03 UTC
Does this happen on Xorg or on Wayland, and can you see the same problem with other desktop environments or distributions (live boot might suffice to reproduce the problem)?
Comment 2 jdally987 2022-07-06 00:52:18 UTC
(In reply to Zamundaaa from comment #1)
> Does this happen on Xorg or on Wayland, and can you see the same problem
> with other desktop environments or distributions (live boot might suffice to
> reproduce the problem)?

Oh yeah my bad totally forgot to mention that I'm on Xorg. I just tried Wayland and I guess it appears it does not do it on that...

And I actually did test a few different versions of ubuntu and kubuntu live ISO's (20.04, 21.04, 22.04...) and discovered it does indeed do it on all of them, ubuntu (gnome) included. So yeah sorry about that, guess this isn't KDE-specific after all. Still not sure where to go from here though, I don't love using wayland full-time for various reasons
Comment 3 jdally987 2022-07-06 00:58:25 UTC
Sorry for the double post (doesn't look like there's a way to edit my previous comments on here) but I should also mention I've found it's probably related to the display itself - since I just got done reinstalling kubuntu today and redid my power settings, disabled suspend after a delay, but left screen energy saving (after 5 minutes or whatever) on - see screenshot:
https://i.imgur.com/ZvOxrYM.png

And it *still* does the glitchy behavior & necessitates restarting the computer when I left the laptop for 15 minutes and the screen turned off. This is with no suspend involved at all at this point.
Comment 4 jdally987 2022-07-06 15:04:37 UTC
Update: nevermind, I was wrong, it does it on Wayland too.
Comment 5 postix 2023-11-20 20:14:18 UTC
Not sure if it's actually a duplicate since this report is also about a blinking cursor, but sounds at least related to bug #442699.
Comment 6 jdally987 2024-01-16 02:56:25 UTC
Long time since last update, but wanted to close because I tried Kubuntu 23.10 (kernel 6.5.0-14-generic) and everything suddenly works great. Laptop sleeps and wakes fine, external monitor works without issue. Whatever. I'm just glad it works