GloDroid / glodroid_manifest

Android port that aims to bring both user- and developer-friendly experience in using AOSP with a set of single-board computers (SBC), phones and other devices.
471 stars 67 forks source link

PINEPHONE: Display not waking from sleep #37

Closed nas00 closed 4 years ago

nas00 commented 4 years ago

Noticed that pressing the power button leads to varying delay in the display going off or coming back on again. The delay is mainly on the turning-back-on side and can be 1-2secs but can sometimes remains black for several minutes - at which point I usually hard reboot

Today I had the phone plugged into the usb socket of my pc and pressed the power button to turn the display off - but it would not come back on. Un/re-plugging the usb cable made no difference but pressing the power button several times appeared to force the screen on. Here are the parts of the dmesg log which seem relevant - I disconnected the usb cable when the black screen was stuck and plugged it in again once the display returned:

[13029.862907] healthd: battery l=69 v=3903 t=0.0 h=2 st=3 c=46 chg=au [13075.159656] alloc_contig_range: 334 callbacks suppressed[13029.862907] healthd: battery l=69 v=3903 t=0.0 h=2 st=3 c=46 chg=au [13075.159656] alloc_contig_range: 334 callbacks suppressed [13075.159666] alloc_contig_range: [b0a00, b0df5) PFNs busy [13075.179255] alloc_contig_range: [b1a00, b1df5) PFNs busy [13075.188142] alloc_contig_range: [b1b00, b1ef5) PFNs busy [13075.198083] alloc_contig_range: [b1c00, b1ff5) PFNs busy [13075.203852] alloc_contig_range: [b1d00, b20f5) PFNs busy [13075.209596] alloc_contig_range: [b1e00, b21f5) PFNs busy [13075.219281] alloc_contig_range: [b1f00, b22f5) PFNs busy [13075.225044] alloc_contig_range: [b2000, b23f5) PFNs busy [13075.230639] alloc_contig_range: [b2100, b24f5) PFNs busy [13075.240137] alloc_contig_range: [b2200, b25f5) PFNs busy [13076.103133] PM: suspend entry (s2idle) [13076.107170] Filesystems sync: 0.000 seconds [13076.115515] Freezing user space processes ... (elapsed 0.002 seconds) done. [13076.128516] OOM killer disabled. [13076.131784] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [13076.144687] printk: Suspending console(s) (use no_console_suspend to debug) [13126.742290] musb-sunxi 1c19000.usb: Error unknown readb offset 112 [13126.742351] PM: Some devices failed to suspend, or early wake event detected [13126.742456] musb-sunxi 1c19000.usb: Error unknown writeb offset 112 [13126.742645] android_work: sent uevent USB_STATE=DISCONNECTED [13127.545762] OOM killer enabled. [13127.548929] Restarting tasks ... done. [13127.571285] healthd: battery l=68 v=3847 t=0.0 h=2 st=3 c=442 chg= [13127.571422] PM: suspend exit [13127.594630] healthd: battery l=68 v=3847 t=0.0 h=2 st=3 c=442 chg= [13127.603005] healthd: battery l=68 v=3847 t=0.0 h=2 st=3 c=442 chg= [13127.610679] healthd: battery l=68 v=3847 t=0.0 h=2 st=3 c=442 chg= [13127.711749] android_work: did not send uevent (0 0 00000000177a9e42) [13127.723275] read descriptors [13127.726437] read strings [13127.730404] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (/init.usb.configfs.rc:20) [13127.780817] init: Untracked pid 10736 exited with status 0 [13127.786905] alloc_contig_range: 172 callbacks suppressed [13127.786915] alloc_contig_range: [b0a00, b0df5) PFNs busy [13127.859332] alloc_contig_range: [b0a00, b0df5) PFNs busy [13127.876448] alloc_contig_range: [b1a00, b1df5) PFNs busy [13127.887613] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (/init.usb.configfs.rc:23) took 67ms and succeeded [13127.909030] alloc_contig_range: [b1b00, b1ef5) PFNs busy [13127.914924] alloc_contig_range: [b1c00, b1ff5) PFNs busy [13127.922057] alloc_contig_range: [b1d00, b20f5) PFNs busy [13127.931263] alloc_contig_range: [b1e00, b21f5) PFNs busy [13127.947291] alloc_contig_range: [b1f00, b22f5) PFNs busy [13127.961990] alloc_contig_range: [b2000, b23f5) PFNs busy [13127.978973] alloc_contig_range: [b2100, b24f5) PFNs busy [13128.063505] type=1400 audit(1594400767.204:435): avc: denied { syslog_read } for comm="dmesg" scontext=u:r:untrusted_app_27:s0:c98,c256,c512,c768 tcontext=u:r:kernel:s0 tclass=system permissive=1 app=com.arachnoid.sshelper [13128.085121] type=1400 audit(1594400897.584:436): avc: denied { read } for comm="sensors@1.0-ser" name="iio:device2" dev="tmpfs" ino=12837 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:iio_device:s0 tclass=chr_file permissive=1 [13128.106698] type=1400 audit(1594400897.584:436): avc: denied { read } for comm="sensors@1.0-ser" name="iio:device2" dev="tmpfs" ino=12837 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:iio_device:s0 tclass=chr_file permissive=1 [13128.127881] type=1400 audit(1594400897.584:437): avc: denied { open } for comm="sensors@1.0-ser" path="/dev/iio:device2" dev="tmpfs" ino=12837 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:iio_device:s0 tclass=chr_file permissive=1 [13138.630306] healthd: battery l=68 v=3811 t=0.0 h=2 st=3 c=674 chg= [13138.717105] android_work: did not send uevent (0 0 00000000177a9e42) [13138.759641] healthd: battery l=68 v=3878 t=0.0 h=2 st=3 c=116 chg=au [13138.771147] healthd: battery l=68 v=3878 t=0.0 h=2 st=3 c=116 chg=au [13138.821096] healthd: battery l=68 v=3878 t=0.0 h=2 st=3 c=116 chg=au [13138.959280] android_work: sent uevent USB_STATE=CONNECTED [13138.986621] android_work: sent uevent USB_STATE=CONFIGURED [13139.118452] type=1400 audit(1594400897.584:437): avc: denied { open } for comm="sensors@1.0-ser" path="/dev/iio:device2" dev="tmpfs" ino=12837 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:iio_device:s0 tclass=chr_file permissive=1 [13139.140026] type=1400 audit(1594400908.636:438): avc: denied { read } for comm="sensors@1.0-ser" name="in_accel_z_raw" dev="sysfs" ino=22057 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [13139.161146] type=1400 audit(1594400908.636:438): avc: denied { read } for comm="sensors@1.0-ser" name="in_accel_z_raw" dev="sysfs" ino=22057 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [13139.182095] type=1400 audit(1594400908.636:439): avc: denied { open } for comm="sensors@1.0-ser" path="/sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-0068/iio:device2/in_accel_z_raw" dev="sysfs" ino=22057 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [13146.138716] type=1400 audit(1594400908.636:439): avc: denied { open } for comm="sensors@1.0-ser" path="/sys/devices/platform/soc/1c2b000.i2c/i2c-1/1-0068/iio:device2/in_accel_z_raw" dev="sysfs" ino=22057 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 [13146.155178] audit: audit_lost=101 audit_rate_limit=5 audit_backlog_limit=64

nas00 commented 4 years ago

I tried again just now with logcat running in adb shell:

07-10 21:15:34.664 478 568 D WindowManager: powerPress: eventTime=587976 interactive=true count=1 beganFromNonInteractive=false mShortPressOnPowerBehavior=1 07-10 21:15:34.664 478 568 I PowerManagerService: Going to sleep due to power_button (uid 1000)... 07-10 21:15:34.665 478 478 W UsageStatsService: Event reported without a package name, eventType:16 07-10 21:15:34.675 478 514 I PowerManagerService: Sleeping (uid 1000)... 07-10 21:15:35.392 478 514 I DisplayPowerController: Blocking screen off 07-10 21:15:35.393 478 514 I DisplayPowerController: Unblocked screen off after 2 ms 07-10 21:15:35.394 478 514 D ActivityTaskManager: Top Process State changed to PROCESS_STATE_TOP_SLEEPING 07-10 21:15:35.404 344 344 I Sensors : Disabling sensor 2 (iio device 2: MPU6050 Accelerometer) 07-10 21:15:35.388 341 341 I light@2.0-servi: type=1400 audit(0.0:259): avc: denied { write } for name="brightness" dev="sysfs" ino=21226 scontext=u:r:hal_light_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1 07-10 21:15:35.496 344 344 I Sensors : Disabling sensor 6 (iio device 3: STK3310 Proximity) 07-10 21:15:35.500 478 514 E Surface : getSlotFromBufferLocked: unknown buffer: 0x0 07-10 21:15:35.500 478 514 W EGL-MAIN: ANativeWindow::cancelBuffer failed 07-10 21:15:35.500 478 514 V DisplayPowerController: Brightness [0] reason changing to: 'screen_off', previous reason: 'manual'. 07-10 21:15:35.501 478 500 I DisplayManagerService: Display device changed state: "Built-in Screen", OFF 07-10 21:15:35.516 616 616 D ImageWallpaper: wallpaper visibility changes to: false 07-10 21:15:35.521 355 355 D SurfaceFlinger: Setting power mode 0 on display 0 07-10 21:15:35.552 355 355 D SurfaceFlinger: Finished setting power mode 0 on display 0 07-10 21:15:35.570 333 333 W tinyhal : adev_set_parameters 'screen_state=off' 07-10 21:15:35.570 478 577 E SupplicantStaIfaceHal: ISupplicantStaIface.setSuspendModeEnabled failed: {.code = FAILURE_UNKNOWN, .debugMessage = }

Seems to lock up everytime when connected to usb but more infrequent when on battery power - may be two unrelated issues.

nas00 commented 4 years ago

Doesn't seem to lock-up in https://github.com/GloDroid/glodroid_manifest/issues/58 so will close for now.