LorenzoMorelli / GPU_profile_selector

A simple gnome shell extension which provides a simple way to switch between GPU profiles on Nvidia Optimus systems (i.e laptops with Intel + Nvidia or AMD + Nvidia configurations) in a few clicks. In particular this extension is a graphic interface for envycontrol program.
GNU General Public License v3.0
64 stars 8 forks source link

rtd3 options ignored #19

Open Labaman opened 7 months ago

Labaman commented 7 months ago

Despite the rtd3 flag enabled in the extension settings, when switching to Hybrid mode via the extension, the default nvidia module config is created, without any parameters regarding RTD3 (i.e. the NVreg_DynamicPowerManagement option is not represented in /etc/modprobe.d/nvidia.conf at all if switching from the extension). If switching is performed from the command line by specifying the --rtd3 option, the correct /etc/modprobe.d/nvidia.conf template is generated, containing the NVreg_DynamicPowerManagement option with the specified value (by default options nvidia "NVreg_DynamicPowerManagement=0x02" ). For example extention settings is: image And result /etc/modprobe.d/nvidia.conf is

cat /etc/modprobe.d/nvidia.conf 
# Automatically generated by EnvyControl

options nvidia-drm modeset=1
options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0
LorenzoMorelli commented 7 months ago

Hi! Did you get the same problem even from envycontrol command line? Here the reference: https://github.com/bayasdev/envycontrol?tab=readme-ov-file#some-examples

Labaman commented 7 months ago

Hi! No, if I do the switch via cli, specifying the -rtd3 key, the final file is generated correctly. Here's an example:

 cat /etc/modprobe.d/nvidia.conf 
# Automatically generated by EnvyControl

options nvidia-drm modeset=1
options nvidia "NVreg_DynamicPowerManagement=0x02"
options nvidia NVreg_UsePageAttributeTable=1 NVreg_InitializeSystemMemoryAllocations=0

By the way, it would be nice to add more detailed settings for rtd3 in the extension, according to all the configuration possibilities of this mode from cli:

RTD3 allows the dGPU to be dynamically turned off when not in use
Available choices for the --rtd3 flag (based on the [official documentation](http://us.download.nvidia.com/XFree86/Linux-x86_64/530.30.02/README/dynamicpowermanagement.html))
0 disabled
1 coarse-grained
2 fine-grained (default value if you don't provide one)
3 fine-grained for Ampere and later
Only works in Turing and later
Performance on external screens might be reduced
LorenzoMorelli commented 7 months ago

Maybe it had an update to envycontrol syntax then. Need to check it out Definitely agree to add more settings. Unfortunately, I have not much free time during this period. Gonna try make some updates as soon as I can though!