You are not logged in.

#1 2019-11-21 10:30:55

frogwine
Member
Registered: 2019-11-21
Posts: 2

dGPU not turning off (NVIDIA PRIME Offload)

Hi, i have an Optimus enabled laptop runs Arch Linux. Using NVIDIA's 440.31 driver. I wanted to test new prime offload functionality. Then i patched my xorg with using this patch, and configured /etc/X11/xorg.conf.d/10-nvidia.conf as:

# Do not edit this file!
# It will be rewrite after the upgrade

Section "ServerLayout"
	Identifier     "Layout0"
    Option         "AllowNVIDIAGPUScreens"
    Screen      0  "iGPU" 0 0
EndSection

# You may uncomment the following lines, if Xorg.log contains:
# (EE) NVIDIA: Use the -ignoreABI option to override this check

# Section "ServerFlags"
#     Option         "IgnoreABI" "1"
# 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"
    DefaultDepth    24
    SubSection     "Display"
		Viewport    0 0
    EndSubSection
EndSection

Section "OutputClass"
    Identifier "iGPU"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "dGPU"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection
lsmod | grep nvidia

output is:

nvidia_drm             57344  2
nvidia_modeset       1114112  2 nvidia_drm
nvidia              19976192  90 nvidia_modeset
drm_kms_helper        212992  2 nvidia_drm,i915
drm                   516096  12 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler        69632  2 ipmi_devintf,nvidia

I installed

prime

package from AUR, it's simply does system calls if nvidia gpu wanted to use.
When i don't use prime:

frogwine:~ $ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.4
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.2.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

And when i use:

frogwine:~ $ prime glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 950M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.31
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 440.31
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.31
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

I also tested in game, Rocket League. Without

prime %command%

launch option i see poor performance, and if i use the launch option, game works fine.

But the problem is, NVIDIA GPU is always on. My laptop (MSI brand) has a feature, if dGPU is on, power button's LED is red. If not in use it's blue. It's currently always in red, not turning to blue. It's actually always red, even i don't run prime from fresh boot.

Offline

#2 2019-11-21 10:36:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,234

Re: dGPU not turning off (NVIDIA PRIME Offload)

Power management/suspension has only been implemented for Turing level graphics cards if you intend to use that functionality: http://us.download.nvidia.com/XFree86/L … ement.html

Offline

#3 2019-11-21 10:48:48

frogwine
Member
Registered: 2019-11-21
Posts: 2

Re: dGPU not turning off (NVIDIA PRIME Offload)

V1del wrote:

Power management/suspension has only been implemented for Turing level graphics cards if you intend to use that functionality: http://us.download.nvidia.com/XFree86/L … ement.html

Sorry, i forgot to type my system specs.

frogwine:~ $ neofetch 
                   -`                    frogwine@GP62-6QE 
                  .o+`                   ----------------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Host: GP62 6QE REV:1.0 
               `+oooooo:                 Kernel: 5.3.11-arch1-1 
               -+oooooo+:                Uptime: 14 mins 
             `/:-:++oooo+:               Packages: 1036 (pacman) 
            `/++++/+++++++:              Shell: bash 5.0.11 
           `/++++++++++++++:             Resolution: 1920x1080, 1920x1080 
          `/+++ooooooooooooo/`           DE: GNOME 3.34.1 
         ./ooosssso++osssssso+`          WM: Mutter 
        .oossssso-````/ossssss+`         WM Theme: Flat-Remix-Darkest-fullPanel 
       -osssssso.      :ssssssso.        Theme: Mojave-dark [GTK2/3] 
      :osssssss/        osssso+++.       Icons: Papirus-Dark [GTK2/3] 
     /ossssssss/        +ssssooo/-       Terminal: gnome-terminal 
   `/ossssso+/:-        -:/+osssso+-     CPU: Intel i7-6700HQ (8) @ 3.500GHz 
  `+sso+:-`                 `.-/+oso:    GPU: Intel HD Graphics 530 
 `++:.                           `-/+/   GPU: NVIDIA GeForce GTX 950M 
 .`                                 `/   Memory: 1459MiB / 7844MiB 

So can't i use power suspension with my Maxwell GPU? Why Maxwell serie has prime offload feature then?

Last edited by frogwine (2019-11-21 10:49:14)

Offline

#4 2019-11-21 11:44:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,234

Re: dGPU not turning off (NVIDIA PRIME Offload)

Because they implemented PRIME offload but didn't implement power saving as they are using some newer kernel/hardware features here, as to why that is the case, ask nvidia.

You might, though I haven't been able to test this myself, configure a setup where the nvidia kernel  module is removed and power saving enabled via e.g. bbswitch and then reload the nvidia module and reuse prime, though I don't know if that would bite itself with the general xorg config/setup.

Simplest would be, can you unload the kernel modules while not actively utilising prime? If not then that's unlikely to go anywhere, and you may have to opt for a more traditional log out/restart xorg approach, as implemented in e.g. optimus-manager

Last edited by V1del (2019-11-21 12:26:25)

Offline

Board footer

Powered by FluxBB