You are not logged in.
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
See /usr/src/nvidia-*/dkms.conf and alter the MAKE[0] definition by restricting jobs, load or invoking nice or cpulimit.
Offline
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
Offline
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... ![]()
Last edited by LinuxUser15939 (2022-02-17 11:56:05)
Offline
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
/etc/dkms/<module>.conf
dkms statuswill list your modules.
Offline
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
Maybe look up the modules dkms.conf again…
Offline
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
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
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
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