You are not logged in.

#1 2022-02-16 19:06:43

LinuxUser15939
Member
Registered: 2022-02-11
Posts: 18

How to stop high CPU usage (99%) during update of nvidia-dkms?

Hey guys. Whenever I update nvidia-dkms, my computer goes into overdrive and the CPU usage becomes 99%. This makes my computer very laggy during this time. How can I lower the CPU usage of this process?

Last edited by LinuxUser15939 (2022-02-16 19:07:14)

Offline

#2 2022-02-16 22:19:44

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

See /usr/src/nvidia-*/dkms.conf and alter the MAKE[0] definition by restricting jobs, load or invoking nice or cpulimit.

Offline

#3 2022-02-17 09:20:57

LinuxUser15939
Member
Registered: 2022-02-11
Posts: 18

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Thanks for the reply. I forgot to mention I tried that already, but it only works for a single update. After one update the file resets to the defaults. And the file contents change to PACKAGE_VERSION="new_version".

Last edited by LinuxUser15939 (2022-02-17 09:23:46)

Offline

#4 2022-02-17 11:05:55

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Offline

#5 2022-02-17 11:54:20

LinuxUser15939
Member
Registered: 2022-02-11
Posts: 18

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Hi, Raynman. Thanks for your reply. I'm not sure what I'm supposed to do here. There are only 2 files in /etc/dkms. There's a file called framework.conf, and I tried adding MAKE[0]='make' -j12 to the file (my system has 16 threads) to see if the CPU usage would go down. I then did pacman -S nvidia-dkms and the CPU usage was still 99%. There's another file called sign_helper.sh but that doesn't seem to be related to anything. Yeah... hmm

Last edited by LinuxUser15939 (2022-02-17 11:56:05)

Offline

#6 2022-02-17 12:07:23

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,852

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

framework.conf is not one of the files to override anything.

you are supposed to create a file in that folder to override some (or all) of the module provided settings.

try creating /etc/dkms/nvidia.conf with that make[0] option in it.

Last edited by Lone_Wolf (2022-02-17 12:07:50)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2022-02-17 12:12:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

the manpage wrote:

/etc/dkms/<module>.conf

dkms status

will list your modules.

Offline

#8 2022-02-17 12:50:52

LinuxUser15939
Member
Registered: 2022-02-11
Posts: 18

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Thanks for the replies guys. I made the file /etc/dkms/nvidia.conf and put the following contents in it:

MAKE[0]='make' -j12

But I got these warnings after doing pacman -S nvidia-dkms:

/etc/dkms/nvidia.conf: line 1: `MAKE[0]': not a valid identifier
/etc/dkms/nvidia.conf: line 1: -j12: command not found

The CPU usage still seems to be 99%.

Offline

#9 2022-02-17 12:54:20

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Maybe look up the modules dkms.conf again…

Offline

#10 2022-02-20 16:41:41

LinuxUser15939
Member
Registered: 2022-02-11
Posts: 18

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Welp, seems there aren't really any solutions. I've decided to just uninstall nvidia-dkms and use nvidia instead. That seems to have worked. It's a bit of a hack, though.

Offline

#11 2022-02-20 17:09:05

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,852

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

content of /usr/src/nvidia-510.54/dkms.conf

PACKAGE_NAME="nvidia"
PACKAGE_VERSION="510.54"
AUTOINSTALL="yes"

# By default, DKMS will add KERNELRELEASE to the make command line; however,
# this will cause the kernel module build to infer that it was invoked via
# Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting
# the 'make' command name to suppress this behavior.
MAKE[0]="'make' -j`nproc` IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=${kernelver} IGNORE_CC_MISMATCH='__IGNORE_CC_MISMATCH' modules"

# The list of kernel modules will be generated by nvidia-installer at runtime.
BUILT_MODULE_NAME[0]="nvidia"
DEST_MODULE_LOCATION[0]="/kernel/drivers/video"
BUILT_MODULE_NAME[1]="nvidia-uvm"
DEST_MODULE_LOCATION[1]="/kernel/drivers/video"
BUILT_MODULE_NAME[2]="nvidia-modeset"
DEST_MODULE_LOCATION[2]="/kernel/drivers/video"
BUILT_MODULE_NAME[3]="nvidia-drm"
DEST_MODULE_LOCATION[3]="/kernel/drivers/video"
BUILT_MODULE_NAME[4]="nvidia-peermem"
DEST_MODULE_LOCATION[4]="/kernel/drivers/video"

All you had to put in /etc/nvidia.conf is a copy of that make[0] line upto the 2nd double quote , then replace nproc with your preferred value .

Given the warnings you probably missed some of the necessary quotes .

Last edited by Lone_Wolf (2022-02-20 17:09:32)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#12 2022-02-21 19:52:01

NuSkool
Member
Registered: 2015-03-23
Posts: 287

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

Trying to learn about this myself as an nvidia dkms AUR user. However, on my system (old AMD Phenom 4x) the default value is not a problem.

Possibly some confusion based on the obsolete usage of backticks:

`nproc`

Which in this case, this would have been more clear (to me at least):

$(nproc)

That said, the line should be something like this?

MAKE[0]="'make' -j12 IGNORE_PREEMPT_RT_PRESENCE=1 NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=${kernelver} IGNORE_CC_MISMATCH='__IGNORE_CC_MISMATCH' modules"

Last edited by NuSkool (2022-02-21 20:10:40)


Scripts I Use                                                 :  https://github.com/Cody-Learner
grep -m1 'model name' /proc/cpuinfo    : AMD Ryzen 7 8745HS w/ Radeon 780M Graphics
grep -m1 'model name' /proc/cpuinfo    : Intel(R) N95
grep -m1 'model name' /proc/cpuinfo    : AMD Ryzen 5 PRO 2400GE w/ Radeon Vega Graphics

Offline

#13 2022-02-21 20:58:35

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,844

Re: How to stop high CPU usage (99%) during update of nvidia-dkms?

That'll use 12 parallel jobs - if you've 12 cores available, you end up using all of them.
The point is to limit the cores so that you've enough left for a fluid system (so if you've 16 cores, 12 is a reasonable enough choice - if you've "only" 8, 12 is probably too much)

Offline

Board footer

Powered by FluxBB