Skip to content

read is-present for devices at startup

While looking at another issue I noticed that the properties exported from upower are incorrect for the battery associated with a Wacom touchscreen on my laptop.

I don't have anything with a battery and the kernel reports that it's not present, but upower doesn't follow this.

# upower -d shows:

Device: /org/freedesktop/UPower/devices/keyboard_wacom_battery_0
  native-path:          wacom_battery_0
  model:                Wacom HID 52E8
  power supply:         no
  updated:              Wed 31 Dec 1969 06:00:00 PM CST (1676646321 seconds ago)
  has history:          yes
  has statistics:       yes
  keyboard
    present:             yes
    rechargeable:        yes
    state:               unknown
    warning-level:       none
    percentage:          0%
    icon-name:          'battery-missing-symbolic'

udevadm info shows:

P: /devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52E8.0002/power_supply/wacom_battery_0
L: 0
E: DEVPATH=/devices/platform/AMDI0010:01/i2c-1/i2c-WACF2200:00/0018:056A:52E8.0002/power_supply/wacom_battery_0
E: SUBSYSTEM=power_supply
E: POWER_SUPPLY_NAME=wacom_battery_0
E: POWER_SUPPLY_TYPE=Battery
E: POWER_SUPPLY_MODEL_NAME=Wacom HID 52E8
E: POWER_SUPPLY_PRESENT=0
E: POWER_SUPPLY_STATUS=Unknown
E: POWER_SUPPLY_SCOPE=Device
E: POWER_SUPPLY_CAPACITY=0

Merge request reports