[OpenIndiana-discuss] question about HAL, DBUS and upowerd

Carsten Grzemba grzemba at contac-dt.de
Wed Nov 16 10:45:40 UTC 2022



Am 15.11.22 18:40 schrieb Carsten Grzemba via openindiana-discuss  <openindiana-discuss at openindiana.org>: 
> 
> Recently we fixed a problem with HAL and newer glib versions 
> 
> https://www.illumos.org/issues/15025
> 
> Now I see that on current OI the notifications for mate-power-manager no long work. So the battery and the AC adapter state in mate-panel not updated anymore. If I disconnect the AC adapter HAL changed the properties of 
> 
> /org/freedesktop/Hal/devices/pseudo/acpi_drv_0_battery0_0. This I can check with
> 
> lshal -l -u /org/freedesktop/Hal/devices/pseudo/acpi_drv_0_battery0_0
> 
> But there is no signaling for mate-power-manager to see
> 
> 'dbus-monitor --system' shows events:
> 
> signal time=1668508780.607616 sender=:1.6 -> destination=(null destination) serial=245 path=/org/freedesktop/Hal/devices/pseudo/acpi_drv_0_battery0_0; interface=org.freedeskt
> op.Hal.Device; member=PropertyModified
>  int32 1
>  array [
>  struct {
>  string "battery.rechargeable.is_charging"
>  boolean false
>  boolean false
>  }
>  ]
> signal time=1668508780.607884 sender=:1.6 -> destination=(null destination) serial=246 path=/org/freedesktop/Hal/devices/pseudo/acpi_drv_0_battery0_0; interface=org.freedeskt
> op.Hal.Device; member=PropertyModified
>  int32 1
>  array [
>  struct {
>  string "battery.rechargeable.is_discharging"
>  boolean false
>  boolean false
>  }
>  ]
> signal time=1668508780.608317 sender=:1.6 -> destination=(null destination) serial=247 path=/org/freedesktop/Hal/devices/pseudo/acpi_drv_0_battery0_0; interface=org.freedeskt
> op.Hal.Device; member=PropertyModified
>  int32 1
>  array [
>  struct {
>  string "battery.reporting.current"
>  boolean false
>  boolean false
>  }
>  ]
> 
> 
> A sender :1.6 signals the change of power state. 
> 
> 
> Who is the sender :1.6 on DBUS? dbus-send ListNames shows me some servies with names and some with only :1.numbers
> 
> On the former working setup I see event from UPower
> 
> signal time=1668508780.612616 sender=:1.5 -> destination=(null destination) serial=49 path=/org/freedesktop/UPower/devices/battery_acpi_drv_0_battery0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
>  string "org.freedesktop.UPower.Device"
>  array [
>  dict entry(
>  string "UpdateTime"
>  variant �� uint64 1668508780
>  )
>  dict entry(
>  string "Capacity"
>  variant double 72.7415
>  )
>  dict entry(
>  string "EnergyRate"
>  variant double 8.558
>  )
>  dict entry(
>  string "Energy"
>  variant double 17.626
>  )
>  dict entry(
>  string "IconName"
>  variant string "battery-full-symbolic"
>  )
>  dict entry(
>  string "TimeToEmpty"
>  variant int64 7414
>  )
>  dict entry(
>  string "Percentage"
>  variant double 72.7415
>  )
>  dict entry(
>  string "State"
>  variant uint32 2
>  )
>  ]
>  array [
>  ]
> 
> 
> This event I am missing on the current OI.
> 
> 
> On the fomer working setup I see with dbus-monitor --session also
> 
> method call time=1668508728.086076 sender=:1.19 -> destination=:1.42 serial=20 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
>  string "Energieverwaltung"
>  uint32 0
>  string "gpm-battery-080"
>  string "Akku entlädt"
>  string "2 Stunden 12 Minuten der Akkuladung verbleibend (73%)"
>  array [
>  ]
>  array [
>  dict entry(
>  string "urgency"
>  variant byte 1
>  )
>  ]
>  int32 30000
> 
> 
> On the current setup this method call I can't see with dbus-monitor --session.
> 
> The summary: the upowerd updates normally all 20s the battery properties and sends notifications to mate-panel. But in the moment it does not. 
> 
> 
> Any hints?
> 
> Many Thanks!
> -- 
> 
> Carsten
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
> 

  
Found the reason, it similar to https://www.illumos.org/issues/15025 and https://github.com/OpenIndiana/oi-userland/pull/9932 created.

-- 
Carsten


More information about the openindiana-discuss mailing list