How to lock PowerMizer Performance Level to the lowest level with Optimus?

Hello,

is it somehow possible to lock the PowerMizer Performance Level to the lowest level? I read a lot about this but I don’t find a working solution. Some solutions are to create a /etc/X11/xorg.conf.d/20-nvidia.conf file but after this, my desktop get a blank screen and I have to delete the file.
Or I have to write down some information in /etc/X11/xorg.conf (Attachement, yeah the file is renamed to _old because I get a blank screen after reboot.

I also tried to configure the Performance level with nvidia-settings -a “[gpu:0]/GpuPerfModes=0”
but I get the message: ERROR: The attribute ‘GPUPerfModes’ specified in assignment
‘[gpu:0]/GpuPerfModes=0’ cannot be assigned (it is a read-only
attribute).

Is this the correct way to lock the performance level? Are there any other solutions?

Report:
nvidia-bug-report.log.gz (600.0 KB)

OS:
Linux Mint 5.4.0-92-generic #103-Ubuntu SMP

Graphic Cards (Optimus):
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM107M [GeForce GTX 960M]

Xorg.conf
xorg.conf_old (1.3 KB)

Thanks in advance!

  1. you can’t, because you’re in offload mode
  2. it shouldn’t be necessary, because you’re in offload mode

In offload mode, the nvidia gpu should always stay on lowest clocks unless you explicitly set some application to use it. In your case, the nvidia gpu (and likely also the igpu) is always running at highest clocks because something is continuously querying attached monitors in fast succesion:

[ 19987.483] (II) modeset(0): EDID vendor "LGD", prod id 1132
[ 19987.483] (II) modeset(0): Printing DDC gathered Modelines:
[ 19987.483] (II) modeset(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.7 kHz eP)
[ 19987.492] (II) modeset(0): EDID vendor "LGD", prod id 1132
[ 19987.492] (II) modeset(0): Printing DDC gathered Modelines:
[ 19987.492] (II) modeset(0): Modeline "1920x1080"x0.0  138.70  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync (66.7 kHz eP)
[ 19987.500] (--) NVIDIA(GPU-0): DFP-0: disconnected
[ 19987.500] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[ 19987.500] (--) NVIDIA(GPU-0): DFP-0: 165.0 MHz maximum pixel clock
[ 19987.500] (--) NVIDIA(GPU-0): 
[ 19987.500] (--) NVIDIA(GPU-0): DFP-1: disconnected
[ 19987.500] (--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
[ 19987.500] (--) NVIDIA(GPU-0): DFP-1: 960.0 MHz maximum pixel clock
[ 19987.500] (--) NVIDIA(GPU-0): 

this keeps your gpu at maximum clocks. Please check if you have some kind of plugin in your desktop environment that does this using xrandr.

1 Like

Thanks for reply.

So if I quit the offload mode and change to performance mode, I could do that?
I’m connected with Anydesk to my desktop at the moment. Maybe this is the issue.

xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
1920x1080 60.02*+ 60.01 59.97 59.96 59.93
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
800x512 60.17
700x525 59.98
800x450 59.95 59.82
640x512 60.02
720x450 59.89
700x450 59.96 59.88
640x480 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
680x384 59.80 59.96
640x400 59.88 59.98
576x432 60.06
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-1-0 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)

When I open PowerMizer I see the clock on the lowest level. Are the values displayed incorrectly?

@generix
Is there a way to set the performance state to P0 on WIN10? I have a deep learning model and when inferencing, the inference time jumps around and the performance state jumps around either. So I want to force the GPU to work at P0 to see if this can make inference stable. My GPU is RTX2080 with max-q design.

@err0r looks like I was wrong, locking to the lowest state also works in offload mode, just tried with driver 470.94, setting as module options
i.e. create /etc/modprobe.d/nvidia-lowperf.conf

options nvidia	NVreg_RegistryDwords="PowerMizerEnable=0x1; PowerMizerDefaultAC=0x3; PowerMizerLevelAC=0x3; PowerMizerLevel=0x3; PerfLevelSrc=0x2222;"

then run sudo update-initramfs -u

@feiyuhuahuo I don’t know whether nvidia now allows the gpu go to P0 on compute loads, this was previously limited to P2. To set maximum clocks, just start nvidia-settings and select “prefer maximum performance” in the powermizer pane.
Windows: IDK, check tools like Afterburner.

2 Likes

It’s working. Thank you very much @generix !!!

This works, however do you know how to lock it to P2? P0 isn’t enough for 144hz.

try

PowerMizerLevelAC=0x2
1 Like

Thanks, now the card is on P1 (still can’t reach 144hz tho)