You are not logged in.

#1 2018-09-13 21:50:30

mathewcohle
Member
Registered: 2017-05-07
Posts: 2

[SOLVED] kb-light.py has started to throw org.freedesktop.DBus.Error.U

I've started to get following error recently when running vanilla kb-light.py:

Traceback (most recent call last):
  File "shit1.py", line 28, in <module>
    print(kb_light_set(17))
  File "shit1.py", line 11, in kb_light_set
    current = kbd_backlight.GetBrightness()
  File "/usr/lib/python3.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.UPower.KbdBacklight' on object at path /org/freedesktop/UPower/KbdBacklight

Relevant dependencies info:

$ pacman -Qi upower python-dbus

Name            : upower
Version         : 0.99.8-1
Description     : Abstraction for enumerating power devices, listening to device events and querying history and statistics
Architecture    : x86_64
URL             : https://upower.freedesktop.org
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : systemd  libusb  libimobiledevice  libgudev
Optional Deps   : None
Required By     : solid  xfce4-power-manager
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 611.00 KiB
Packager        : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Build Date      : Tue 28 Aug 2018 10:45:01 AM CEST
Install Date    : Mon 03 Sep 2018 09:40:36 AM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Name            : python-dbus
Version         : 1.2.8-2
Description     : Python bindings for DBUS
Architecture    : x86_64
URL             : https://www.freedesktop.org/wiki/Software/DBusBindings
Licenses        : GPL  LGPL
Groups          : None
Provides        : None
Depends On      : dbus  glib2  python-dbus-common  python
Optional Deps   : None
Required By     : None
Optional For    : avahi  python-pyqt5
Conflicts With  : None
Replaces        : None
Installed Size  : 540.00 KiB
Packager        : Felix Yan <felixonmars@archlinux.org>
Build Date      : Sat 30 Jun 2018 11:40:28 PM CEST
Install Date    : Mon 13 Aug 2018 07:26:12 AM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

I've debugged it for a while and it seemed to me that simply no interface is available for the object path used in the script

$ gdbus introspect --system --dest org.freedesktop.UPower --object-path /org/freedesktop/UPower/KbdBacklight
node /org/freedesktop/UPower/KbdBacklight {
};

(but my experience with D-bus is equal to this evening debug session, so not really sure I've checked it right)
upower docs

Last edited by mathewcohle (2018-09-14 07:38:41)

Offline

#2 2018-09-13 21:56:45

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [SOLVED] kb-light.py has started to throw org.freedesktop.DBus.Error.U

https://bugs.archlinux.org/task/59984
Edit:
May well not be the same issue but would update the package to rule it out.

Last edited by loqs (2018-09-13 22:05:01)

Offline

#3 2018-09-14 07:35:38

mathewcohle
Member
Registered: 2017-05-07
Posts: 2

Re: [SOLVED] kb-light.py has started to throw org.freedesktop.DBus.Error.U

Thank @loqs, I've updated and reboot, kb-light.py is now working as before

$ pacman -Qi upower

Name            : upower
Version         : 0.99.8-2
Description     : Abstraction for enumerating power devices, listening to device events and querying history and statistics
Architecture    : x86_64
URL             : https://upower.freedesktop.org
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : systemd  libusb  libimobiledevice  libgudev
Optional Deps   : None
Required By     : solid  xfce4-power-manager
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 620.00 KiB
Packager        : Jan de Groot <jgc@archlinux.org>
Build Date      : Wed 12 Sep 2018 11:29:06 PM CEST
Install Date    : Fri 14 Sep 2018 12:06:53 AM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

also the output of gdbus is as expected

gdbus introspect --system --dest org.freedesktop.UPower --object-path /org/freedesktop/UPower/KbdBacklight
node /org/freedesktop/UPower/KbdBacklight {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface org.freedesktop.UPower.KbdBacklight {
    methods:
      GetMaxBrightness(out i value);
      GetBrightness(out i value);
      SetBrightness(in  i value);
    signals:
      BrightnessChanged(i value);
      BrightnessChangedWithSource(i value,
                                  s source);
    properties:
  };
};

Last edited by mathewcohle (2018-09-14 07:39:31)

Offline

Board footer

Powered by FluxBB