ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.29k stars 110 forks source link

Phone still active and loging errors when screen is off #1885

Open RaphAstronome opened 2 years ago

RaphAstronome commented 2 years ago

Steps to reproduce

This happens when the phone is inactive (screen off) AND the phone is not connected to charger a lot of messages are logged to syslog.

If the phone is in use (screen on) OR the phone is connected to a charger, messages are normal.

Expected behavior

The phone should enter in low energy mode (I don't now exact term) and not constantly logs messages. This cause the battery discharge way faster.

Actual behavior

I have collected the messages just at the beginning of the trouble (see "logfiles").

I particularly noted "PM: Some devices failed to suspend". I search for this but I got only infos for PC computers where generally associated with a problem with a USB peripheral (but nothing is connected except internally) or ACPI but it seems to be on computer only (no /proc/acpi).

The mobile data and Wi-Fi are enabled. Presence or absence of a MicroSD don't change anything. I tried with bluetooth or GPS activated but it doesn't make change. I have reset the phone to factory defaults but is don't change anything meaning it is probably not a problem with any special configuration.

Logfiles and additional information

syslog_sample.txt (messages repeats continuously)

RaphAstronome commented 2 years ago

I make other tests and the problem seems happens only if WiFi or mobile data are enabled. Disabling both solve (or considerably reduce) the problem. With WiFi but no mobile data the problem occurs always. With mobile data but no WiFi the problem generally occurs (one of my tests show the problem solved but others don't).

So it should be linked with Internet connection.

RaphAstronome commented 2 years ago

I have updated to 2021-W52 and the problem remains. I tested on WiFi only, not mobile data because I have an other phone.

Flohack74 commented 2 years ago

Sorry to say but even if we wanted, we cannot fix this problem as we do not have any public build tree for the commercial devices from BQ and Meizu. We cannot therefore patch such issues. The images we use are quite old, probably from 2015. How did you obtain those logs, were you logged in with ssh?

RaphAstronome commented 2 years ago

Thank you for your message. First time I obtained the logs via SSH server but I rapidly tested without any active connection (but the SSH server still active). The tests are usually done by :

mardy commented 2 years ago

I was actually able to build the kernel of the BQ E4.5 on Ubuntu 20.04 and updated the instructions accordingly. However the resulting kernel appears to be much more verbose than the previous one — hopefully it's just because of some debugging option.

The main problem here is that debugging power management issues is generally hard, and here it's not clear how big of an effect this issue has on the battery; it's not unexpected for a device to be active when connected to the WIFI. @RaphAstronome, if you have the time and the will, you are very welcome to look into this issue yourself; I'm suggesting this because I suspect it will be unlikely that someone will want to look into this. The first thing I'd check is whether these wakeups are due to high WIFI activity: so, try first to connect to the WIFI when there are no other devices connected, and see if this makes a difference.

RaphAstronome commented 2 years ago

I made some new tests and when the phone is with WiFi actived but not connected (away from the access point) logging is normal.

Test_long_away_but_others In this test I lost the connection because of distance at minute ~15. I return to home at ~220 (reconnecting automatically). During this test others unknown WiFi hotspots are visible (but not connected because password unknown).

During tests with no access point at all : no abusive logging too.

Version used : 2022-W04 No SIM installed

Edit : I don't use this phone anymore so don't work extensively on that bug if you don't think much people are affected.