Pinephone: Double Tapping Power Button on Lock Screen Results in Unresponsive Black Screen
What problem did you encounter
While on the Phosh lock screen, quickly pressing the power button twice will result in a black screen with the display on. Can be recovered by killing phoc.
How to reproduce
Turn the display on so you can see the lock screen. Quickly press the power button twice. This is 100% reproducible on my devices as far as I can tell. Doesn't seem to happen if done while the display is off, or if the device is unlocked.
What is the (wrong) result?
Phosh apparently crashing.
What is the expected behaviour?
Handling it in some way that doesn't cause the phone to enter an unusable state.
Context
I tested this on both a PinePhone and PinePhone Pro running postmarketOS edge.
Which version did you encounter the bug in?
-
I Compiled it myself. If you compiled phosh from source please provide the git revision via e.g. by running git log -1 --pretty=oneline
and pasting the output below. -
I used the precompiled postmarketOS package (e.g. by running a prebuilt image). Please paste the output of apk info phosh
below.
Phosh Version: phosh-0.25.1-r0
How are you running phosh?
-
PureOS amd64 qemu image -
Mobile phone (model: PinePhone, PinePhone Pro , operating system version: postmarketOS edge (2023-03-01) ) -
Librem5 devkit -
nested compositor. If so please give the full command you start phosh with. -
other (please elaborate)
Releveant logfiles
tinydm log
-- tinydm ---
Date: Fri Mar 3 11:04:35 EST 2023
Session: /usr/share/wayland-sessions/phosh.desktop
Desktop: phosh
Exec: dbus-run-session /usr/bin/phosh-session
---
tinydm: sourcing file: /etc/tinydm.d/env-wayland.d/50-firefox-wayland.sh
tinydm: sourcing file: /etc/tinydm.d/env-wayland.d/50-sdl-wayland.sh
(phoc:2994): phoc-wlroots-CRITICAL **: 11:04:37.400: [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
(phoc:2994): phoc-wlroots-CRITICAL **: 11:04:37.400: [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
Running compositor on wayland display 'wayland-0'
phoc-output-Message: 11:04:41.270: Output 'DSI-1' added (''/''/''), 68mm x 136mm
phoc-server-Message: 11:04:43.496: Enabling shell mode
gnome-session-binary[3100]: WARNING: Failed to upload environment to systemd: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.freedesktop.systemd1" does not exist
** Message: 11:04:44.396: couldn't access control socket: /run/user/10000/keyring/control: No such file or directory** Message: 11:04:44.396: couldn't access control socket: /run/user/10000/keyring/control: No such file or directory** Message: 11:04:44.396: couldn't access control socket: /run/user/10000/keyring/control: No such file or directory
(phosh:3140): phosh-osk-manager-WARNING **: 11:04:49.320: Unable to toggle OSK: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name sm.puri.OSK0 was not provided by any .service files
(phosh:3140): Gtk-WARNING **: 11:04:49.549: HdyClamp does not have a child property called expand
(phosh:3140): Gtk-WARNING **: 11:04:49.550: HdyClamp does not have a child property called fill
(phosh:3140): Gtk-WARNING **: 11:04:49.550: HdyClamp does not have a child property called position
// Power button double pressed
(phoc:2994): phoc-output-WARNING **: 11:07:22.635: Failed to commit power mode change to 0 for 0xffff9d79d690
(phoc:2994): phoc-wlroots-CRITICAL **: 11:07:22.647: [types/output/output.c:634] Basic output test failed for DSI-1
(phoc:2994): phoc-wlroots-CRITICAL **: 11:07:25.588: [types/output/output.c:634] Basic output test failed for DSI-1
(phoc:2994): phoc-output-WARNING **: 11:07:25.588: Failed to commit power mode change to 0 for 0xffff9d79d690
(phoc:2994): phoc-wlroots-CRITICAL **: 11:07:26.487: [types/output/output.c:634] Basic output test failed for DSI-1
...
// After killing phosh.
(phoc:2994): phoc-wlroots-CRITICAL **: 11:08:00.042: [types/output/output.c:634] Basic output test failed for DSI-1
(phoc:2994): phoc-wlroots-CRITICAL **: 11:08:08.317: [types/output/output.c:634] Basic output test failed for DSI-1
(phoc:2994): phoc-wlroots-CRITICAL **: 11:08:38.324: [types/output/output.c:634] Basic output test failed for DSI-1
(phoc:2994): phoc-wlroots-CRITICAL **: 11:08:46.266: [types/output/output.c:634] Basic output test failed for DSI-1
... Repeats very rapidly. My log file had tens of thousands of lines in a few seconds.
Details
This is not an issue as recent as phosh 0.24.0, as tested on my PinePhone downgraded to postmarketOS v22.12.