Comment 12 for bug 1086746

Revision history for this message
Gregoire Gentil (gregoire-gentil) wrote :

Here is an ugly patch that works for me (Logitech K810):

--- a/src/linux/up-device-supply.c 2013-06-08 15:07:46.161694077 -0700
+++ b/src/linux/up-device-supply.c 2013-06-08 15:07:05.665695138 -0700
@@ -867,6 +867,8 @@
   } else if (g_ascii_strcasecmp (device_type, "battery") == 0) {
    type = UP_DEVICE_KIND_BATTERY;
    supply->priv->is_power_supply = TRUE;
+gchar *device_name = up_device_supply_get_string (native_path, "model_name");
+if (device_name && ! g_ascii_strcasecmp (device_name, "Logitech K810")) goto out;
   } else if (g_ascii_strcasecmp (device_type, "USB") == 0) {

    /* use a heuristic to find the device type */