Bug 477326 - w\ fingerprint unlocking enabled: Black screen and cursor for 30 seconds after cancelling screen locking within the "unlock w/o password" grace period
Summary: w\ fingerprint unlocking enabled: Black screen and cursor for 30 seconds afte...
Status: RESOLVED FIXED
Alias: None
Product: kscreenlocker
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.9
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-21 12:31 UTC by postix
Modified: 2023-11-28 11:18 UTC (History)
0 users

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 postix 2023-11-21 12:31:09 UTC
SUMMARY

My screen stays black for 30 seconds and only shows a working mouse cursor for 30 seconds after cancelling the screen locking within the "unlock w/o password" grace period.

According to journalctl there is a PAM issue and the 30 seconds correlate perfectly:

```
13:18:12 kscreenlocker_greet: PAM unable to dlopen(/usr/lib64/security/pam_console.so): /usr/lib64/security/pam_console.so: Cannot open the Shared-Object-File
13:18:12 kscreenlocker_greet: PAM adding faulty module: /usr/lib64/security/pam_console.so
---
13:18:12 kscreenlocker_greet: kf.kirigami: Failed to find a Kirigami platform plugin
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:12 kscreenlocker_greet: libpng warning: iCCP: known incorrect sRGB profile
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:12 kscreenlocker_greet: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
13:18:43 kscreenlocker_greet: QEventLoop: Cannot be used without QApplication
13:18:43 kscreenlocker_greet: pam_unix(kde:auth): unexpected response from failed conversation function
13:18:43 kscreenlocker_greet: QEventLoop: Cannot be used without QApplication
---
13:18:43 kscreenlocker_greet: pam_unix(kde:auth): conversation failed
13:18:43 kscreenlocker_greet: pam_unix(kde:auth): auth could not identify password for [user]
```

STEPS TO REPRODUCE
1. Enable "Automatically lock screen" after 1 minute
2. Set "Unlock without password for" 5 seconds
3. Wait the minute until the screen gets locked automatically
4. Move your cursor within the 5 seconds period

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 39
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.11-300.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 1 postix 2023-11-21 12:31:47 UTC
I reference bug #465266 as it sounds related but there no one reports a black screen.
Comment 2 postix 2023-11-21 17:37:29 UTC
This issue seems to be related to fingerprint unlocking, as I can short cut the black screen by putting my finger on the fingerprint reader and the last four lines of the log posted in the opening post, namely

```
kscreenlocker_greet: pam_unix(kde:auth): unexpected response from failed conversation function
kscreenlocker_greet: QEventLoop: Cannot be used without QApplication
kscreenlocker_greet: pam_unix(kde:auth): conversation failed
kscreenlocker_greet: pam_unix(kde:auth): auth could not identify password for [user]
```

do not appear in journalctl.
Comment 3 postix 2023-11-21 17:39:55 UTC
IIRC there's a 30 seconds timeout for the fingerprint reader, which would perfectly correlate.
Maybe this issue is fixed in 6.0 where multiple PAM can be used simultaneously but I don't have the time to test this.
Comment 4 Bug Janitor Service 2023-11-27 22:46:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3610
Comment 5 David Edmundson 2023-11-28 11:18:33 UTC
Git commit 2be90db50bd369d44a567e3642ec98deca21187c by David Edmundson.
Committed on 28/11/2023 at 11:50.
Pushed by davidedmundson into branch 'master'.

Fix most of the lock screen

The commit  introduced the idea of tying the UI to the authentication
state. Starting and cancelling as the UI became visible.
Whilst nice on paper this had two critical bugs:

- cancelling an interactive authentication leads to an entry in the
faillock list. This means pressing escape 3 times in quick successsion
could lock you out your account for 10 minutes.

- There was a concept of a failed state, which wasn't handled in the UI
properly leading to prompts disappearing.

The notification about the failed lock could not be seen.

It also failed to handle the prompts correctly, we had multiple things
bound to the same root.notification completely ignoring the
handleMessage function which is trying to stack messages.

This reverts some of commit 59cdc995e738a0b1cd734e2d1be19e87db99f32b,
but keeps the core feature.
Related: bug 465266

M  +2    -0    lookandfeel/components/WallpaperFader.qml
M  +22   -17   lookandfeel/org.kde.breeze/contents/lockscreen/LockScreenUi.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/2be90db50bd369d44a567e3642ec98deca21187c