[systemd-devel] [BUG] too many rfkill services

Lennart Poettering lennart at poettering.net
Thu Nov 20 16:26:36 PST 2014


On Thu, 20.11.14 19:56, Lukasz Stelmach (stlman at poczta.fm) wrote:

> I talked to the kernel guys at my office and they told me that it is
> quite usual (at least for USB devices, and my wlan and bt are USB)
> that devices are stopped and unregistered in the kernel before
> a system is suspended end reported as completely new ones
> with increased numbers after machine resumes.

So, I have now added some code that adds BindsTo= for the device unit
to the service. This won't fix much though, as the service is likely
to fail in ExecStop= because it cannot find the device anymore.

For cases like this the tool is entirely useless I figure, since it
can only save the rfkill state at shutdown now, but not on
unplug. This means each time the device appears as hotplug we restore
the state that was set during boot, but not the state from right
before we went to suspend.

I figure the only proper fix for this is to make some daemon take
responsibility, listen to events and store things to disk each time
the setting changes... Not too enthusiastic about adding that
though...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list