You are not logged in.

#1 2020-03-05 17:49:00

Ousia
Member
Registered: 2019-12-09
Posts: 8

Nvidia PRIME Render Offload doesn't turn off dGPU

I followed the instructions at https://wiki.archlinux.org/index.php/PR … er_offload but if I run nvidia-smi I still get a 4W power usage by the dGPU and the /usr/lib/Xorg process loaded on it

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64       Driver Version: 440.64       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   49C    P8     4W /  N/A |     16MiB /  5934MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       716      G   /usr/lib/Xorg                                 14MiB |
+-----------------------------------------------------------------------------+

My xorg.conf looks as follows

Section "ServerLayout"
    Identifier     "layout"
    Screen         0 "iGPU"
    Option         "AllowNVIDIAGPUScreens"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Module"
    Load           "modesetting"
    Load           "glx"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "Device"
    Identifier     "iGPU"
    Driver         "modesetting"
    BusID          "PCI:0:2:0"
EndSection

Section "Device"
    Identifier     "dGPU"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "iGPU"
    Device         "iGPU"
EndSection

On a possibly related note, I tried following the instructions at http://download.nvidia.com/XFree86/Linu … ement.html for the power management, but despite setting the rules in /lib/udev/rules.d/ as indicated, the relevant settings in /sys/bus/pci/devices/... get reset to their default values after rebooting.

Offline

#2 2020-03-05 19:20:21

gnox
Member
Registered: 2013-05-18
Posts: 81

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

Prime Render Offload doesnt turn off the dgpu, the driver is being used by xorg, it just lowers the power state.

If udev rules doesnt work you can also try with tmpfiles, example in  "/etc/tmpfiles.d/nvidia.conf"

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

Offline

#3 2020-03-06 10:51:37

kikislater
Member
From: Mauritius
Registered: 2016-01-16
Posts: 32

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

Will it work with acpi_call method ? > https://wiki.archlinux.org/index.php/Hy … _acpi_call

Offline

#4 2020-03-06 11:25:06

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

https://github.com/mkottman/acpi_call/commits/master

acpi_call last commit was in juli 2013 .
Did your videocard exist at that time ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2020-03-06 11:26:47

kikislater
Member
From: Mauritius
Registered: 2016-01-16
Posts: 32

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

Didn't check the date, it was in wiki indeed ...

Offline

#6 2020-03-06 12:02:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,668

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

Also what's you overall draw? Per device draws can often not really be done accurately, if the overall draw is at reasonable levels I wouldn't worry too much about it.

Offline

#7 2020-03-07 01:05:07

Ousia
Member
Registered: 2019-12-09
Posts: 8

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

V1del wrote:

Also what's you overall draw? Per device draws can often not really be done accurately, if the overall draw is at reasonable levels I wouldn't worry too much about it.

Playing with upower with only xterm running, seems to be about 15-16 W. I'm not totally sure, but I guess for a laptop with an i7 on it and the brightness of the screen quite high this might be normal.

Thanks for your help!

Last edited by Ousia (2020-03-07 01:05:40)

Offline

#8 2020-03-07 03:44:08

kikislater
Member
From: Mauritius
Registered: 2016-01-16
Posts: 32

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

It's quite high !
You could have less power drain

Offline

#9 2020-03-07 10:58:11

kikislater
Member
From: Mauritius
Registered: 2016-01-16
Posts: 32

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

On an MSI PS63 Modern going from 14-15W to 6W by disabling manually nvidia dGPU :

- Tlp properly configured. Prime with optimus manager to switch between devices
- boot with intel igpu with optimus manager. Check with :

glxinfo | grep "server glx vendor string"

- Find pci bus for dGPU with lspci
lspci -nn | grep 3D
02:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Max-Q] [10de:1c8f] (rev a1)

- Temporary dGPU disable :

echo 1 > /sys/bus/pci/devices/[card device id]/remove

In my case :

echo 1 | sudo tee /sys/bus/pci/devices/0000\:02\:00.0/remove

Thanks to @Lone_Wolf ;-)

@Ousia : which cpu or laptop do you have ?

As acpi_call is not up to date any idea to create a systemd service to enable it when booting on intel device and not on nvidia ?

Offline

#10 2020-03-08 20:24:50

Ousia
Member
Registered: 2019-12-09
Posts: 8

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

gnox wrote:

If udev rules doesnt work you can also try with tmpfiles, example in  "/etc/tmpfiles.d/nvidia.conf"

w /sys/bus/pci/devices/0000:01:00.0/power/control - - - - auto

That worked! Thanks!

kikislater wrote:

@Ousia : which cpu or laptop do you have ?

Alienware m15 R2, with a 9th gen i7

I'd rather avoid using optimus manager, and rely only on PRIME. According to http://download.nvidia.com/XFree86/Linu … ement.html this should be enough, when everything works properly, to ensure that the clock or power of the dGPU is entirely turned off, when that's not in use.

Offline

#11 2020-03-09 03:43:30

kikislater
Member
From: Mauritius
Registered: 2016-01-16
Posts: 32

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

Drawing 15-16W shows that is not enough ...

Last edited by kikislater (2020-03-09 03:44:22)

Offline

#12 2020-03-09 04:36:22

Ousia
Member
Registered: 2019-12-09
Posts: 8

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

kikislater wrote:

Drawing 15-16W shows that is not enough ...

Sure, but I'm really clueless about what else to do.

Offline

#13 2020-03-09 04:42:56

kikislater
Member
From: Mauritius
Registered: 2016-01-16
Posts: 32

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

Fully deactivate dGPU when on battery like I posted above

Proper TLP configuration with cpu and igpu scaling limits, limit performance on battery, limit boost on battery, enable pcie_aspm and you'll be Ok !

Recent intel's laptops needs undervolt to reach their best performance due to throttle when fully loaded and plugged

Offline

#14 2020-07-16 12:40:30

themontyhouse
Member
Registered: 2020-04-29
Posts: 4

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

I had the same problem with my Dell g3 for awhile then I followed this guide and used bbswitch like it says and now it turns my Nvidia card all the way off when I boot into Intel mode and nvidia-smi does have an output because it's turned all the way off increasing my battery by hours. Hope it works for you

https://forum.manjaro.org/t/install-dri … e/114828/3

Offline

#15 2020-07-16 13:05:02

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Nvidia PRIME Render Offload doesn't turn off dGPU

As the OP has not been back since March, I am going to close this thread. Ousia, if you come back and want this thread reopened, use the Report button.

Closing.

Offline

Board footer

Powered by FluxBB