MISC-47: Optimus: The Screen Locker is Broken



Issue Information

Issue Type: Bug
 
Priority: Major
Status: Open

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: Miscellaneous (MISC)
Resolution: Unresolved

Created: 2021-07-12 16:25:46
Time Spent Working


Description
Optimus is running Kubuntu in a dual-headed setup.

The last 2 times I've come back to the machine, it's not been to a screensaver/lockscreen but to a message

The screen locker is broken and unlocking is not possible anymore.
In order to unlock, switch to a virtual terminal (e.g. Ctrl+Alt+F2),
log in and execute the command

loginctl unlock-session 3

Afterwards switch back to the running session (Ctrl+Alt+F1).


This hasn't been an issue before, however I have recently switched monitors so could potentially be related to that.

System:
ben@optimus:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.10
Release:	20.10
Codename:	groovy

ben@optimus:~$ dpkg-query --list | grep kde-plasma
ii  kde-plasma-desktop                            5:106ubuntu1                                amd64        KDE Plasma Desktop and minimal set of applications

ben@optimus:~$ dpkg-query --list | grep screenlock
ii  kde-config-screenlocker                       5.19.5-0ubuntu1                             amd64        KCM Module for kscreenlocker
ii  libkscreenlocker5:amd64                       5.19.5-0ubuntu1                             amd64        Secure lock screen architecture

ben@optimus:~$ dpkg-query --list | grep sddm
ii  kde-config-sddm                               4:5.19.5-0ubuntu1                           amd64        KCM module for SDDM
ii  sddm                                          0.18.1-1ubuntu3                             amd64        modern display manager for X11
ii  sddm-theme-debian-maui                        0.18.1-1ubuntu3                             all          'Debian Maui' theme for SDDM X11 display manager


Hardware is a Lenovo P14S with a Ryzen 7
ben@optimus:~$ cat /proc/cpuinfo | head
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 23
model		: 96
model name	: AMD Ryzen 7 PRO 4750U with Radeon Graphics
stepping	: 1
microcode	: 0x8600106
cpu MHz		: 1400.446
cache size	: 512 KB
physical id	: 0


Attachments

Toggle State Changes

Activity


btasker added 'IMG_20210712_161757.jpg' to Attachments
For the record, running
loginctl unlock-session 3


did indeed unlock it.

Likely unrelated, but dmesg has a lot of
[84216.861604] [drm] Failed to add display topology, DTM TA is not initialized.


Xorg.o.log seems to have a lot of
[ 84215.780] (II) AMDGPU(0): EDID vendor "LGD", prod id 1530
[ 84215.780] (II) AMDGPU(0): Printing DDC gathered Modelines:
[ 84215.780] (II) AMDGPU(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.7 kHz eP)
[ 84215.780] (II) AMDGPU(0): Modeline "1920x1080"x0.0  114.46  1920 1968 2000 2164  1080 1083 1088 1102 +hsync -vsync (52.9 kHz e)


And has an event where a lot of stuff seems to have gone away
[ 84841.020] (II) event3  - Power Button: device removed
[ 84841.058] (II) event5  - Video Bus: device removed
[ 84841.091] (II) event0  - Power Button: device removed
[ 84841.123] (II) event2  - Sleep Button: device removed
[ 84841.146] (II) event18 - Integrated Camera: Integrated C: device removed
[ 84841.187] (II) event19 - Integrated Camera: Integrated I: device removed
[ 84841.232] (II) event9  - SINO WEALTH Gaming KB : device removed
[ 84841.263] (II) event10 - SINO WEALTH Gaming KB  System Control: device removed
[ 84841.296] (II) event12 - SINO WEALTH Gaming KB  Keyboard: device removed
[ 84841.338] (II) event4  - AT Translated Set 2 keyboard: device removed
[ 84841.411] (II) event7  - TPPS/2 Elan TrackPoint: device removed
[ 84841.462] (II) event14 - ThinkPad Extra Buttons: device removed
[ 84841.478] (II) event11 - SINO WEALTH Gaming KB  Consumer Control: device removed
> however I have recently switched monitors so could potentially be related to that.

The change here was moving from a LG 27" monitor to an Acer. Connection in both cases was HDMI (same HDMI port etc).

Because the power button on the Acer is on the front, I tend to turn it off when walking away from the machine. I couldn't swear I've done it every time, but it's enough of a habit that I assume I have - yet when I come in to find the screenlocker broken, the Acer is on (as per the photo).

I've not actually reconfigured anything on the software side, simply unplugged the old monitor and plugged the new one in - the laptop has been rebooted since then though.
btasker changed Project from 'STAGING' to 'Miscellaneous'
btasker changed Key from 'STGNG-15' to 'MISC-47'
JournalD shows quite a lot of xrandr activity
ul 12 15:37:08 optimus org.kde.KScreen[6745]: kscreen.xrandr: Emitting configChanged()
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr: XRandR::setConfig
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr: Requested screen size is QSize(4480, 1440)
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr: Needed CRTCs:  2
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr: Actions to perform:
Jul 12 15:37:09 optimus org.kde.KScreen[6745]:          Primary Output: true
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:                 Old: 83
Jul 12 15:37:09 optimus org.kde.KScreen[6745]:                  New: 84
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:         Change Screen Size: true
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:                 Old: QSize(1920, 1080)
Jul 12 15:37:09 optimus org.kde.KScreen[6745]:                  Intermediate: QSize(4480, 1440)
Jul 12 15:37:09 optimus org.kde.KScreen[6745]:                  New: QSize(4480, 1440)
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:         Disable outputs: false
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:         Change outputs: true
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:                  (83)
Jul 12 15:37:09 optimus org.kde.KScreen[6745]: kscreen.xrandr:         Enable outputs: true


Those are from before I came back to the system.

The "old" monitor was a 4K UHD monitor, whereas the one I'm using now isn't - does something in the background still have the old config?
Oooh, actually, looking in KDE's display manager, my monitor isn't using 1920x1080, it's using 2560x1440. The laptop's built in display, though, is using 1920x1080 - so perhaps it's that one that's flapping (for whatever reason).

I've used the Display settings to (re)set their values, the theory being it should help overwrite any stale config in the background.

I've also gone into Energy Saving and disabled screen suspend when on AC power.

I guess the only answer, now, is to wait and see what the next lock holds.



Seems to have stayed fine overnight
Still good.

I made 2 changes previously though, so lets roll the energy saving one back to see which (assuming it isn't both) reintroduces the behaviour.

If the behaviour doesn't come back, then it was stale config around resolutions.
Came back to it broken just now.

I've not been on the computer much recently, so it's probably been locked since shortly after my last comment.

I am absolutely fucking certain I powered the monitor off too, but it was on when I came in, so it almost certainly is being woken.

I'm going to leave monitor power-save enabled, and disable sleep when lid closed - I'll close the laptop lid and we'll see if the behaviour still occurs (I don't really use the laptop screen much in practice anyway, so it'd be a reasonable trade-off).
OK so far...