You are not logged in.

#1 2013-03-16 10:39:42

digitalone
Member
Registered: 2011-08-19
Posts: 223

[SOLVED] How can I permanently disable NMI watchdog?

Hi everyone, I want to disable nmi_watchdog on my machine with Arch Linux x64.

I tried to disable it adding "nmi_watchdod=0" in kernel boot parameter from etc/default/grub.

But, it re-enables during boot, as I can see from journalctl log:

kernel: NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.

I have also this problem before:

systemd-tmpfiles[154]: chmod(/proc/sys/kernel/nmi_watchdog) failed: Operation not permitted

but don't know what it means.

However, it seems that something (maybe systemd) re-enables nmi_watchdog, even if I disable it from kernel parameter!

I can disable it manually after boot with:

echo 0 > /proc/sys/kernel/nmi_watchdog

but I want an automatic thing for that, I can't do it manually everytime start Arch.

Which thing does re-enable nmi_watchdog? And how can I prevent this behavior?
Please help, thanks.

Last edited by digitalone (2013-03-18 14:36:28)

Offline

#2 2013-03-16 11:08:43

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] How can I permanently disable NMI watchdog?

AFAIK grub2 requires some extra magic to actually apply changes made in /etc.

Or try:

echo 'kernel.nmi_watchdog=0' >>/etc/sysctl.conf

Offline

#3 2013-03-16 12:51:42

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

mich41 wrote:

AFAIK grub2 requires some extra magic to actually apply changes made in /etc.

I always do

grub-mkconfig -o /boot/grub/grub.cfg

after changing something in /etc/default/grub.

mich41 wrote:

Or try:

echo 'kernel.nmi_watchdog=0' >>/etc/sysctl.conf

Already done. No result, nmi_watchdog still activated by unknown something...

Offline

#4 2013-03-16 12:58:48

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] How can I permanently disable NMI watchdog?

Is nmi_watchdog=0 present in /proc/cmdline?

At what time the watchdog gets enabled?

Offline

#5 2013-03-16 14:04:21

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

mich41 wrote:

Is nmi_watchdog=0 present in /proc/cmdline?

It was present. Now I delete it from boot kernel parameter because it's useless.
Something enables it anyway.

mich41 wrote:

At what time the watchdog gets enabled?

During boot time when systemd is operating.

Offline

#6 2013-03-16 16:04:54

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] How can I permanently disable NMI watchdog?

Yet another reason to stay with sysvinit, I guess smile

I'd run systemctl to check if there is some "service" which enables it.
If not, search their website - maybe it's a documented behavior and maybe even configurable.

Offline

#7 2013-03-16 16:26:54

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED] How can I permanently disable NMI watchdog?

@op

Did you by anychance change /etc/systemd/system.conf paramater

RuntimeWatchdogSec=0

?


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#8 2013-03-17 09:00:01

n3os
Member
Registered: 2012-07-08
Posts: 17

Re: [SOLVED] How can I permanently disable NMI watchdog?

digitalone wrote:

Hi everyone, I want to disable nmi_watchdog on my machine with Arch Linux x64.

I tried to disable it adding "nmi_watchdod=0" in kernel boot parameter from etc/default/grub.

nmi_watchdog not nmi_watchdod wink

i'm trying APPEND root=/dev/sda2 ro nmi_watchdog=0 quiet and it works

Offline

#9 2013-03-17 09:40:46

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

mich41 wrote:

Yet another reason to stay with sysvinit, I guess smile

Yeah. sysvinit was slower, but you knew what to expect from it...

mich41 wrote:

I'd run systemctl to check if there is some "service" which enables it.
If not, search their website - maybe it's a documented behavior and maybe even configurable.

I gave up...

hadrons123 wrote:

@op

Did you by anychance change /etc/systemd/system.conf paramater

RuntimeWatchdogSec=0

?

No, I have #RuntimeWatchdogSec=0 in my config.

n3os wrote:

nmi_watchdog not nmi_watchdod wink

i'm trying APPEND root=/dev/sda2 ro nmi_watchdog=0 quiet and it works

I didn't make the same mistake in boot parameter.
There's something that enables it. There's always kernel: NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter in journalctl log.

I use pm-utils, laptop_mode.service and cpupower for trying to save energy on my laptop.
Could be one of them?

Last edited by digitalone (2013-03-17 09:42:35)

Offline

#10 2013-03-17 09:52:14

n3os
Member
Registered: 2012-07-08
Posts: 17

Re: [SOLVED] How can I permanently disable NMI watchdog?

Blacklist ?

install iTCO_wdt /bin/false
install iTCO_vendor_support /bin/false

Offline

#11 2013-03-17 10:07:06

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] How can I permanently disable NMI watchdog?

Does "grep watchdog -R /usr/lib/tmpfiles.d/ /etc/tmpfiles.d" return anything?

Last edited by lucke (2013-03-17 10:07:37)

Offline

#12 2013-03-17 22:39:28

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] How can I permanently disable NMI watchdog?

I've found out that something applies sysctl settings from files found in /usr/lib/sysctl.d during boot. Maybe it's there?

Offline

#13 2013-03-18 08:35:35

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

Yesterday I found that nmi_watchdog was magically disabled.
Today I turn on the laptop and it's enabled again.
Don't know what to expect...

n3os wrote:

Blacklist ?

install iTCO_wdt /bin/false
install iTCO_vendor_support /bin/false

What's that?

lucke wrote:

Does "grep watchdog -R /usr/lib/tmpfiles.d/ /etc/tmpfiles.d" return anything?

[root@archtoshiba ~]# cat /proc/sys/kernel/nmi_watchdog
1
[root@archtoshiba ~]# grep watchdog -R /usr/lib/tmpfiles.d/ /etc/tmpfiles.d
/etc/tmpfiles.d/nmi_watchdog.conf:w /proc/sys/kernel/nmi_watchdog 0775 0 0 - 0
/etc/tmpfiles.d/nmi_watchdog.conf~:w proc/sys/kernel/nmi_watchdog 0775 0 0 - 0
mich41 wrote:

I've found out that something applies sysctl settings from files found in /usr/lib/sysctl.d during boot. Maybe it's there?

In that directory there's one file called "codedump.conf". Nothing about nmi_watchdog inside.
I wish systemd applies config in /etc/sysctl.conf where there's kernel.nmi_watchdog=0.

Offline

#14 2013-03-18 09:35:26

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] How can I permanently disable NMI watchdog?

Those tmpfiles can be used to write values to files in /sys and /proc. https://wiki.archlinux.org/index.php/Sy … rary_files

It seems you put it there, as pacman puts systemd's files in /usr/lib, and ~ points to manual editing.

It should set the value to 0. Perhaps you should see if changing the line to "w /proc/sys/kernel/nmi_watchdog - - - - 0" helps.

As n3os suggested, you could blacklist the modules responsible. https://wiki.archlinux.org/index.php/Ke … acklisting

Offline

#15 2013-03-18 10:11:43

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

lucke wrote:

Those tmpfiles can be used to write values to files in /sys and /proc. https://wiki.archlinux.org/index.php/Sy … rary_files

It seems you put it there, as pacman puts systemd's files in /usr/lib, and ~ points to manual editing.

It should set the value to 0. Perhaps you should see if changing the line to "w /proc/sys/kernel/nmi_watchdog - - - - 0" helps.

I forget it, but now remember.
With sysvinit I had a command in rc.conf to disable nmi_watchdog.
Moving to systemd, following some guides...I created nmi_watchdog.conf as temporary file to allow systemd to disable nmi_watchdog during boot.
But It seems not work, and this explain the following line in journal log:

systemd-tmpfiles[154]: chmod(/proc/sys/kernel/nmi_watchdog) failed: Operation not permitted

I'll try with your suggested line.

Offline

#16 2013-03-18 10:39:56

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

Line changed and the above error is not showed in the log. So, it should work, but I see

kernel: NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.

3 time in the log. There's something that re-enables nmi_watchdog 3 times during boot.

I'm starting to think that laptop-mode-tools tries to enable it.
At this point, the only way is the blacklisting.
Should I put

install iTCO_wdt /bin/false
install iTCO_vendor_support /bin/false

in a .conf file located in /etc/modprobe.d?

Offline

#17 2013-03-18 13:11:39

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] How can I permanently disable NMI watchdog?

There are many modules in /lib/modules/*/kernel/drivers/watchdog. See if you can find any of them in lsmod, and try blacklisting it.

Offline

#18 2013-03-18 14:36:05

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

# /etc/modeprobe.d/modeprobe.conf
blacklist iTCO_wdt 
blacklist iTCO_vendor_support
[root@archtoshiba ~]# cat /proc/sys/kernel/nmi_watchdog
0

That's great!
Thanks.

Offline

#19 2013-07-16 14:14:34

plam
Member
From: Bulgaria
Registered: 2010-03-16
Posts: 37

Re: [SOLVED] How can I permanently disable NMI watchdog?

digitalone wrote:
# /etc/modeprobe.d/modeprobe.conf
blacklist iTCO_wdt 
blacklist iTCO_vendor_support
[root@archtoshiba ~]# cat /proc/sys/kernel/nmi_watchdog
0

That's great!
Thanks.

modeprobe? I guess you meant modprobe, but it doesn't work for me..
OP, how you managed to solve this?

Offline

#20 2013-07-16 19:32:39

digitalone
Member
Registered: 2011-08-19
Posts: 223

Re: [SOLVED] How can I permanently disable NMI watchdog?

plam wrote:

I guess you meant modprobe

Sure. My mistake.

Last edited by digitalone (2013-07-16 19:33:09)

Offline

Board footer

Powered by FluxBB