[Librem-5-dev] Power management issues

Guido Günther agx at sigxcpu.org
Tue Oct 23 05:49:26 PDT 2018


Hi,
On Tue, Oct 23, 2018 at 10:40:49AM +0200, Benjamin Berg via Librem-5-dev wrote:
> Hi,
> 
> On Tue, 2018-10-23 at 10:23 +0200, Guido Günther wrote:
> > On Mon, Oct 22, 2018 at 10:29:58AM +0200, Benjamin Berg via Librem-5-dev wrote:
> > > Hrm, kill switches. What about
> > >   https://bugzilla.gnome.org/show_bug.cgi?id=761051
> > 
> > Yeah I think we'll hit this and it even gets a bit more complex since
> > the hardware kill switches are (AFAIK) not known to the rfkill framework
> > in the kernel when switched off since they get "unplugged" so we might
> > need to teach g-s-d to read devices that might be there (switched on) or
> > not (switched off). This could be parsed from /sys though. I know better
> > how this all behaves in a couple of days and will then file bugs to move
> > the discussion over (this also affects laptops with hardware kill
> > switches).
> 
> Hm, it depends on what you can detect in the hardware and how you hook
> things up.
> 
> We already have a similar situation on Lenovo with the bluetooth
> switch. There we have a "thinkpad_acpi" rfkill switch, which is only
> in-hardware. If this switch is enabled, the USB bluetooth dongle
> disappears completely.

Good point! I totally forgot the rfkill can handle hw and sw kill
switches.

> 
> So, I think in your case a similar approach would be sensible. Assuming
> you can detect the switch state, you simply export it as an rfkill
> hardware switch in your platform driver, and things should work
> correctly at least in theory.

It seems we can't detect the switch state for the devkits but we might
be able to fix this up for the phone.

Cheers,
 -- Guido


More information about the Librem-5-dev mailing list