| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Pull the 2 previous changes together to refresh the battery status for a
couple of seconds after receiving an event on the power line. This fixes
charge status being inaccurate for up to 120 seconds (the normal poll
timeout on MacBooks).
https://gitlab.freedesktop.org/upower/upower/issues/56
|
|
|
|
|
|
|
|
| |
When an event happens on the power line, and we are using a particular
device (in this case a MacBook or MacBookAir), we might need to poll
more aggressively after the event.
This adds a function to detect and export this.
|
|
|
|
|
| |
Rather than 5 calls to up_device_supply_setup_unknown_poll(), which
can happen pretty quickly together after receiving a uevent.
|
|
|
|
|
|
|
|
|
| |
Fix double-close on exit. If we created a GIOChannel from the file
descriptor, then g_io_channel_shutdown() will close that file descriptor
as well. Close the channel first, so that the file descriptor is only
closed manually if we didn't manage to create a GIOChannel from it.
https://gitlab.freedesktop.org/upower/upower/issues/60
|
|
|
|
|
|
| |
Don't leave the history files installed when running "make uninstall".
Those files will likely have been created by the test suite when running
"make distcheck"
|
| |
|
|
|
|
|
|
| |
sysfs_get_double_with_error() used to return -1.0 for errors, but in
some cases, we might want -1.0 to be a valid value, such as for negative
discharge rates. Return FALSE on error instead.
|
|
|
|
|
|
|
|
| |
The current power_supply support in the kernel will advertise an unknown
capacity when a device is being charged. This tests this state as well
as the expected behaviour when the device is fully charged.
https://bugs.freedesktop.org/show_bug.cgi?id=97484
|
|
|
|
|
|
|
| |
Rather than relying on the percentage equivalence, which just doesn't
work for "Unknown" battery levels.
https://bugs.freedesktop.org/show_bug.cgi?id=97484
|
|
|
|
|
|
|
|
|
|
| |
Rather than leaving the percentage untouched, set the battery level at
50.0 as a "middle-ground".
This percentage is supposed to be ignored if a BatteryLevel is set so
this is better than showing "0%" which makes it look like a bug.
https://bugs.freedesktop.org/show_bug.cgi?id=97484
|
| |
|
|
|
|
|
|
|
| |
Use systemd's service file to lockdown the UPower daemon to stop
eventual security problems.
https://bugs.freedesktop.org/show_bug.cgi?id=102898
|
|
|
|
|
|
|
|
| |
Newer kernels emit bind/unbind uevents that are not of interest to
powerd. To avoid littering logs with scary messages, let's lower their
severity to "debug".
https://bugs.freedesktop.org/show_bug.cgi?id=106018
|
| |
|
|
|
|
| |
For example, when using an incomplete mock logind.
|
|
|
|
|
|
|
|
|
| |
This adds an extra check to query if the iOS device has a
battery at all before actually trying to retrieve the battery
status. Should still work for older iOS versions which do not
provide this key.
https://bugzilla.freedesktop.org/show_bug.cgi?id=105625
|
|
|
|
|
|
|
|
| |
As Apple TVs do not have a battery and do not provide the
"BatteryIsCharging" lockdown key, upower would crash due to a
missing check whether the retrieved node is actually valid.
https://bugzilla.freedesktop.org/show_bug.cgi?id=105625
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92370
|
|
|
|
|
|
|
|
|
|
|
|
| |
As exported through BlueZ's org.bluez.Battery1 D-Bus interface. This
interface is only used for device where the battery information cannot
be processed in the kernel.
This is the first UpDevice type that doesn't use UdevDevice for the
Linux backend, and it is also the first that does not poll() status at
all.
https://bugs.freedesktop.org/show_bug.cgi?id=92370
|
|
|
|
|
|
| |
Rather than using != NULL, followed by unref().
https://bugs.freedesktop.org/show_bug.cgi?id=103380
|
|
|
|
|
|
| |
Rather than using != NULL, followed by unref().
https://bugs.freedesktop.org/show_bug.cgi?id=103380
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=103380
|
|
|
|
|
|
|
| |
Those "API documentation" don't document the function below it, they
just name it, so aren't needed.
https://bugs.freedesktop.org/show_bug.cgi?id=103380
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=99906
|
|
|
|
|
|
| |
Since libimobiledevice 5a8449a, LOCKDOWN_E_NOT_ENOUGH_DATA was renamed
to LOCKDOWN_E_RECEIVE_TIMEOUT. We'll use "-7" to avoid having to use
build glue.
|
|
|
|
|
|
|
|
|
|
| |
The take_action_timeout_cb() function returns G_SOURCE_REMOVE which
makes GLib destroy the timeout. However the action_timeout_id
stayed != 0 so when warning level turned to "action" again the daemon
assumed that the timeout is already set and did nothing.
(It only logged: "Not taking action, timeout id already set")
https://bugs.freedesktop.org/show_bug.cgi?id=87791
|
|
|
|
| |
The patchset was pushed by mistake and is still being reviewed.
|
|
|
|
|
|
|
|
|
| |
Remove pointless upperbound, SENSOR_MAX_TYPES has no meaning here
and we break from the loop anyway when needed (i.e. when ENOENT
is returned). This aligns the code with other sensor device
walkers in OpenBSD.
https://bugs.freedesktop.org/show_bug.cgi?id=95257
|
|
|
|
|
|
|
|
| |
If the poll timeout is actually changed because the warning level
has changed, only reset the actual poll code, not the warning level
notifications and the booking structures.
https://bugs.freedesktop.org/show_bug.cgi?id=99862
|
|
|
|
|
|
| |
No semantic change.
https://bugs.freedesktop.org/show_bug.cgi?id=99862
|
|
|
|
|
|
|
|
|
|
|
| |
When a device is refreshed because the poll timeout has been reached,
the warning-level change notification can also be fired, which then
will reset (i.e. disable, re-enable) polling. For batteries this can
happen three times in a row.
Now we reset polling only if the calculated timeout actually differs
from the current one.
https://bugs.freedesktop.org/show_bug.cgi?id=99862
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=93095
|
|
|
|
|
|
| |
GDBus doesn't like '@' in the object path, so escape it.
https://bugs.freedesktop.org/show_bug.cgi?id=93095
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92487
|
|
|
|
|
| |
Remove the trailing linefeed from the sysfs attribute to be able to
print it, and simplify the loop by the same token.
|
|
|
|
|
|
| |
The initial "refresh" for devices would fail if there was no data to
read. Instead, we should set the level to unknown, so that the device
appears in the Power panel, and in the "upower -d" output.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UPower sets property LidIsPresent to true only if hw.acpi.lid_switch_state
is different from "NONE", "NONE" being the default value for FreeBSD.
Thus, the property is always false on default configurations.
Force UPower not to care about the value of the sysctl, making it check
only for its existence.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175531
https://bugs.freedesktop.org/show_bug.cgi?id=101828
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "model_name" and "serial_number" information that upower exports for
batteries that supply a laptop or UPS are supposed to be that of the
battery. But that's very unlikely to happen for devices, such as
wireless mice, keyboards or joysticks.
Look for a sibling input device if a device battery does not contain
model information so as to avoid generic names in UIs.
https://bugs.freedesktop.org/show_bug.cgi?id=102493
|
|
|
|
|
|
|
| |
Move up_device_supply_get_sibling_with_subsystem() so we can use
it in up_device_supply_refresh_device()
https://bugs.freedesktop.org/show_bug.cgi?id=102493
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=102493
|
|
|
|
|
|
| |
Mostly for the type of device rather than the connections.
https://bugs.freedesktop.org/show_bug.cgi?id=102493
|
|
|
|
|
|
|
|
| |
The unref of the FD list for the inhibitor was missing which means that
the FD was leaked and the lock was never released. This means that for
each suspend/resume cycle a new inhibitor would be added.
Signed-off-by: Richard Hughes <richard@hughsie.com>
|
|
|
|
|
|
| |
Only set up the polling once the write has succeeded.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100626
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=100359
|
|
|
|
|
|
|
|
|
|
| |
Export approximate battery levels that devices can use, exported by
the kernel as POWER_SUPPLY_CAPACITY_LEVEL_* values.
This avoids bizarrely accurate values showing up in UIs when we only
have ok/warning levels of accuracy in some cases.
https://bugs.freedesktop.org/show_bug.cgi?id=100359
|
|
|
|
|
|
|
|
|
|
| |
Those levels will not be used to cover warning levels, but approximate
battery levels that devices can use, exported by the kernel as
POWER_SUPPLY_CAPACITY_LEVEL_* values.
See linux/power_supply.h
https://bugs.freedesktop.org/show_bug.cgi?id=100359
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices, such as a number of wireless Logitech unifying devices
don't have a precise battery level reporting, and use the Linux
POWER_SUPPLY_CAPACITY_LEVEL_* values.
This minimal fix matches the levels against approximate percentage
values. This is good enough to make the Logitech T650 report battery
again when using the kernel HID++ battery support.
https://bugs.freedesktop.org/show_bug.cgi?id=100359
|
|
|
|
|
|
|
|
|
| |
A 5% battery level should already be in "critical", this matches the
configurable thresholds where the bounds of critical warnings are
inclusive. This also makes it easier to create fake percentages for the
Logitech devices with coarse battery level reporting.
https://bugs.freedesktop.org/show_bug.cgi?id=100359
|
|
|
|
|
|
|
|
|
| |
Paths supplied to testbed.add_device() are relative to /sys/devices
already and therefore must not start with /sys/devices.
This does not change the result of the test.
https://bugs.freedesktop.org/show_bug.cgi?id=100539
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=99763
|