Bug 485520

Summary: Redundant unlock button appears after password when resuming from suspend
Product: [Plasma] kscreenlocker Reporter: Unused Account <mxanthropocene>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: antoine.gatineau, bizyaev, breakingspell, carmanaught, chemobejk, conspibro, contact, francescoza6, ftfeob+kdebugtracker, gwarser, isi.floss, mailinglist, oxi1158, Squashynator, unlovable_fridge356, vasyl.demin, viktor.balogh45, wise.gear8046, xaver.hugl, z411
Priority: NOR Keywords: regression
Version: 6.1.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=456639
https://bugs.kde.org/show_bug.cgi?id=490547
Latest Commit: Version Fixed In: 6.1.3
Sentry Crash Report:

Description Unused Account 2024-04-14 02:34:13 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

When resuming from suspend, I type my password and press enter, then have to press enter again because an "unlock" button appears first, adding unnecessary friction to the user experience. It does not occur when just locking the screen, only after resuming from suspend.

STEPS TO REPRODUCE
1. Suspend system and then resume it
2. Type password and press enter
3. Observe unnecessary "unlock" button

OBSERVED RESULT
Unnecessary "unlock" button adds extra friction for seemingly no reason

EXPECTED RESULT
Typing password and pressing enter logs you in, just like if you simply lock the screen without suspending. You wouldn't type your password and press enter if you didn't want to log back in, right? :)

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.4-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 570 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS MASTER
System Version: -CF

ADDITIONAL INFORMATION
Comment 1 MamaLilla 2024-04-16 18:48:22 UTC
I have exactly the same issue.
Comment 2 Brian M 2024-04-19 18:37:06 UTC
I have the same issue except I can't get back into the machine -- 

After sleep, sometimes unlock screen only displays [Unlock?] button.
Click on it or hit enter and it does nothing -- wait and [Unlock?] disappears just leaving background.
Let it sit there and display blacks out.
Hit [Shift] or [Return] and it displays  [Unlock?] button again, but won't let you unlock your machine.\
Rinse, wash, repeat.

Only way to avoid rebooting is go to TTY3 and do:  $ loginctl unlock-sessions
then return to TTY1 and continue working.

S/W:
Garuda Linux (Arch)
KDE Plasma ver: 6.0.3
KDE Frameworks: 6.0.0
QT Version: 6.7.0
Kernel Version: 6.8.5-zen-1-zen (64-bit)
Graphics Platform: Wayland

H/W
Processors: 8 x 11th Gen Intel Core i7-1165G7 @ 2.80GHz
RAM Memory: 32 GB
Graphics: Mesa Intel Xe
Manufacturer: Framework
Comment 3 Francesco Zaggia 2024-04-19 19:09:58 UTC
Happens to me too, logging in works, but sometimes it displays this unnecessary unlock button after typing the password and confirming.
This only happens when resuming from suspend, it doesn't happen if locking the screen without suspending (with Meta+L for example).

The system needs to stay suspended for more than 10 seconds, otherwise the unlock button is not shown after entering the correct password.

Also it doesn't seems to be related to the say you confirm the password (with Enter key or with the button on the screen), just to how much time it passes.

S/W:
OS: Arch Linux
KDE Plasma ver: 6.0.4
KDE Frameworks: 6.1.0
QT Version: 6.7.0
Kernel Version: 6.8.7-arch1-1 (64 bit)
Graphics Platform: Wayland

H/W
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
RAM Memory: 32 GB
Graphics: AMD Radeon RX 6600
Manufacturer: ASUS
Comment 4 Antoine Gatineau 2024-04-23 08:27:49 UTC
Hello
I confirm also having this issue. Not blocking but annoying.
Here is my system info:
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.7-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 5700 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C91
System Version: 2.0
Comment 5 z411 2024-05-21 07:02:23 UTC
Same here. Started happening after updating to Plasma 6. Seems totally random as I don't suspend my PC, although it seems more common when the PC has been locked for a long time (1+ hour) but I'm not sure. Not sure how to debug or reproduce.

Arch Linux
KDE Plasma: 6.0.4
KDE Frameworks 6.2.0
Qt 6.7.0
Wayland
Comment 6 unlovable_fridge356 2024-05-23 10:07:28 UTC
I can confirm this issue after having updated to Plasma 6.

System:
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.6.30-2-MANJARO (64-bit)
Graphics Platform: X11
Comment 7 oxi 2024-05-29 00:46:07 UTC
I have also been experiencing the issue for a while, and is still present on KDE 6.0.5.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40  (Workstation Edition - NOT the KDE spin)
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.10-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland

Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C56 (MSI B550-A PRO)
System Version: 2.0
Comment 8 gbyte.dev 2024-05-29 19:47:38 UTC
For me it has nothing to do with suspend. The redundant "Unlock" button appears after upgrading to plasma 6 after automatic lock. If I lock manually it doesn't happen (or is it dependent on time?). 

Operating System: NixOS 24.11
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.8.10 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 9 7940HS w/ Radeon 780M Graphics
Memory: 30,6 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 9 Thomas Carmichael 2024-05-31 23:51:02 UTC
I'm experiencing this on 6.0.5 as well, however it's happened to me after manually locking. Perhaps it could be triggered after some time has passed since manually locking? I haven't found a reliable way to reproduce this but wonder if could be related to screen timeout or screen changes somehow.

I had a look at the journal when this occurred most recently and I can see a "kscreenlocker_greet" error:

kscreenlocker_greet[62336]: file:///usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/NoPasswordUnlock.qml:26: ReferenceError: tryToSwitchUser is not defined

This error appears in the journal each time the unlock button has appeared, as far as I can tell.

Operating System: EndeavourOS 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.2-arch1-1 (64-bit)
Graphics Platform: X11
Comment 10 Nate Graham 2024-06-14 15:10:51 UTC
Migrating "reproducible" keyword to "CONFIRMED" status.
Comment 11 Will Ng 2024-06-18 16:48:50 UTC
Have been seeing this bug since the final version of Plasma 5, right before moving to Plasma 6.0.0.

It'd appear when I manually lock my session for around >15 mins and logging in after.
Comment 12 Bug Janitor Service 2024-06-27 13:27:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2346
Comment 13 Bug Janitor Service 2024-06-27 15:26:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/234
Comment 14 Zamundaaa 2024-07-02 20:06:25 UTC
Git commit bc1e4a18ce37d1f40cb6a50acf3d9c53b052bf5e by Xaver Hugl.
Committed on 02/07/2024 at 20:04.
Pushed by zamundaaa into branch 'master'.

greeter/authenticators: add a property for if a prompt was shown in the past

This is needed to properly check for whether or not to show an unlock button

M  +14   -0    greeter/pamauthenticators.cpp
M  +5    -0    greeter/pamauthenticators.h

https://invent.kde.org/plasma/kscreenlocker/-/commit/bc1e4a18ce37d1f40cb6a50acf3d9c53b052bf5e
Comment 15 Bug Janitor Service 2024-07-02 20:07:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/235
Comment 16 Zamundaaa 2024-07-02 20:09:29 UTC
Git commit 6297d4d2e37abadfab0f7389aec9aa4af7f928bc by Xaver Hugl.
Committed on 02/07/2024 at 20:07.
Pushed by zamundaaa into branch 'Plasma/6.1'.

greeter/authenticators: add a property for if a prompt was shown in the past

This is needed to properly check for whether or not to show an unlock button


(cherry picked from commit bc1e4a18ce37d1f40cb6a50acf3d9c53b052bf5e)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +14   -0    greeter/pamauthenticators.cpp
M  +5    -0    greeter/pamauthenticators.h

https://invent.kde.org/plasma/kscreenlocker/-/commit/6297d4d2e37abadfab0f7389aec9aa4af7f928bc
Comment 17 Zamundaaa 2024-07-02 20:14:03 UTC
Git commit 4654e3474c8a40a4febcaaf844b60ae5846b9d7e by Xaver Hugl.
Committed on 02/07/2024 at 20:05.
Pushed by zamundaaa into branch 'master'.

lockscreen: fix the check for authentication prompts

Storing the state for this in qml is problematic, because it gets reset on screen changes

M  +1    -6    desktoppackage/contents/lockscreen/LockScreenUi.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/4654e3474c8a40a4febcaaf844b60ae5846b9d7e
Comment 18 Zamundaaa 2024-07-02 20:24:10 UTC
Git commit 46910cb6a0a6cb8ad6b60ba2b8dfb224624df2ec by Xaver Hugl.
Committed on 02/07/2024 at 20:14.
Pushed by zamundaaa into branch 'Plasma/6.1'.

lockscreen: fix the check for authentication prompts

Storing the state for this in qml is problematic, because it gets reset on screen changes


(cherry picked from commit 4654e3474c8a40a4febcaaf844b60ae5846b9d7e)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +1    -6    desktoppackage/contents/lockscreen/LockScreenUi.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/46910cb6a0a6cb8ad6b60ba2b8dfb224624df2ec
Comment 19 Stefan Becker 2024-07-29 12:42:25 UTC
Could it be that this fix causes bug #490547 ?