Cant change refresh rate on nvidia optimus 730m and Ubuntu

Hello. I don’t know if this is the place, but could someone help me with the monitor refresh rate using optimus e prime sync.

I have an Ubuntu Gnome 16.04.2 with Xorg 1.19.3 and Nvidia 375.66 driver.

My Nvidia card is working perfectly without tearing at 60 frames per second after doing some configuration learned here https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/. Thanks for all the work to make this possible.

But I would like to set the refresh rate to 40hz because I have an old laptop that gets really hot trying to reach 60 fps in every game. In Windows, I play everything in 40 FPS and its ok and the laptop stays cool.

I have tried executing xrandr commands to set 40 hertz but it doesn’t have any effect. My xrandr command shows: “1366x768 60.07 + 40.05*” but it is not the reality.

Screen 0: minimum 8 x 8, current 1366 x 768, maximum 16384 x 16384
LVDS-1-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1366x768      60.07 +  40.05* 
   1360x768      59.80    59.96  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   960x600       60.00  
   960x540       59.99  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   800x512       60.17  
   700x525       59.98  
   640x512       60.02  
   720x450       59.89  
   640x480       60.00    59.94  
   680x384       59.80    59.96  
   576x432       60.06  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
   1368x768_40.05  40.05  
VGA-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
  1368x768_40.05 (0x2e7) 54.140MHz -HSync +VSync
        h: width  1368 start 1408 end 1544 total 1720 skew    0 clock  31.48KHz
        v: height  768 start  769 end  772 total  786           clock  40.05Hz

I don’t have the option in nvidia-settings to change the refresh rate like someone without optimus would have.

My nvidia log is shown here:
nvidia-bug-report.log.gz (222 KB)

I don’t know if that’s possible and if so, how. Maybe take a different approach and use libstrangle to reduce the framerate of the game itself.
Other than that, you should clean your heatsink of dust.

Didn’t know about libstrangle. It worked as intended. Thank you!