From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751377AbdFENJm (ORCPT ); Mon, 5 Jun 2017 09:09:42 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52034 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbdFENJk (ORCPT ); Mon, 5 Jun 2017 09:09:40 -0400 X-Originating-IP: 83.155.44.161 Message-ID: <1496668174.2570.33.camel@hadess.net> Subject: Re: [PATCH v3 00/19] Report power supply from hid-logitech-hidpp From: Bastien Nocera To: Jiri Kosina , Dave Hansen Cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 05 Jun 2017 15:09:34 +0200 In-Reply-To: References: <20170327145939.29824-1-benjamin.tissoires@redhat.com> <0cdc8dda-de3f-c3d0-07da-65612860a70f@intel.com> <1496345185.2570.3.camel@hadess.net> <20170602072907.GK1293@mail.corp.redhat.com> <02006322-6be2-f169-497e-06fc010a4bdb@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.2 (3.24.2-1.fc26) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-06-05 at 10:01 +0200, Jiri Kosina wrote: > On Fri, 2 Jun 2017, Dave Hansen wrote: > > > > > > > This will allow upower to not handle those devices anymore > > > > > > and to > > > > > > have more > > > > > > immediate reportng of the device to the system. > > > > > > > > > > FWIW, I'm on Ubuntu 14.04, and upower *is* reporting my mouse > > > > > battery > > > > > as > > > > > if it were a laptop battery. It's mostly garbage, and always > > > > > reports > > > > > 0%, which makes upower always tell me my laptop is 2/3 > > > > > charged (I > > > > > have 2 > > > > > real batteries). > > > > > > Well, the exported battery might be sending levels instead of > > > pourcentages. And upower needs to be upgraded to handle those :( > > > > It sounds like there are a number of things here where newer > > kernels are > > breaking older userspace. It's also causing some very end-user > > visible > > effects, like having folks' systems auto shut down because upower > > thinks > > their batteries are dead. > > > > Old versions of upower are obviously confused here. It would be > > really > > nice to ensure that newer kernels don't break it like this. > > > > IOW, it would be really nice if this were treated like a > > regression, > > because it's tantalizingly close. > > I agree with Dave. If there is no solution found in time for -rc5, > reverting to previous state would be the proper way to go. I don't see how it's possible to retroactively fix user-space. The best (but oh so backwards) way to fix this might be to wrap the functionality in a config option, for user-spaces that can't update their version of UPower. I still think it's counter-productive, the only consumer for this information is UPower, and it's been modified to work-around the fact that the kernel didn't export this battery information. It now does.