Bug 457284 - Lock screen wallpaper is all black after waking from sleep
Summary: Lock screen wallpaper is all black after waking from sleep
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.25.3
Platform: Kubuntu Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
: 437808 455738 459075 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-29 21:40 UTC by Erich Eickmeyer
Modified: 2022-10-31 13:25 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.1


Attachments
Bugged lock screen (124.37 KB, image/jpeg)
2022-09-16 16:54 UTC, Eduardo
Details
Normal lock screen (116.07 KB, image/jpeg)
2022-09-16 16:55 UTC, Eduardo
Details
Plasma under Wayland after returning from sleep (142.33 KB, image/jpeg)
2022-09-16 17:09 UTC, Eduardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Eickmeyer 2022-07-29 21:40:15 UTC
SUMMARY
Lock screen shows black on Nvidia hardware. We did not see the same result on intel hardware with the same setup.


STEPS TO REPRODUCE
1. Instal KDE 5.25.2 and 22.04 Jammy Jellyfish on a kubuntu focus system and reboot
2. Close the lid of the laptop and wait ~5 seconds for it to go to sleep
3. Open the lid and the lock screen should show up with a black background

OBSERVED RESULT

Lock screen has a black background because no background is selected

EXPECTED RESULT

Lock screen should should have a background selected

SOFTWARE/OS VERSIONSLinux/KDE Plasma: Kubuntu 22.04 / 5.25.2
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

Occured on nvidia hardware, did not occur on intel hardware.
Comment 1 Nate Graham 2022-08-01 19:22:58 UTC
Do you see the interactive UI elements for the lock screen, or is the entire screen black?

Can you move the cursor?
Comment 2 Erich Eickmeyer 2022-08-01 22:15:27 UTC
(In reply to Nate Graham from comment #1)
> Do you see the interactive UI elements for the lock screen, or is the entire
> screen black?
 
The UI elements are there and it is interactive.

> Can you move the cursor?

Cursor is active.

The only issue is the background is black.
Comment 3 Nate Graham 2022-08-01 22:29:12 UTC
Thanks. Moving to KWin since it seems like this is probably a graphics issue. Possibly even an issue with the NVIDIA drivers.

Does it reproduce with both Wayland and X11?

Does this happen on the desktop too, or just the lock screen?
Comment 4 Erich Eickmeyer 2022-08-01 23:04:00 UTC
(In reply to Nate Graham from comment #3)
> Thanks. Moving to KWin since it seems like this is probably a graphics
> issue. Possibly even an issue with the NVIDIA drivers.
> 
> Does it reproduce with both Wayland and X11?

We are unable to even launch Wayland under 5.25.x as it immediately crashes on our Nvidia hardware. That might be a separate bug.

> Does this happen on the desktop too, or just the lock screen?

It's just the lock screen.
Comment 5 Nate Graham 2022-08-01 23:10:33 UTC
Thanks.
Comment 6 Eduardo 2022-08-06 13:54:41 UTC
I've got the same issue, background is always black, and sometimes it aggravates a little more as the current date and time information sometimes shows up incomplete, only a few of the numbers are displayed.

Only happens when directly returning from sleep. If I unlock it, then just lock the screen again without sleep, the lock screen shows up fine.

It wasn't always like this. It started happening a couple months back, I don't know exactly when... Hard to tell where the bug is located down the stack, could be kernel, nvidia drivers, or kde software. I would guess it's some sort of race condition, maybe something is being requested of the graphics card while it is still not ready back from sleep.

It happens on my 2 computers, both with kernel 5.18.16-zen, nvidia-dkms 515.65.01-1, kwin/plasma 5.25.4 under XOrg.
Comment 7 Riccardo Robecchi 2022-08-15 15:12:42 UTC
I have this issue on two different computers, a desktop and a notebook, both with all-AMD hardware, so this is not exclusive to NVIDIA. On the desktop, the issue is also present with the desktop itself, not just with the lock screen.
Comment 8 Fushan Wen 2022-09-16 14:52:23 UTC
Can't reproduce. Can you still reproduce it after removing ~/.cache/kscreenlocker_greet/ ? If you can test 5.26 Beta it would be better.
Comment 9 Nate Graham 2022-09-16 15:22:49 UTC
*** Bug 459075 has been marked as a duplicate of this bug. ***
Comment 10 Erich Eickmeyer 2022-09-16 15:35:10 UTC
(In reply to Fushan Wen from comment #8)
> Can't reproduce. Can you still reproduce it after removing
> ~/.cache/kscreenlocker_greet/ ? If you can test 5.26 Beta it would be better.

No effect. Cannot test on 5.26 Beta, I do not have access to binary builds at this time. Latest test on 5.25.5 resulted in same issue. Bear in mind, this is on an Nvidia discrete GPU in Performance mode, issue does not occur if in Powersave (integrated graphics) mode.
Comment 11 Nate Graham 2022-09-16 15:41:45 UTC
Jino, are you also using an NVIDIA GPU when you reproduce the issue?
Comment 12 Jinu 2022-09-16 16:26:30 UTC
(In reply to Nate Graham from comment #11)
> Jino, are you also using an NVIDIA GPU when you reproduce the issue?

Yes, I am also using and Nvidia GPU.
Comment 13 Nate Graham 2022-09-16 16:32:04 UTC
Thanks. This is pointing to a graphics issue in KWin or the NVIDIA driver; moving back to KWin.

Can anyone reproduce on Wayland?
Comment 14 Eduardo 2022-09-16 16:54:36 UTC
Created attachment 152122 [details]
Bugged lock screen

This is the lock screen I get when returning from sleep.
Date and time label only shows a "5, that's very random, sometimes more pieces of the date and time are shown, sometimes it shows complete, sometimes it is missing at all.
Background is black.
Profile picture is grey.
Comment 15 Eduardo 2022-09-16 16:55:36 UTC
Created attachment 152123 [details]
Normal lock screen

This is what my lock screen should be. I get this when just locking without going to sleep.
Comment 16 Eduardo 2022-09-16 17:09:32 UTC
Created attachment 152124 [details]
Plasma under Wayland after returning from sleep

Under Wayland it is even worse. The bug lives on into plasma desktop even after I unlock the lock screen after returning from sleep. As can be seen in the picture, the desktop renders completely crazy. No icons, no labels, black background, date and time on taskbar shows only "1"...
Comment 17 Nate Graham 2022-09-16 17:12:46 UTC
This is starting to feel like a bug in the NVIDIA driver itself. There's a long history of graphical glitches on suspend, unfortunately.
Comment 18 Eduardo 2022-09-16 17:16:35 UTC
(In reply to Nate Graham from comment #17)
> This is starting to feel like a bug in the NVIDIA driver itself. There's a
> long history of graphical glitches on suspend, unfortunately.

It's possible... however In comment #7 he said he got the bug with AMD hardware.
Comment 19 Riccardo Robecchi 2022-09-17 08:51:11 UTC
(In reply to Nate Graham from comment #17)
> This is starting to feel like a bug in the NVIDIA driver itself. There's a
> long history of graphical glitches on suspend, unfortunately.

I can reproduce on AMD hardware, specifically my laptop with a Ryzen 2500U CPU and Vega 8 GPU. I am therefore removing the mention of NVIDIA from the title.
One thing I noticed is that it often occurs after I connect or disconnect my laptop to/from the docking station. If I just leave it plugged in, the bug does not appear.
Comment 20 Nate Graham 2022-09-22 14:19:47 UTC
*** Bug 456723 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2022-09-22 14:22:19 UTC
We've made a change that we're pretty sure will fix this in Plasma 5.26! Please re-open if you find that you can still reproduce the issue in 5.26 after upgrade (and a reboot, of course!).
Comment 22 Nate Graham 2022-09-22 14:41:57 UTC
*** Bug 437808 has been marked as a duplicate of this bug. ***
Comment 23 Erich Eickmeyer 2022-09-22 14:58:17 UTC
(In reply to Nate Graham from comment #21)
> We've made a change that we're pretty sure will fix this in Plasma 5.26!
> Please re-open if you find that you can still reproduce the issue in 5.26
> after upgrade (and a reboot, of course!).

Sadly, I can't 100% confirm this. I just upgraded to Plasma 5.26 beta from the Kubuntu beta PPA which might not have the latest commits and, sadly, the issue still exists there. That said, I won't reopen as I don't believe this fits the test case.
Comment 24 Nate Graham 2022-09-22 15:09:46 UTC
The commits to fix it were just made yesterday and didn't make it into the beta. You'd have to be running the latest git version of the master branch or the plasma/5.26 branch.
Comment 25 Ali 2022-09-30 19:01:26 UTC
Hi, 
I just get it fixed by removing the NVIDIA driver completely and reinstall it again.

sudo apt-get purge '*nvidia*' -y
reboot
sudo apt-get install nvidia-driver-515
reboot
sudo apt-get install nvidia-modprobe 
reboot
Comment 26 Ali 2022-10-01 15:02:53 UTC
(In reply to Ali from comment #25)
> Hi, 
> I just get it fixed by removing the NVIDIA driver completely and reinstall
> it again.
> 
> sudo apt-get purge '*nvidia*' -y
> reboot
> sudo apt-get install nvidia-driver-515
> reboot
> sudo apt-get install nvidia-modprobe 
> reboot

issue reproduced , black background
Comment 27 Ali 2022-10-15 21:46:29 UTC
I downgraded the nvidia-driver to 510 and apply this line 
> sudo chmod +x /usr/share/screen-resolution-extra/nvidia-polkit
open nvidia-settings and save the x server display configuration by pressing  "save to x configuration file"
Comment 28 Erich Eickmeyer 2022-10-15 21:59:53 UTC
(In reply to Ali from comment #27)
> I downgraded the nvidia-driver to 510 and apply this line 
> > sudo chmod +x /usr/share/screen-resolution-extra/nvidia-polkit
> open nvidia-settings and save the x server display configuration by pressing
> "save to x configuration file"

That's merely a workaround and can actually break some laptop displays. Please do not give such advice as a "bugfix".
Comment 29 Riccardo Robecchi 2022-10-15 22:08:23 UTC
(In reply to Ali from comment #27)
> I downgraded the nvidia-driver to 510 and apply this line 
> > sudo chmod +x /usr/share/screen-resolution-extra/nvidia-polkit
> open nvidia-settings and save the x server display configuration by pressing
> "save to x configuration file"

Considering that, as people (me included) have pointed out multiple times, this issue is not related just to NVIDIA, I wouldn't be so quick in marking the issue as closed as you solving it by downgrading the NVIDIA driver doesn't fix the issue for people with AMD or Intel drivers. Let's leave this issue open until we are sure that it is fixed for everyone, thank you. Furthermore, as Erich points out, your workaround can cause further issues, so I would tread very carefully around this.

More on topic, I was actually able to reproduce the issue without suspending my laptop, but simply plugging in an external display. The laptop's screen  (oddly enough, not the external display) started exhibiting the behaviour, which also involved Plasma's desktop. The desktop was black unless it was focused (i.e. I clicked on it); after a few minutes the issue went away on its own on both the desktop and the lockscreen.
Comment 30 Alex A.D. 2022-10-18 11:23:46 UTC
There is al a related issue on that: bug 455738
Comment 31 Erich Eickmeyer 2022-10-25 18:47:49 UTC
Finally on Plasma 5.26.1. So far, I have not seen this bug appear, so I'm very close to marking this as fixed, but I want to do a little more testing before closing.
Comment 32 Erich Eickmeyer 2022-10-26 14:42:10 UTC
Confirmed bug is gone as of 5.26.1. Thanks!
Comment 33 Erich Eickmeyer 2022-10-26 14:43:48 UTC
*** Bug 455738 has been marked as a duplicate of this bug. ***
Comment 34 Joe 2022-10-31 13:25:18 UTC
This is fixed on my NVidia system (X11), but oddly enough, I am still seeing this on my AMD build (Wayland):

Operating System: Arch Linux
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Kernel Version: 6.0.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5500 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7B85
System Version: 1.0

I am still getting a black wallpaper on the screen locker on occasions when resuming from sleep/hibernate. I don't see anything particularly useful in journalctl, either.