Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Bullseye kernel 5.10 rebooting is broken

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
cchip
Posts: 61
Joined: 2011-02-12 05:24

[SOLVED] Bullseye kernel 5.10 rebooting is broken

#1 Post by cchip »

Hi all,
Buster (and all earlier Debians) were good, but Bullseye kernel 5.10.0-8-amd64 (5.10.46-4) reboot functionality seems to be broken on my Thinkpad E531 laptop. When rebooting (i.e. ctrl-alt-del, running /sbin/reboot or selecting restart from Gnome menu), the system just shuts down. If the lid is closed the system does not start (I must press the power button.) If the lid is open the system shuts down, there is a few seconds pause and then it magically starts up.

If I install Busters kernel 4.19.0-17-amd64 (4.19.194-2) on Bullseye, rebooting works great just like it always did: no weird pausing and lid open/closed is irrelevant. So seems like Bullseye kernel is broken. I could start git bisecting, but perhaps someone has insight where the problem might lie? (I don't see any code changes in kernel/reboot.c that could cause this.)
Last edited by cchip on 2021-08-24 19:58, edited 1 time in total.

cchip
Posts: 61
Joined: 2011-02-12 05:24

Re: Bullseye kernel 5.10 rebooting is broken

#2 Post by cchip »

This is caused by the kernel config option CONFIG_RESET_ATTACK_MITIGATION=y. Kernel documentation says "This should only be enabled when userland is configured to clear the MemoryOverwriteRequest flag on clean shutdown after secrets have been evicted, since otherwise it will trigger even on clean reboots." Apparently Bullseye userland has no such flag clearing in place.

There is one related Debian bug report with different symptoms: https://bugs.debian.org/cgi-bin/bugrepo ... bug=970861
A bug report for Fedora with similar symptoms: https://bugzilla.redhat.com/show_bug.cgi?id=1532058

As a workaround, I put the following script in /lib/systemd/system-shutdown (there is another workaround in the Fedora bug report):

Code: Select all

#!/bin/sh

if [ "$1" = "reboot" ]; then
    /usr/bin/chattr -i /sys/firmware/efi/efivars/MemoryOverwriteRequestControl-e20939be-32d4-41be-a150-897f85d49829
    echo -n "\007\000\000\000\000" > /sys/firmware/efi/efivars/MemoryOverwriteRequestControl-e20939be-32d4-41be-a150-897f85d49829
fi

Post Reply