Hi, Am So., 22. Jan. 2023 um 07:20 Uhr schrieb Markus Schaaf <markuschaaf@xxxxxxxxx>: > > 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
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.7-arch1-1] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org === START OF SMART DATA SECTION === SMART/Health Information (NVMe Log 0x02) Critical Warning: 0x00 Temperature: 26 Celsius Available Spare: 100% Available Spare Threshold: 10% Percentage Used: 2% Data Units Read: 73,127,101 [37.4 TB] Data Units Written: 29,719,744 [15.2 TB] Host Read Commands: 1,120,356,080 Host Write Commands: 596,524,911 Controller Busy Time: 2,469 Power Cycles: 7,473 Power On Hours: 2,435 Unsafe Shutdowns: 127 Media and Data Integrity Errors: 0 Error Information Log Entries: 8,383 Warning Comp. Temperature Time: 0 Critical Comp. Temperature Time: 0 Temperature Sensor 1: 26 Celsius Temperature Sensor 2: 29 Celsius