[systemd-devel] logind: lid switch action not executed on small open/close delays

David Herrmann dh.herrmann at gmail.com
Sat Jan 17 09:36:01 PST 2015


Hi

On Sat, Jan 17, 2015 at 2:09 PM, Alad Wenter <alad at archlinux.info> wrote:
> On 01/17/2015 11:49 AM, David Herrmann wrote:
>>
>> Hi
>>
>> On Wed, Jan 14, 2015 at 10:54 PM, Alad Wenter <alad at archlinux.info> wrote:
>>>
>>> To clarify on my last message, it's 10 seconds before suspend from lid
>>> switch works again.
>>
>> Those delays are intentional. We have no idea how long the kernel
>> takes to probe all hardware during wake-up, so we have to wait for
>> possible docks to be detected. The kernel does not have a notion of
>> "settled" regarding hotplug-capable buses.
>
> Ok, I can see that; would it be reasonable to make this wait period
> configurable (if there is no such switch already)?

I have this issue on my TODO list for a long time now. It's really
ugly to solve and there's no nice way to introduce a notion of "bus is
settled"... hm...

I think it's reasonable to allow setting the base-timeout in
/etc/systemd/logind.conf, but I want to know Lennart's opinion first.
Preferably, this timeout was a kernel-timeout on the bus-probe itself.
But we don't have anything like this, so we need the excessive
timeouts in user-space as we cannot know whether we're just scheduled
late or whether the bus-probe really takes that long... Meh...

My system takes <5s to boot, so I could easily set those timeouts to
10s and everything would be fine. And I also don't care for hotplug
changes while the system is off/suspended, hence, I could even disable
the timeout and everything would just work.
Not really sure how to proceed...

Thanks
David


More information about the systemd-devel mailing list