direc85 / harbour-batterybuddy

Battery level alert for Sailfish OS
GNU General Public License v3.0
8 stars 8 forks source link

No feedback from Battery Buddy on Jolla 1 #13

Closed davodego closed 4 years ago

davodego commented 4 years ago

I have a Jolla 1 and Battery Buddy is running but I dont notice any action from the app. Automatic charging control is on. Use notification is on. Limits are set. All seems fine. But nothing happend. A status lookup gives:

Active: failed (Resault: signal) since Sa 2020-06-06 16:23:32 CEST; 24h ago Main PID: 1003 (code=killed, signal=SEGV)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

And running from commandline with --verbose:

[nemo@Sailfish applications]$ harbour-batterybuddy --verbose
[I] unknown:0 - Loaded lowAlert 30
[I] unknown:0 - Loaded highAlert 90
[I] unknown:0 - Loaded interval 300
[I] unknown:0 - Loaded limitEnabled 1
[I] unknown:0 - Loaded notificationsEnabled 1
[I] unknown:0 - Loaded lowLimit 50
[I] unknown:0 - Loaded highLimit 80
[I] unknown:0 - Reading capacity from "/sys/class/power_supply/battery/capacity"
[I] unknown:0 - Reading charge state from "/sys/class/power_supply/battery/status"
[I] unknown:0 - Reading charger status from "/sys/class/power_supply/usb/present"
[W] unknown:0 - Charger control file "/sys/class/power_supply/usb/charger_disable" is not writable
[W] unknown:0 - Charger control feature disabled
[W] unknown:0 - Theme dir "/usr/share/themes/jolla/meegotouch/z0.9/" does not exist
[W] unknown:0 - Theme dir "/usr/share/themes/sailfish-default/meegotouch/z0.9/" does not exist
[I] unknown:0 - Saved limitEnabled 1
[I] unknown:0 - Saved notificationsEnabled 1
[I] unknown:0 - Launching GUI

And deamon gives:

[nemo@Sailfish applications]$ /usr/bin/harbour-batterybuddy-daemon --debug
[D] Settings::Settings:27 - Using "/home/nemo/.config/harbour-batterybuddy/harbour-batterybuddy.conf"
[D] Settings::updateConfig:76 - Reading values...
[I] Settings::loadInteger:66 - Loaded lowAlert 30
[I] Settings::loadInteger:66 - Loaded highAlert 90
[I] Settings::loadInteger:66 - Loaded interval 300
[I] Settings::loadInteger:66 - Loaded limitEnabled 1
[I] Settings::loadInteger:66 - Loaded notificationsEnabled 1
[I] Settings::loadInteger:66 - Loaded lowLimit 50
[I] Settings::loadInteger:66 - Loaded highLimit 80
[D] Settings::updateConfig:92 - Values read.
[D] Settings::updateConfig:101 - File OK
[I] Settings::Settings:49 - Loaded limitEnabled 1
[I] Battery::Battery:30 - Reading capacity from "/sys/class/power_supply/battery/capacity"
[I] Battery::Battery:34 - Reading charge state from "/sys/class/power_supply/battery/status"
[I] Battery::Battery:38 - Reading charger status from "/sys/class/power_supply/usb/present"
Segmentation fault

Any help or Ideas?

direc85 commented 4 years ago

I think I know what's going on. And it just so happens that I have a Jolla Phone, so I should be able to recreate this one myself :)

direc85 commented 4 years ago

The reason - I believe - is the daemon trying to write to the charging file using null QFile pointer. This is fixed in commit 87e72be and released already in version 3.3 (the version bump commit was done way after the release).

Another issue was preventing the service(s) from starting after upgrade. I'm not really 100% totally sure what caused it, but at least on my phone, there were leftovers from the previous service, and cleaning those seems to have helped. This was fixed in commit 3e38f46 and also released in 3.3.

I also tested this with my Jolla phones (one with SFOS 3.3.0 and another with SFOS 2.2.1) and they both react as they should, and don't segfault.

Is the bug fixed for you with version 3.3?

davodego commented 4 years ago

The problem is solved. I had a software bug that caused my Jolla to no longer start up. I had to do a factory reset the day before yesterday. After I imported all updates up to 3.3.0.16 again, I already installed version 3.3 without knowing it. The error no longer occurs. Batterybuddy is now doing what it should. Was it because of my Jolla or the update that it now works. I am thinking about the update because I had problems with Aliendalvik that led to the crash.

Thanks for your time and work!

davodego commented 4 years ago

Closed