You are not logged in.
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
AFAIK grub2 requires some extra magic to actually apply changes made in /etc.
Or try:
echo 'kernel.nmi_watchdog=0' >>/etc/sysctl.conf
Offline
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.
Or try:
echo 'kernel.nmi_watchdog=0' >>/etc/sysctl.conf
Already done. No result, nmi_watchdog still activated by unknown something...
Offline
Is nmi_watchdog=0 present in /proc/cmdline?
At what time the watchdog gets enabled?
Offline
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.
At what time the watchdog gets enabled?
During boot time when systemd is operating.
Offline
Yet another reason to stay with sysvinit, I guess
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
@op
Did you by anychance change /etc/systemd/system.conf paramater
RuntimeWatchdogSec=0
?
Offline
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
i'm trying APPEND root=/dev/sda2 ro nmi_watchdog=0 quiet and it works
Offline
Yet another reason to stay with sysvinit, I guess
Yeah. sysvinit was slower, but you knew what to expect from it...
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...
@op
Did you by anychance change /etc/systemd/system.conf paramater
RuntimeWatchdogSec=0
?
No, I have #RuntimeWatchdogSec=0 in my config.
nmi_watchdog not nmi_watchdod
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
Blacklist ?
install iTCO_wdt /bin/false
install iTCO_vendor_support /bin/false
Offline
Does "grep watchdog -R /usr/lib/tmpfiles.d/ /etc/tmpfiles.d" return anything?
Last edited by lucke (2013-03-17 10:07:37)
Offline
I've found out that something applies sysctl settings from files found in /usr/lib/sysctl.d during boot. Maybe it's there?
Offline
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...
Blacklist ?
install iTCO_wdt /bin/false
install iTCO_vendor_support /bin/false
What's that?
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
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
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
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
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
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
# /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
# /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
I guess you meant modprobe
Sure. My mistake.
Last edited by digitalone (2013-07-16 19:33:09)
Offline