Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mce upower-battery module does not detect any battery #87

Closed
MerlijnWajer opened this issue Feb 25, 2018 · 6 comments
Assignees

Comments

@MerlijnWajer
Copy link
Member

@MerlijnWajer MerlijnWajer commented Feb 25, 2018

From mce startup log:

mce: path = /org/freedesktop/UPower/devices/battery_bq27200_0
mce: /org/freedesktop/UPower/devices/battery_bq27200_0 is NOT BATTERY
mce: path = /org/freedesktop/UPower/devices/battery_bq24150a_0
mce: /org/freedesktop/UPower/devices/battery_bq24150a_0 is NOT BATTERY
mce: path = /org/freedesktop/UPower/devices/line_power_isp1704
mce: /org/freedesktop/UPower/devices/line_power_isp1704 is NOT BATTERY
mce: path = /org/freedesktop/UPower/devices/battery_rx51_battery
mce: /org/freedesktop/UPower/devices/battery_rx51_battery is NOT BATTERY

updev_is_battery matches the NativePath property for the string battery -- this is plain wrong. Will look at the battery code I write before and modify it appropriately.

@MerlijnWajer MerlijnWajer self-assigned this Feb 25, 2018
@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 25, 2018

I am also not sure if it actually gets updates from battery stats. Note to self to check that.

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 25, 2018

Battery detection is fixed/improved in a4147de3d49940249f361d355999994ec90faa43

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 25, 2018

mce code calls this:

    if (!mce_dbus_handler_add(UPOWER_INTERFACE,
                              "DeviceChanged",
                              NULL,
                              DBUS_MESSAGE_TYPE_SIGNAL,
                              xup_device_changed_cb))
        return;

but DeviceChanged doesn't exist - see https://upower.freedesktop.org/docs/UPower.html

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 25, 2018

Thinking about just using/porting https://github.com/maemo-leste/status-area-applet-battery/blob/master/batmon.c for MCE. The current upower code seems quite broken.

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 25, 2018

I've decided to patch the code in mce; wip code is here https://github.com/maemo-leste/mce/tree/wip-battery-changed-monitoring

Commit message(s) explain what needs to be fixed still.

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.