396.54.9 OverrideMaxPerf restrictions too harsh; runs GFX clock at about 1/4 speed

Hi there. I have a Gigabyte P55Wv6 laptop with a GeForce 1060. I am using Xubuntu 18.04.1. This laptop will not function correctly without the following kernel parameters: acpi_osi=! acpi_osi=“Windows 2009” Without those, the screen will blank and the system will become unresponsive when LightDM starts.

I like this computer and this card a bunch, but I never had anything that would actually push it until Tekken 7 was usable through DXVK. Since I’m on that Steam Play train, I am indeed running 396.54.9. I don’t think I can use any other driver if I want to use DXVK.

I noticed that both Tekken 7 and Unigine Superposition, when run at full stress, would cause my laptop to act like it was switching between AC and battery over and over. As if the computer is using more power than the AC adapter can draw. At first I thought it was a power supply problem. But I have two 180W power supplies that both do it. I even bought a third from Amazon that still had the issue.

Then I thought this was a Linux-specific problem, but then when trying to figure this out and running Superposition in Windows… it actually happened there too, but only once. It seems Windows might have some hacks included to paper over this problem.

I thought this might be overheating harming my hardware, so I opened up the laptop and reapplied thermal paste. So warranty’s void, I can’t send it back. And that didn’t help either. Did reduce my temps though, that was nice.

So the card is just drawing too much power, I need to restrict its power use. I use a nvidia-xrun-like setup to turn on my graphics card and load the module on demand, use Prime on a second X server, get full performance, and have the ability to use Vulkan. Inside that X server, when I run nvidia-smi to attempt to set a power limit, it tells me that power limit configuration is not supported on my card. I heard that power limit configuration required persistence, so I tried turning on persistence and it didn’t make any difference.

Using Coolbits=31 and underclocking the GFX clock with the allowed minimum offset of -200mhz doesn’t cause the problem to go away. It seems like it might be using the same amount of power but just doing less with it. But what I have noticed does cause the problem to go away is using module options to set OverrideMaxPerf like so:

options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x0;PerfLevelSrc=0x2222;PowerMizerDefault=0x0;PowerMizerDefaultAC=0x0;OverrideMaxPerf=0x4"

This configuration allows me to use my graphics card at a fraction of its power without the AC blinks. And it allows me to see what my clocks are in Superposition; if I turn on anything PowerMizer related, it doesn’t show them. My graphics clock is drastically reduced to around 560mhz out of the 1900mhz it’s capable of. The memory clock stays maxed, and that seems to be fine.

But with only 1/4 of my card’s power, Superposition and Tekken 7 struggle pretty badly. Most of my other games run fine because they didn’t push the card that hard anyways. I have configured Tekken 7 in a way that gives me 60FPS on most stages, so I can live with this if I must! But I would prefer to get more power out of my card if I can. I’d like to get the GFX clock to at least 1200mhz, ideally 1500/1600mhz. I imagine going further than that would just make the blinking come back.

What are your recommendations to move forward in my quest to limit my 1060’s power?

You can try

PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x2;PowerMizerDefaultAC=0x2

though I don’t know if this works as module options, the regular place would be xorg.conf.

Hi, thanks for your time and your suggestion.

It does work as module options, and it lowers the performance of the card even further. Superposition Medium 1080p runs at 16.9FPS, vs 23.5FPS with my previous configuration. And of course, letting the card go totally nuts lets it run at 60FPS, but then the blinks happen.

You could also try disabling turboboost on the cpu.

Sorry it took a while to follow up on this.

Disabling turbo boost–that is, sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo <<<1–makes no difference.

I just want to cap my card’s graphics clock at around 1500mhz, and the driver won’t let me underclock that far; or specify a maximum power usage for the card, which the driver also won’t let me do. I know there are utilities on Windows to customize frequency/voltage curves, but as far as I know, they only apply while inside Windows.

Do I have to tweak and reflash the vbios to do this?

Let me put it another way. I am probably going to do that if nobody here can provide me a better solution. I didn’t get a laptop with a 1060 to leave over 60% of its performance on the table. Do you want me to have to resort to that?

NVIDIA power management under Linux has been fucked up for many years now and I don’t know if there’s anything other users here could help you with - our only hope is that more threads like this one get created and NVIDIA decides to actually address the issue.

I’ve gone as far as to write emails to six (!) Linux NVIDIA engineers and guess what - I haven’t received a single reply. It surely looks like they pay attention only to their paying corporate clients and poor end users under Linux are the least of their concerns.

If you love gaming and you still want to conserve energy you have two options: dual boot to Windows or try following this monumental guide: https://gist.github.com/Misairu-G/616f7b2756c488148b7309addc940b28

A guide about optimus dGPU passthrough to a VM? I’m not sure how exactly this would save me energy. You mean that the VM would be able to use power management utilities on the card when no such utilities exist on Linux?

I don’t want to do that. I think I’d have less of a headache paying down my credit card significantly to make room for a laptop purchase on Black Friday or Cyber Monday that would have an AMD GPU and where everything would just work really nicely.

Or someone from NVidia could help us out with some effective power tweaks that would allow me to keep using my laptop at 80% perf and save my money.

Your VM and its native (Windows) drivers will run/drive your GPU which means your will be able to configure its power management according to your needs and you’ll also be able to configure its voltage which is not available in any other OS.

No one from NVIDIA will help us because they’ve known about such issues for years now and so far they haven’t expressed any desire to fix them.

I guess you’re new to these forums and you’ve never been to http://www.nvnews.net/vbulletin/forumdisplay.php?forumid=14 - this is where NVIDIA first assisted their Linux users.

And you’re quite right: a laptop with an AMD GPU is a much better match for Linux.

Meanwhile I personally don’t understand people who buy laptops for gaming - IMO it’s not a good idea in the first place. Laptops don’t provide good thermals and power dissipation, so you’re extremely constrained and your posture while gaming couldn’t be worse. With a decent PC, large monitor, full sized keyboard and e.g. a wired mouse you can achieve a much better and quieter experience. A laptop with an Intel HK CPU and 1060 class GPU sounds like a blower when you’re gaming. I for one wouldn’t want to experience anything like that.

So it is as I suspected, but… uuuuugggghhhhh, that’s G R O S S . I’m not gonna do that, I’ll sooner just deal with the perf loss (I can still run Tekken 7 at 65% render scale and get 60FPS) or get ready to make my AMD transition earlier than I had intended.

EDIT: Looks like you added on to your post.

Have you ever taken your computer over to your friend’s house to play Mario Kart Double Dash at 1080p with a bunch of dualshock 4s? How about being a competitive Tekken player and being able to practice your matchups at any time? I greatly value my portability. I didn’t come here to have my gaming style criticized, I came here for help.

If I use the nvidia-settings variables GPUGraphicsClockOffsetAllPerformanceLevels and GPUMemoryTransferRateOffsetAllPerformanceLevels as opposed to GPUGraphicsClockOffset[whatever], it does seem to make some sort of difference… I can -200 the gfx clock and -1000 the memory clock from their maximum rates, and that gets it to where the blinks don’t automatically start every time Superposition is loading… but I can make the blinks return by screencapping and encoding on the iGPU while starting Superposition on the dGPU. I feel like I just need -200 more on the GFX clock but I’m just arbitrarily not allowed to do it.

I tried the PowerMizer 0x2 with positive clock offsets, but it seems like it just doesn’t have any effect while in that mode. I also can’t overclock with OverrideMaxPerf in effect. I hate being arbitrarily restricted like this.