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
Suspend doesn't work after the laptop's lid is closed #1273
Comments
Please run |
Yeah, most likely something is just blocking the inhibiting, please use @grawity's suggested command line to check what tht might be. |
It says:
|
Same symptoms here. Started when I upgraded to systemd 226. Downgrading back to 225 fixes it for me. Any other info I could provide? |
Hmm, there's no obvious commit in logind between v225 and v226 that would explain that. Could you boot your system with |
I've also tested v225 and suspend works here just fine. After updating only the following packages: udev systemd libpam-systemd libnss-myhostname systemd-sysv, it stops. (it's debian distro) What logs exactly do you need? Just the messages between Lid closed and Lid opened or full logs from start to end? Anyways, in the case of v225, there's something like this:
And in the case of v226:
|
And the system is docked in both cases? I wonder why v225 doesn't detect this. Are you sure the configuration files, most importantly Again, the changes in logind between v225 and v226 are minimal, and none of them would explain the effect you see. |
@morfikov logind, seems to think your system is docked when you close the lid. Is it docked? systemd considers systems docked where this is either reported via an SW_DOCK input switch (which some laptop drivers expose), or if there's more than one screen attached and up. Is that the case for you? What does "grep . /sys/class/drm/*/status" say when this happens? |
I didn't change anything. I just upgraded/downgraded the packages. So the state of the machine was/is always the same, and in one case suspend works, and in the other doesn't. Config files are the same I think, and I included the content of the logind.conf at the beginning. Is it docked? Does it mean the power cable is connected? If yes, it's always connected. But it doesn't matter whether it's connected or not -- it doesn't work either way. There's only one screen:
|
Same problem here:
|
@poettering I've managed to figure out what's wrong. First of all, I was missing the following option:
After adding it, strange things started to happen. Hibernation/hybrid-sleep sometimes was working, and sometimes wasn't. That was because of ZRAM devices. I have two of them: one for the
When the
What will actually happen depends on the amount of data collected by the ZRAM device. There's also another thing worth mentioning. When I get the above message, and I issue again: It looks like the problem only affects hibernation/hybrid-sleep. Suspending works even when the ZRAM device is nearly full. Is it a bug, or hibernation shouldn't be used when ZRAM is used? |
I have no idea, sounds unrelated to systemd though, please talk to zram and hibernation kernel folks. Closing. |
Seems the systemd issue is versions > 225 changing to think the system is docked. |
FWIW, my laptop is only showing the internal display connected:
|
I have been experiencing a similar issue. Running |
I recently noticed that my laptop can't be suspended via closing its lid.
I have the following settings set in the
/etc/systemd/logind.conf
file:I tried to change
HandleLidSwitch
to something else: poweroff, suspend, hibernate -- none of them work.When I restarted
systemd-logind
, I got the following log:But when I close/open the lid, I get only the two messages:
All the commands:
work just fine when they're typed into the terminal.
I've changed the behavior of the power button so it could hibernate my machine -- it works and reacts to the assigned action.
The text was updated successfully, but these errors were encountered: