Closed petRUShka closed 1 year ago
I've never had a problem related to autorandr and sleep. But maybe that is because I always unplug an external screen before putting the laptop to sleep, and wake the laptop before plugging in an external screen.
I'd enable autorandr.service, but I don't like the look of autorandr-lid-listener.service. It is just executing libinput debug-events
every 30 seconds and looks at the output for a lid event. That seems like a dirty hack. I think it would be much better to hook into acpid or something like that.
However, any version of the second service should be unnecessary for spark users. Spark configures logind to put the laptop to sleep when the lid closes. The autorandr.service executes autorandr when waking from sleep. So enabling just that first service accomplishes the goal of having autorandr execute when the lid opens.
If you drop the second service, I'd merge a pull request that just enabled autorandr.service.
@pigmonkey, thanks for comment. I've dropped autorandr-lid-listener.service.
By the way. You are writing:
However, any version of the second service should be unnecessary for spark users. Spark configures logind to put the laptop to sleep when the lid closes.
It is like that if no external monitor is plugged. But if we have external monitor plugged closing lid doesn't force laptop to sleep.
So possible It is better to have both services enabled.
I agree with you and I've created the issue https://github.com/phillipberndt/autorandr/issues/333 about dirty hack.
In laptop case there are some troubles when you have external monitor and unplug it when laptop sleeps. In that case you have blank screen.
To prevent this autorandr team prepared autorandr.service.
Another case is necessity for autorandr to start automatically when lid is closed or opened. Autorandr team prepared autorandr-lid-listener.service.
Both services are part of autorandr arch linux package. So the only thing that is left: to enable them.