Draft: samsung-serranovelte & -a5lte & -a5ulte: refresh rt5033-battery
This MR is a workaround for issue #1097 (closed).
For devices using the rt5033-battery fuel gauge, a series of circumstances leads to an wrong battery icon for 2 mins after boot. Thereafter, the battery icon turns into a correct one, some UIs also issue a sound, Phosh even lights up the lockscreen for a few secs.
An issue report was placed at UPower but it's unclear when this will be resolved. Writing the missing driver rt5033-charger would potentially also solve issue #1097 (closed), though it's not fully clear if this would work without solving the UPower issue.
The workaround is a udev file that triggers a refresh of the rt5033-battery information within UPower 5 secs after initialization.
File name number 95 was chosen because there are other UPower udev files of this number in /lib/udev/rules.d. It doesn't really matter.
I would have liked to avoid the --print-reply
option in the dbus-send command. In userspace, --type=method_call
works as well but unfortunately not during boot, I don't know why. Well, let's send the output of the --print-reply
option to the null device.
At user interfaces not using UPower, e.g. fbkeyboard, the dbus command would return an error message – even when there is the pipe to the null device after the dbus command. While the error message has no effect, it's still a bit unclean. Therefore, the udev file is placed into a subpackage that's solely installed if upower is installed as well.
Devices using the rt5033-battery fuel gauge are, to my knowledge:
- samsung-serranovelte
- samsung-a5lte
- samsung-a5ulte
The issue is not yet confirmed for samsung-a5lte
and samsung-a5ulte
. Could someone confirm whether these devices are affected or not?
Cc maintainers: @Minecrell @minlexx