syslog flooded with "Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7"

Bug #1896137 reported by Gerald Gilbert-Thorple
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When I close the lid on my laptop, syslog goes crazy with the message

systemd-logind: hibernation is restricted; see man kernel_lockdown.7

repeated ad infinitum, using up all the CPU and GBs of disk space. I am not even trying to hibernate; everything in /etc/systemd/login.conf is commented out. So nothing much should happen when I close the lid, but systemd is trying to kill me with these messages. I am running Ubuntu 20.04.

description: updated
affects: perf-tools-unstable (Ubuntu) → systemd (Ubuntu)
description: updated
Revision history for this message
Gerald Gilbert-Thorple (gxgilthor) wrote :

by unmasking sleep.target suspend.target hibernate.target hybrid-sleep.target, and allowing for suspend on lid closure in login.conf, I was able to make the problem go away, but why should I be forced to this?

Revision history for this message
Dan Streetman (ddstreet) wrote :

> by unmasking

those targets don't come masked by default, how did they get masked?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Gerald Gilbert-Thorple (gxgilthor) wrote :

That's right, I masked them by hand following some advice on the internet for how to make systemd stop suspending, since it was not responding to settings in login.conf even after restating logind
service.

Regardless of my motivation, it seems buggy that changing these settings should lead to such undesirable behavior.

Revision history for this message
dev (darkraspberry) wrote :

I am affected with this. My kernel yells "Lockdown: systemd[1]: hibernation is restricted; see man kernel_lockdown.7" during boot.

And make my system impossible to boot. Some day it take time upto 10 MIN.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for systemd (Ubuntu) because there has been no activity for 60 days.]

Changed in systemd (Ubuntu):
status: Incomplete → Expired
Revision history for this message
JP Guisset (ubuntuforums-jpgu) wrote :

I am using an old laptop as server. The internal screen has been removed. When no external display is connected, the system quickly goes to sleep mode. To avoid this I had masked sleep.target and suspend.target, which resulted in the described repeated "systemd-logind: hibernation is restricted; see man kernel_lockdown.7" and 80% load by systemd-logind.

I could avoid suspend without triggering this issue by modifying /etc/systemd/logind.conf:
 HandleSuspendKey=ignore
 HandleHibernateKey=ignore
 HandleLidSwitch=ignore
 HandleHibernateKey=ignore

Revision history for this message
Max (bubuta) wrote :

I see those messages as well although in my case all the sleep.target suspend.target hibernate.target hybrid-sleep.target targets are unmasked. Note: I'm not trying to suspend or hybernate, the laptop is running on external power. Is there a way to figure out what's causing those messages?

Changed in systemd (Ubuntu):
status: Expired → New
Revision history for this message
Dan Streetman (ddstreet) wrote :

this message comes from the kernel, not systemd.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Dan Streetman (ddstreet)
affects: systemd (Ubuntu) → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1896137

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Leonard/Janis (ljrk) wrote :

This issue arises whenever system-logind access the `/sys/power/disk` file. Reproduce using `cat /sys/power/disk` and you'll find

    kernel: Lockdown: cat: hibernation is restricted; see man kernel_lockdown.7

in the kernel log. This is per-se harmless but does flood the log with garbage.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.