Open sam-cavalheiro opened 7 months ago
@sam-cavalheiro , I personally do not see this as a bug. Let me explain.
The Optimus hybrid mode has a number of features- one of which is the support of the HDMI port (and audio through it).
This carries with it the effect of greatly reducing battery time.
So, envycontrol has the --rtd3
additional option for hybrid mode that helps with that. But it comes with the tradeoff of reduced dGPU functionality. Please see the link to the official documentation in the Hybrid section of the README.
If you need the full-blown Optimus hybrid mode feature set, please do use the --reset
option to restore it.
@sam-cavalheiro , I personally do not see this as a bug. Let me explain.
The Optimus hybrid mode has a number of features- one of which is the support of the HDMI port (and audio through it).
This carries with it the effect of greatly reducing battery time.
So, envycontrol has the
--rtd3
additional option for hybrid mode that helps with that. But it comes with the tradeoff of reduced dGPU functionality. Please see the link to the official documentation in the Hybrid section of the README.If you need the full-blown Optimus hybrid mode feature set, please do use the
--reset
option to restore it.
I use a custom-nvidia.conf
in /etc/modprobe.d/
with
options nvidia "NVreg_DynamicPowerManagement=0x02"
in resseted mode. This means that RTD3 is not working here? (I don't know a good way to test this).
@sam-cavalheiro ,
I use a
custom-nvidia.conf
in/etc/modprobe.d/
withoptions nvidia "NVreg_DynamicPowerManagement=0x02"
in resseted mode. This means that RTD3 is not working here? (I don't know a good way to test this).
Without digging back into the details of RTD3 to refresh my memory I cannot quickly tell if that is all that is needed.
I do know that @bayasdev has spent quite a bit of time working with several people over the years making sure his code works with different hardware (Intel and AMD iGPUs), distros, WM's, etc.
I just know there are some tradeoffs in there. Hence, the cli options to switch to nvidia
mode or simply --reset
are also available. I, too, found it necessary to --reset
when working with pytorch with the nvidia cuda drivers, for example.
When I am done with such a project I use envycontrol again to put my laptop in the mode I need.
My usage of envycontrol
is not one and done - but rather situational.
Make sense?
To gain a better understanding of what happens upon switch to hybrid
mode, please take a look at the few lines of code used to switch into hybrid mode to see exactly which files it is creating with what contents. The CONSTANTS used are defined near the top of the file.
BTW, nvidia-smi should show both GPU utilization and power consumption metrics. That is how I monitor GPU overhead / usage.
For future readers ...
I followed these steps to install the nvidia cuda drivers and the nvidia-smi utility.
Note: these instructions are for Fedora 39. As I write this drivers are not available for Fedora 40 yet.
IMPORTANT!!! DO NOT install the proprietary NVIDIA drivers from the NVIDIA website using the run script method. This will surely break your system when kernel updates appear.
See this video segment ... Proprietary NVIDIA Drivers
sudo dnf upgrade --refresh
sudo dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/fedora39/x86_64/cuda-fedora39.repo
sudo dnf install kernel-headers kernel-devel tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-opengl libglvnd-glx libglvnd-devel acpid pkgconfig dkms
sudo dnf module list nvidia-driver
$ sudo dnf module list nvidia-driver
Last metadata expiration check: 2:42:46 ago on Wed 17 Apr 2024 07:11:24 AM PDT.
cuda-fedora39-x86_64
Name Stream Profiles Summary
nvidia-driver latest default [d], fm, ks, src Nvidia driver for latest branch
nvidia-driver latest-dkms [d][e] default [d] [i], fm, ks Nvidia driver for latest-dkms branch
nvidia-driver open-dkms default [d], fm, ks, src Nvidia driver for open-dkms branch
nvidia-driver 550 default [d], fm, ks, src Nvidia driver for 550 branch
nvidia-driver 550-dkms default [d], fm, ks Nvidia driver for 550-dkms branch
nvidia-driver 550-open default [d], fm, ks, src Nvidia driver for 550-open branch
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Select the appropriate one corresponding to your Fedora version to integrate the CUDA repository into your Fedora system.
sudo dnf module install nvidia-driver:latest-dkms
@klmcwhirter Sorry, but now I don't have time to test :( I'd not read the Nvidia documentation about RTD3 because english is not my primary language, so it's hard to read long text. I need to dedicate a bit of time to do that. So, for now, the only thing I can do is trust you.
Describe the bug I just can use NVENC (I think it's Nvidia codec) only with resetted envycontrol mode, not hybrid (I usually use that mode).
To Reproduce Steps to reproduce the behavior:
Expected behavior Test NVENC (with 'ffmpeg -i input.mp4 -vcodec h264_nvenc output.mp4') should just don't return error and convert the example file -- in hybrid mode, not necessarily resetted mode.
Screenshots Hybrid mode:
Resetted mode:
System Information: