Hi, Am So., 22. Jan. 2023 um 07:20 Uhr schrieb Markus Schaaf <markuschaaf@gmail.com>:
Cursory reading some kernel sources, I could not find any knob. But while looking through the code, I realized that a simple module could do the trick. So here it is: https://github.com/markuschaaf/linux-delay_power_off
Before attempting to install your kernel module, I'd like to verify that it is actually needed for me. To find out about this, I am attaching the current ``# smartctl -A /dev/nvm0n1`` output. There are 127 "Unsafe Shutdowns" counted. I have been working with this machine for 5-6 years now. It is very rare that I shut it down ungracefully by pressing the power button. Can you maybe detail a little the actual symptoms of these unsafe shutdowns? My box is dual-booting Arch Linux and Windows 10 Pro. To move data from one system to the other, there is an ExFAT partition on the SSD. Sometimes I observe somewhat "strange" phenomena when using this partition. I guessed that it might be shutdown-related and therefore am mounting/unmounting the volume when my user 'friedrich' logs in and off, but the "stangeness" was, if I am not mistaken, not entirely remedied by this step. I remember my symptoms rather vaguely, but it has to do with files missing on Windows, while a boot back into Linux, logging on and off, and rebooting Windows might have sorted the issue. I am sorry that I cannot give more reliable details. I never asked for help on mailing lists because my anamnesis is inprecise and cannot pinpoint the issue. But with your ideas, I'd like to give it a try, to maybe solve (and understand!) the problem. Best, Friedrich