Talk:NVIDIA/Tips and tricks

From ArchWiki
Latest comment: 7 February by YHNdnzj in topic Preserve video memory on hibernation

Set fan speed at login

Shouldn't this section be changed to use GPUTargetFanSpeed instead of GPUCurrentFanSpeed as this is the current working method? The note that is currently present explaining the change is very easy to miss.

—This unsigned comment is by Manypopes (talk) 17:59, 14 July 2017‎. Please sign your posts with ~~~~!

Allow change to highest Performance Mode

Any other way of "overclocking" won't change the Memory Transfer Rate offset (it has no effect in nvidia-settings).

see https://devtalk.nvidia.com/default/topic/1010856/linux/how-to-force-performance-level-3-driver-381-22-with-gtx-1080-ti-/ and https://devtalk.nvidia.com/default/topic/977467/cuda-setup-and-installation/having-trouble-overclocking-gtx-1070/ and also https://devtalk.nvidia.com/default/topic/1014710/linux/understanding-weirdness-with-gpumemorytransferrateoffset-/

Setting the clockspeed rates in nvidia-settings without prior adjusting the rates in nvidia-smi crashes really hard, because it tries to overclock max. performance mode which only is active when the card is idle (i.e. just after exiting a game or a miner...).

default clock speed + overclocking = max. default clock speed or crash

"set" clock speed + overclocking = more than max. default clock speed and memory transfer rate tunable


This is a bug.


Pointing out the fact that this is not my website, why did you delete the Watt-Limiting Section? (My) GTX 960 is not kepler, changing wattage works though? Man pages lie!


Strikemybread (talk) 12:06, 14 August 2017 (UTC)Reply[reply]

In the threads you've linked, these two posts support the claim that setting application clocks (with nvidia-smi -ac) is not available on "ordinary" GPUs. So how do you make a general section out of this?
Setting the application clocks to something listed in nvidia-smi -q -d SUPPORTED_CLOCKS is not an overclocking. If there is a bug in the performance modes, the section should properly explain it and provide all references.
-- Lahwaacz (talk) 09:22, 23 August 2017 (UTC)Reply[reply]

Kernel module parameters

/etc/modprobe.d/nvidia.conf
options nvidia NVreg_UsePageAttributeTable=1

I think it might be enabled by default now (in 440.64 at least): i've tested performance with and without the change and can't tell any difference. I've also tried to use "options nvidia NVreg_UsePageAttributeTable=0" and failed to boot into graphical environment.

Needs more testing, i think. Maybe i just doing something wrong. Rtentser (talk) 10:37, 4 March 2020 (UTC)Reply[reply]

Preserve video memory after suspend

It says "...it is necessary to pass two options to the "nvidia" kernel module." That's not correct according to the linked Nvidia documentation. It says there the second parameter is optional, and by default uses /tmp. Quote: "To save potentially large copies of video memory, the NVIDIA driver uses unnamed temporary files. By default, these files are created in /tmp, but this location can be changed with the TemporaryFilePath kernel module parameter, e.g. TemporaryFilePath=/run. The destination file system needs to support unnamed temporary files, and it needs to be large enough to accommodate all video memory copies for the duration of power management cycles.

—This unsigned comment is by Tuxfusion (talk) 17:38, 26 October 2020‎. Please sign your posts with ~~~~!

There are issues with nvidia-suspend (inability to resume) for systems where the default suspend mode (which can be checked in /sys/power/mem_sleep) is 's2idle'. Nvidia's documentation recommends to set it to 'deep' using the kernel command line parameter 'mem_sleep_default=deep'.

Bertino (talk) 12:18, 26 February 2021 (UTC)Reply[reply]

/* Preserve video memory after suspend */ /* ... */ These described mechanisms seems to be for xOrg. This chapter doesn't mention that it only works for X11 and doesn't mention an alternative for WayLand

Nsqm (talk) 08:17, 28 July 2022 (UTC)Nsqm (talk) 10:14, 28 July 2022 (CET)Reply[reply]

Laptop power control

For laptops there seems to be two ways to turn off the dedicated Nvidia GPU. If deemed useful, should I add them at bottom of the NVIDIA page or here in the Tips and tricks section?

Details: The first one is manual and it requires a reboot to turn the GPU on again (at least for what I see on my laptop). Given 0000:02.00.0 as the PCI ID of the dedicated GPU:

➜ ~ sudo nvidia-smi drain -m 1 -p 0000:02.00.0

Successfully set GPU 00000000:02:00.0 drain state to: daining.

➜ ~ sudo nvidia-smi drain -r -p 0000:02.00.0

GPU 00000000:02:00.0 successfully removed.


The second way is much better and is officially described in [1] (the automated setup is described in the Automated Setup part) It basically turn off the GPU when not used and on again when used, all by itself. It should work also with Prime but I am not able to get Prime working at the moment so I only tested the power management part.

—This unsigned comment is by Garis (talk) 09:54, 26 December 2020‎. Please sign your posts with ~~~~!

Preserve video memory on hibernation

Ping @YHNdnzj: I don't have an NVIDIA card to test on hand, but I thought adding a /etc/modprobe.d/nvidia-power-management.conf file with the additional NVreg_TemporaryFilePath=/var/tmp (or any other path to a non-tmpfs) and adding that .conf file to the initramfs with the modconf mkinitcpio hook would work? -- Erus Iluvatar (talk) 20:42, 7 February 2024 (UTC)Reply[reply]

I don't think so. First of all, udev runs and loads all modules prior to the mount of rootfs. Secondly, you'll need to prefix the path with /new_root/ or /sysroot/. -- YHNdnzj (talk) 22:58, 7 February 2024 (UTC)Reply[reply]