Laptop Nvidia Gpu frequency locked to 33mhz after unplugging from power

Im using the proprietary nvidia drivers with Optimus manager set to nvidia,

when i unplug my laptop the frequency goes from 450-1100 to 33mhz and stays there even after plugging AC back in.

Changing modes in the nvidia xserver settings has no effect on the clock speed, does change the memory speed though.

Nvidia GTX 850M
Intel 4710 HQ
Laptop Model is MSI GE60 2PC APACHE

nvidia-smi -q -d PERFORMANCE

Timestamp : Sat Jul 10 02:07:43 2021
Driver Version : 465.31
CUDA Version : 11.3

Attached GPUs : 1
GPU 00000000:01:00.0
Performance State : P8
Clocks Throttle Reasons
Idle : Active
Applications Clocks Setting : Not Active
SW Power Cap : Not Active
HW Slowdown : Active
HW Thermal Slowdown : N/A
HW Power Brake Slowdown : N/A
Sync Boost : Not Active
SW Thermal Slowdown : Not Active
Display Clock Setting : Not Active
Graphics : 33 MHz
SM : 33 MHz
Memory : 405 MHz
Video : 405 MHz
Applications Clocks
Graphics : 862 MHz
Memory : 2505 MHz
Default Applications Clocks
Graphics : 862 MHz
Memory : 2505 MHz
Max Clocks
Graphics : 954 MHz
SM : 954 MHz
Memory : 2505 MHz
Video : 858 MHz

Can’t help but here is probably a good clue in your troubleshooting:

The GPU performance state APIs are used to get and set various performance levels on a per-GPU basis. P-States are GPU active/executing performance capability and power consumption states.

P-States range from P0 to P15, with P0 being the highest performance/power state, and P15 being the lowest performance/power state. Each P-State maps to a performance level. Not all P-States are available on a given system. The definition of each P-States are currently as follows:

P0/P1 - Maximum 3D performance
P2/P3 - Balanced 3D performance-power
P8 - Basic HD video playback
P10 - DVD playback
P12 - Minimum idle power consumption

You GPU is stuck in HD Video performance mode after you go on Battery mode. Good luck. Maybe check power settings in the system.

Thank you so much for the pointer,

I was able to set the performance state to P0 with:
$ nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1

i also tried 0, 1 and 2
but it had no effect on the gpu clock-requency

I’m confused so did it work or did it not work? As you said you successfully put the performance mode to P0 with the corresponding command containing =1 but then you said you tried 0, 1, and 2, but that it had no effect on the GPU clock, so in then end, can you be more precise so that it can help others too?

//EDIT: [Removed whole paragraphs about coolbits since I found edit2 links]

//EDIT2: and I found your same issue on Nvidia forum 33Mhz stuck problem after waking up from suspend - Linux - NVIDIA Developer Forums didn’t read it yet but the issue seem to be known.

//EDIT3: and more similar threads

Basically, seems like rebooting to Windows could fix your issue, resetting the BIOS could also be a solution (and updating the BIOS too maybe), and setting battery mode to disconnected if possible (or physically disconnecting it if possible) and disconnecting the power supply and then pushing power button for long time could also fix your issue (that would probably do the same as resetting the BIOS I guess).

Problem seems to lie in a BIOS issue that doesn’t reinitialize PCI devices correctly on lot of motherboards from some manufacturers.

Right I was able to set the powerstate but the Gpu-clock was still stuck at 33mhz.

i tried to reset my bios with the power button method, but that just broke my keyboard for some reason, so i tried resetting via the CMOS battery but couldnt get to it easily, which lead me to load “optimized defaults” in the bios menu which i assumed meant reseting the bios. That however just broke my boot thingie.

I then used the manjaro live-usb to download a bios update, updated the bios and checked if the original gpu problem was solved in the live cd but even there its stuck to 33mhz after unplugging once.

I then managed to fix my boot problem, so everything is about as it was before
I’m not quite sure what exactly broke my keyboard if it was holding the power button or opening the laptop, i have opened it before and it was fine, but maybe i licked the capacitors too much or something. so if you have an MSI GE60 2PC Apache maybe don’t do that.

I will try the AHCPI method outlined in one of the links tomorrow and see if that changes things.

Thank you so much for all the help, I really appreciate it

just for added context it’s only really a problem because my power adapter cable is a little flakey and disconnects sometimes.