Re: Linux kernel: delay before power-off

2023-01-23 Thread Guus Snijders
Op ma 23 jan. 2023 20:32 schreef Genes Lists : > On 1/23/23 14:22, Markus Schaaf wrote: > > > > >> Have you observed any ill effects? > > > > Of what? Waiting two more seconds for power-off? No. > > No the opposite - ill effects of not waiting. > While not directly related; i think i've seen the

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
On 1/23/23 14:22, Markus Schaaf wrote: Have you observed any ill effects? Of what? Waiting two more seconds for power-off? No. No the opposite - ill effects of not waiting.

Re: Linux kernel: delay before power-off

2023-01-23 Thread Markus Schaaf
Am 23.01.23 um 19:47 schrieb Genes Lists: So the hardware just lies - What a surprise. Disk firmware has been lying for ages. Acknowledging write barriers or cache flushes early, to look good in benchmarks, for instance. perhaps they should just add a capacitor on board with enough juice

Re: Linux kernel: delay before power-off

2023-01-23 Thread Mike Cloaked
On Mon, Jan 23, 2023 at 6:20 PM Genes Lists wrote: > > 1) Further thoughts - in my case with nvme module built in to kernel, > parameters can be set using kernel boot command line. > > 2) Also this may be useful, I found this tidbit from 2017 in case your > hardware has this: > > ommit 07fbd32a6b

Re: Linux kernel: delay before power-off

2023-01-23 Thread Mike Cloaked
On Mon, Jan 23, 2023 at 6:05 PM Genes Lists wrote: > > For what it's worth - on a machine with nvme I don't see > shutdown_timeout in either > > $ ls /sys/module/nvme/parameters/ > or > $ modinfo nvme > > So that's mildly interesting :) > Not that it matters here, but I build nvme into my kernels

Re: Linux kernel: delay before power-off

2023-01-23 Thread u34
Markus Schaaf wrote: > Am 23.01.23 um 17:40 schrieb Friedrich Romstedt: > > > Can you maybe detail a little the actual symptoms of these unsafe > > shutdowns? > > The post I linked to explains the problem rather well. Devices > are sent a stop/shutdown message shortly before the system is > l

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
On 1/23/23 13:35, Markus Schaaf wrote: Very interesting thanks for clarifying Markus. So the hardware just lies - perhaps they should just add a capacitor on board with enough juice to finish the cache flush or something. Have you observed any ill effects? gene

Re: Linux kernel: delay before power-off

2023-01-23 Thread Markus Schaaf
Am 23.01.23 um 17:40 schrieb Friedrich Romstedt: Can you maybe detail a little the actual symptoms of these unsafe shutdowns? The post I linked to explains the problem rather well. Devices are sent a stop/shutdown message shortly before the system is losing power. The devices acknowledge the

Re: Linux kernel: delay before power-off

2023-01-23 Thread Markus Schaaf
Am 23.01.23 um 18:08 schrieb Genes Lists: I haven't been following this thread - but I'm curious. Does this very old commit (2014) not do what's needed? commit 2484f40780b97df1b5eb09e78ce4efaa78b21875 Author: Dan McLeran Date: Tue Jul 1 09:33:32 2014 -0600 NVMe: Add shutdown timeout

Re: Linux kernel: delay before power-off

2023-01-23 Thread Friedrich Romstedt
Am Mo., 23. Jan. 2023 um 19:31 Uhr schrieb Genes Lists : > > On 1/23/23 12:24, Friedrich Romstedt wrote: > > If there is some kind of parameter already present I would prefer using > > this. > > > You could try adding > > nvme.shutdown_timeout=10 > > to kernel boot line Cool, thanks!

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
On 1/23/23 12:24, Friedrich Romstedt wrote: Hi! .. If there is some kind of parameter already present I would prefer using this. You could try adding nvme.shutdown_timeout=10 to kernel boot line gene

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
1) Further thoughts - in my case with nvme module built in to kernel, parameters can be set using kernel boot command line. 2) Also this may be useful, I found this tidbit from 2017 in case your hardware has this: ommit 07fbd32a6b215d8b2fc01ccc89622207b9b782fd Author: Martin K. Petersen D

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
For what it's worth - on a machine with nvme I don't see shutdown_timeout in either $ ls /sys/module/nvme/parameters/ or $ modinfo nvme So that's mildly interesting :) Not that it matters here, but I build nvme into my kernels rather than as a dynamic loaded module like arch kernels do. g

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
What commit do you refer here to? From googling the hash I guess it is some kind of a kernel patch, but maybe you can clarify a little? I just searched the kernel git source - so this git commit was accepted into kernel source in 2014. A quick look at diff it refers to a file in drivers/

Re: Linux kernel: delay before power-off

2023-01-23 Thread Friedrich Romstedt
Hi! Am Mo., 23. Jan. 2023 um 18:08 Uhr schrieb Genes Lists : > > I haven't been following this thread - but I'm curious. > Does this very old commit (2014) not do what's needed? > I just checked a couple machines smartctl and indeed I also see unsafe > shutdowns being logged for nvme disks (not fo

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
I am beginning to wonder if this 'unsafe shutdown' from smart is misleading or just plain wrong. And whether an nvme firmware update might fix it. Given that the kernel is already giving it 2 seconds by default, I am quite doubtful this is something I need to act on kernel wise, tho it is po

Re: Linux kernel: delay before power-off

2023-01-23 Thread Genes Lists
On 1/23/23 11:40, Friedrich Romstedt wrote: Hi, ... I haven't been following this thread - but I'm curious. Does this very old commit (2014) not do what's needed? I just checked a couple machines smartctl and indeed I also see unsafe shutdowns being logged for nvme disks (not for other ssd or

Re: Linux kernel: delay before power-off

2023-01-23 Thread Friedrich Romstedt
Hi, Am So., 22. Jan. 2023 um 07:20 Uhr schrieb Markus Schaaf : > > 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 Befo