Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docked status slow to update #111

Closed
markhindley opened this issue Jan 19, 2019 · 8 comments
Closed

Docked status slow to update #111

markhindley opened this issue Jan 19, 2019 · 8 comments
Assignees
Labels

Comments

@markhindley
Copy link
Contributor

Sven,

Please see http://bugs.debian.org/919694

There are multiple things going on here but the significant one is the OP suggests that the Docked status is taking between 30s to several minutes to update. Therefore HandleLidSwitch is invoked rather than HandleLidSwitchDocked when he closes the lid in his docking station.

I wonder if HoldoffTimeout is a factor in this. But when I looked at he output of loginctl show-seat, I noticed the timeout configuration keys here are usually *USec whereas the manpage has the equivalents in *Sec. Which is correct?

Finally there is also an issue of multiple handlers for lid events. I suspect nothing can be done about that. What do you think?

I hope that isn't too many things in one issue!

Mark

@Yamakuzure
Copy link
Collaborator

That is definitely worth investigating. I do not have a docking station, so it is good that there is at someone who has, and can test this.

I am currently migrating the systemd-stable commits that flowed in during the last two weeks. Once I am finished with those, I'll have a look.

@Yamakuzure Yamakuzure self-assigned this Jan 21, 2019
@Yamakuzure Yamakuzure added the bug label Jan 21, 2019
@markhindley
Copy link
Contributor Author

markhindley commented Jan 21, 2019 via email

@Yamakuzure
Copy link
Collaborator

@markhindley Oh, I didn't mean you, but the OP you mentioned! 😉

I hope they are willing to help once we tackle this one...

@Yamakuzure
Copy link
Collaborator

Yamakuzure commented Feb 19, 2019

I wonder if HoldoffTimeout is a factor in this. But when I looked at he output of loginctl show-seat, I noticed the timeout configuration keys here are usually *USec whereas the manpage has the equivalents in *Sec. Which is correct?

The configuration parameter is parsed as seconds, but the manager variable is called holdoff_timeout_usec, which looks a bit weird.
The default value is 30 * USEC_PER_SEC, so the variable is definitely defaulting to USEC.
The parser for the configuration is parse_sec(), which simply uses parse_time(), which stores the time as usec_t.

So from the configuration point of view, everything is just fine.

the OP suggests that the Docked status is taking between 30s to several minutes to update.

That is weird, the docked status comes from a button event, and should update immediately. Something seems to hold the event back or catches it before it reaches elogind.

The OP wrote:

elogind appears to be unaware of acpi-support's overlapping functionality, and the maintainer scripts for elogind don't adjust elogind's configuration to disable lid/power/hibernate key handling if there's another ACPI event handler already installed on the system.

That is correct. Like systemd-login, it does not question local ACPI configurations.

Unfortunately I can not tell what the experience of the OP comes from.
The moment the system resumes, the lid switch is ignored for the configured amount of time. Whether the laptop is docked or not does not matter at all.
When you dock/undock the laptop, a button event is triggered, which is in effect at once.


My suspicion is, that the OP has something else calling elogind to suspend, as it would not by itself. From the code, it is just not possible. As they mentioned ACPI, I am curious to hear what stuff is running there.
Further elogind was installed as a dependency for something else. So what session manager is used? It does not seem to be systemd (wouldn't make any sense), so have they ConsoleKit2 running?

Having both elogind and CK running at the same time is not going to work.


However, if my assumption is not correct, a debug log would be nice. (If the OP is willing to help)

@Yamakuzure
Copy link
Collaborator

@markhindley : A little update, I wasn't able to find a reason for the "docked" status to update so slowly, yet.
Are there any news on your end?

@markhindley
Copy link
Contributor Author

markhindley commented Mar 12, 2019 via email

@markhindley
Copy link
Contributor Author

markhindley commented Mar 20, 2019 via email

@Yamakuzure
Copy link
Collaborator

I am closing this, as we need someone with a docking station to reproduce and to debug this... 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants