You are not logged in.

#1 2016-06-30 09:51:00

mellotanica
Member
Registered: 2014-07-08
Posts: 4

nvidia-settings instead of bumblebee to switch video cards

i've been running graphical applications with opti/primusrun for almost a year on my laptop, on  which i have an intel i7 with integrated graphics card wired to the laptop display (i think) and a dedicated nvidia gtx970m with optimus technology.

i recently saw that through nvidia-settings panel it is now possible to select application profiles and system default rendering card, this would be much more desirable to me because i don't like to have different launchers for the same application with and without optirun prefix and being able to set the application profile in a more stable way is a better way to have the system remember my gpu selection even after package upgrades.

following the instructions found on nvidia optimus wiki page i was able to run my desktop environment on the discrete card, but from the nvidia-settings i can't see any other graphics card than the nvidia one, so i cannot use the integrated card for regular system usage and switch to discrete card for specific applications.

my xorg.conf file looks like this:

Section "ServerLayout"
    Identifier     "layout"
    Screen      1  "nvidia"
    Inactive       "intel"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

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

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Option         "AllowEmptyInitialConfiguration"
EndSection

Section "Screen"
    Identifier     "intel"
    Device         "intel"
EndSection

and i have added the xrandr commands to my ~/.xinitrc :

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

i tried fiddling with these two files, but this seems to be the only configuration that lets me load my desktop properly on the laptop monitor.

i think the main problem here could be that the nvidia-libgl package that provides the drivers conflicts with mesa-libgl that is necessary for intel card usage..

anyone that managed to get this working can steer me in the right direction?

Offline

#2 2016-07-03 00:06:31

Andr0med4
Member
From: Germany
Registered: 2015-11-02
Posts: 5

Re: nvidia-settings instead of bumblebee to switch video cards

I guess you saw the switching in nvidia-settings in a screenshot from Ubuntu or Mint. These distributions provide a script/package which allows you to switch between Intel/nvidia GPU using the nvidia control panel. However, keep in mind this is not a seamless switch like you probably expect. It requires a X restart and therefore this script automatically logs you out after selecting a different vendor. There has been some effort to provide a similar script in Arch Linux, check here and here for more information.

Therefore, the setup you describe in your post is working as expected. Seamless switching is not available using the proprietary driver without a solution like Bumblebee/optirun, which basically starts a second XServer in order to avoid having to log you out on vendor change. Because of this, the configuration as described in the Wiki renders everything on the nvidia GPU using "xrandr --setprovideroutputsource". This is described in the article you've linked: "The proprietary NVIDIA driver does not support dynamic switching like the nouveau driver (meaning it can only use the NVIDIA device)."

At the moment, only the nouveau driver is able to seamlessly offload GPU-intensive task to the discrete card on the same XServer using the "xrandr --setprovideroffloadsink" command. You might want to have a look at https://wiki.archlinux.org/index.php/PRIME in the Wiki and the nouveau Optimus documentation. However, considering your card is quite new, the nouveau driver might not be an alternative for you since it still has major performance issues because of the lack of automatic reclocking support on Kepler and newer cards.

Last edited by Andr0med4 (2016-07-03 11:21:25)

Offline

Board footer

Powered by FluxBB