PINE64
Plasma Mobile goes back to lockscreen when the phone isn't charging - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+--- Thread: Plasma Mobile goes back to lockscreen when the phone isn't charging (/showthread.php?tid=14172)



Plasma Mobile goes back to lockscreen when the phone isn't charging - plaristote - 06-11-2021

Greetings !

I have the KDE edition pinephone, and after an update, I've seen that when it wasn't plugged, it wouldn't stay unlocked more than a few seconds. Nothing special seems to be happening, just the session getting locked again. I kept making updates, but nothing's changed (well, lots changed, but not this specific issue).
I checked out what happened with journalctl, when unlocking the phone while unplugged:

Code:
-- Journal begins at Sun 2021-06-06 02:39:45 CEST. --
Jun 11 19:23:01 plasma-mobile mtp-probe[7231]: checking bus 1, device 15: "/sys/devices/platform/soc/1c1a000.usb/usb1/1-1/1-1.3"
Jun 11 19:23:01 plasma-mobile mtp-probe[7231]: bus: 1, device: 15 was not an MTP device
Jun 11 19:23:02 plasma-mobile upowerd[4309]: treating change event as add on /sys/devices/platform/soc/1c1a000.usb/usb1/1-1/1-1.3
Jun 11 19:23:02 plasma-mobile systemd-logind[3705]: Watching system buttons on /dev/input/event7 (SEM USB Keyboard Consumer Control)
Jun 11 19:23:02 plasma-mobile systemd-logind[3705]: Watching system buttons on /dev/input/event6 (SEM USB Keyboard)
Jun 11 19:23:02 plasma-mobile systemd-logind[3705]: Watching system buttons on /dev/input/event8 (SEM USB Keyboard System Control)
Jun 11 19:23:02 plasma-mobile mtp-probe[7261]: checking bus 1, device 15: "/sys/devices/platform/soc/1c1a000.usb/usb1/1-1/1-1.3"
Jun 11 19:23:02 plasma-mobile mtp-probe[7261]: bus: 1, device: 15 was not an MTP device
Jun 11 19:23:04 plasma-mobile xdg-desktop-portal-kde[4529]: xdp-kde-background: GetAppState called: no parameters
Jun 11 19:23:34 plasma-mobile xdg-desktop-portal-kde[4529]: xdp-kde-background: GetAppState called: no parameters
Jun 11 19:23:50 plasma-mobile dbus-daemon[3694]: [system] Activating service name='org.kde.powerdevil.backlighthelper' requested by ':1.39' (uid=1000 pid=4342 comm="/usr/lib/org_kde_powerdevil ") (using servicehelper)
Jun 11 19:23:51 plasma-mobile dbus-daemon[3694]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
Jun 11 19:23:54 plasma-mobile dbus-daemon[3694]: [system] Activating via systemd: service name='org.freedesktop.ModemManager1' unit='dbus-org.freedesktop.ModemManager1.service' requested by ':1.137' (uid=1000 pid=7269 comm="/usr/lib/kscreenlocker_greet --immediateLock --gra")
Jun 11 19:23:54 plasma-mobile dbus-daemon[3694]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.ModemManager1.service': Unit dbus-org.freedesktop.ModemManager1.service not found.
Jun 11 19:23:54 plasma-mobile dbus-daemon[3694]: [system] Activating via systemd: service name='org.freedesktop.ModemManager1' unit='dbus-org.freedesktop.ModemManager1.service' requested by ':1.137' (uid=1000 pid=7269 comm="/usr/lib/kscreenlocker_greet --immediateLock --gra")
Jun 11 19:23:54 plasma-mobile dbus-daemon[3694]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.ModemManager1.service': Unit dbus-org.freedesktop.ModemManager1.service not found.


Nothing really stands out to me... I see something related with kscreenlocker, but I don't know what happens there.

Would anyone know where I should look next ?


RE: Plasma Mobile goes back to lockscreen when the phone isn't charging - acrux - 06-11-2021

Have you tried to search the forum Smile
There are several threads&topics about this problem and how to fix that Wink


RE: Plasma Mobile goes back to lockscreen when the phone isn't charging - plaristote - 06-11-2021

My. You're right. Though it didn't help, unfortunately.

I just spent a couple of hours researching, and here's what I managed to glean. While there are other topics on this issue, when it comes to solution, they all redirect to a single topic, in which two possible solutions are being suggested.

The first solution involves changing the `.config/powermanagementprofilesrc` file.

The other one is someone suggesting to flash the device to update to Plasma Mobile Gear 21.05. Truthfully, while I don't know how to check the current PlaMo Gear version, I've been reading the changelogs, and I'm pretty sure it already reached our phones. Some people do say that the configuration file needs to be updated anyway: I tried updating it, I tried removing it... no luck.

Sources:
- https://forum.pine64.org/showthread.php?tid=13690&pid=93468#pid93468 (editing the config file)
- https://forum.pine64.org/showthread.php?tid=13690&pid=94721#pid94721 (plasma mobile gear update)

Topics which seem to be talking about the same issue:
- https://forum.pine64.org/showthread.php?tid=14014
- https://forum.pine64.org/showthread.php?tid=14043
- https://forum.pine64.org/showthread.php?tid=13702


RE: Plasma Mobile goes back to lockscreen when the phone isn't charging - plaristote - 06-12-2021

Relevant source:
https://invent.kde.org/plasma-mobile/plasma-settings/-/issues/11

Not the same issue, but it does speak about the same faulty configuration file, and give some hints about values that might be useful.

Someone else here says the issue will be fixed with Plasma Mobile Gear 21.05. I also had the screen brightness issue, and it indeed got fixed a few weeks ago. Could it be that people are mistaking the screen locking issue for the screen brightness one ?

Anyhow, I'll keep following that lead, and try to come out with my own version of `powermanagementprofilesrc`.
If anyone comes around here, I would very much like to see other versions of your ~/.config/powermanagementprofilesrc file, as I would like to see if they're different from this one (https://forum.pine64.org/showthread.php?tid=13690&pid=93468#pid93468).

EDIT:
This might also be relevant:
https://github.com/KDE/plasma-mobile-config/blob/master/appconfig/powermanagementprofilesrc
It's 8 years old, but the last commit editing this file did say `never sleep by default`. After testing it, it seems to completely disable the lockscreen: it appears after booting, but never again afterwards. It wouldn't be so problmatic, but the homescreen also stops reacting to touch events afterwards, and only the top drawer remain accessible.
So this is definitely progress, and a promising lead for later... but not a solution quite yet.

I also found this version, which is also pretty damn old. Stashed for later:
https://github.com/MatMoul/plasma-config-matmoul/blob/master/profile/.config/powermanagementprofilesrc

The following link shows how to edit powermanagementprofilesrc from command line. Useful, since the PlaMo UI for doing so isn't complete (and perhaps not functional):
https://forum.kde.org/viewtopic.php?f=17&t=108974


RE: Plasma Mobile goes back to lockscreen when the phone isn't charging - plaristote - 06-12-2021

Okay guys. I've solved the issue. Following the hints of the links above, I modified the original version of my powermanagementprofilesrc configuration file by modifying some idleTime.

I think the relevant category is "DPMSControl". It's possible that whatever writes to the configuration file render the values as seconds, but this configuration file seems to expect milliseconds, if I'm not mistaken.

Here's the result:

Code:
[AC]
icon=battery-charging

[AC][DPMSControl]
idleTime=600000
lockBeforeTurnOff=1

[AC][DimDisplay]
idleTime=300000

[AC][HandleButtonEvents]
lidAction=1
powerButtonAction=128
powerDownAction=16

[Battery]
icon=battery-060

[Battery][BrightnessControl]
value=0.5

[Battery][DPMSControl]
idleTime=600000
lockBeforeTurnOff=1

[Battery][DimDisplay]
idleTime=300000

[Battery][HandleButtonEvents]
lidAction=1
powerButtonAction=128
powerDownAction=16

[Battery][SuspendSession]
idleTime=300000
suspendThenHibernate=true
suspendType=32

[LowBattery]
icon=battery-low

[LowBattery][BrightnessControl]
value=30

[LowBattery][DPMSControl]
idleTime=300000
lockBeforeTurnOff=1

[LowBattery][DimDisplay]
idleTime=30000

[LowBattery][HandleButtonEvents]
lidAction=1
powerButtonAction=128
powerDownAction=16

[LowBattery][SuspendSession]
idleTime=300000
suspendType=1

And with that, you should be good to go. For now, everything seems fine with my pinephone, but I have yet to test it out and see what other things it changed... perhaps the screenlock won't appear as often as it should. But at least, now, we know how to patch up this issue.