According to my syslog, upowerd crash always follows a power_supply
error, so I thought there must be some connection:

Mar 10 02:59:45 dev kernel: [  160.051819] power_supply 
hid-00:12:a1:68:a3:1b-battery: driver failed to report `capacity' property: -5
Mar 10 02:59:45 dev kernel: [  160.137237] do_trap: 66 callbacks suppressed
Mar 10 02:59:45 dev kernel: [  160.137248] traps: upowerd[1502] trap int3 
ip:7f2c0c1b92b5 sp:7fff26f6c440 error:0

If you look into linux-*/drivers/power/power_supply_sysfs.c, you can
easily find the suspect:

        ssize_t ret = 0;
        ...

        if (off == POWER_SUPPLY_PROP_TYPE)
                value.intval = psy->type;
        else
                ret = psy->get_property(psy, off, &value);

        if (ret < 0) {
                if (ret == -ENODATA)
                        dev_dbg(dev, "driver has no data for `%s' property\n",
                                attr->attr.name);
                else if (ret != -ENODEV)
                        dev_err(dev, "driver failed to report `%s' property: 
%zd\n",
                                attr->attr.name, ret);
                return ret;
        }

Here, "ret" is assigned only once, which means psy->get_property()
returns -EIO (-5).

psy->get_property() is actually calls hidinput_get_battery_property()
from linux-*/drivers/hid/hid-input.c:

battery->get_property = hidinput_get_battery_property;

And the only place in hidinput_get_battery_property where we can get
-EIO is:

          case POWER_SUPPLY_PROP_CAPACITY:
                ret = dev->hid_get_raw_report(dev, dev->battery_report_id,
                                              buf, sizeof(buf),
                                              dev->battery_report_type);
                ...
                break;

... and my knowledge isn't enough to dig a little deeper ;)

So, as a temporary solution I've recompiled kernel with commented out
CONFIG_HID_BATTERY_STRENGTH and it works perfectly.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to upower in Ubuntu.
https://bugs.launchpad.net/bugs/1112907

Title:
  upowerd crashed with signal 5 in dbus_g_connection_register_g_object()

Status in “upower” package in Ubuntu:
  Confirmed

Bug description:
  .

  ProblemType: Crash
  DistroRelease: Ubuntu 13.04
  Package: upower 0.9.19-1ubuntu4
  ProcVersionSignature: Ubuntu 3.5.0-216.23-omap4 3.5.7.1
  Uname: Linux 3.5.0-216-omap4 armv7l
  ApportVersion: 2.8-0ubuntu3
  Architecture: armhf
  Date: Fri Feb  1 22:25:19 2013
  ExecutablePath: /usr/lib/upower/upowerd
  InstallationDate: Installed on 2013-01-17 (15 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha armhf+omap4 
(20130116)
  MarkForUpload: True
  ProcCmdline: /usr/lib/upower/upowerd
  ProcEnviron:
   
  Signal: 5
  SourcePackage: upower
  StacktraceTop:
   dbus_g_connection_register_g_object () from 
/usr/lib/arm-linux-gnueabihf/libdbus-glib-1.so.2
   ?? ()
   ?? ()
  Title: upowerd crashed with signal 5 in dbus_g_connection_register_g_object()
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/upower/+bug/1112907/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to