You are not logged in.

#1 2017-04-19 01:38:43

tedbell
Member
Registered: 2012-08-04
Posts: 167

[SOLVED]nVidia Optimus, bumblebee, primus: Can't get switching to work

Hi,

I cannot for the life of me get my hybrid graphics device (Intel 4600 and nVidia GTX 760M) to work according to any instructions or troubleshooting guides I've found. I've spent the day scouring the internet and found similar problems but no working answers.

My system is:

Acer V3-772G-9643
i7-4702MQ 2.2ghz (3.2 turbo)
Intel 4600 and nVidia GeForce GTX 760M
8GB DDR3 RAM
2 1TB drives

I followed the instructions on the Arch Wiki to the LETTER. Copied the code and edited it. Nothing works. My main issues are:

1. No switching graphics:  Can't even get nvidia-settings to work without throwing up an error that the nvidia module was not loaded. I can tell when I do run

primusrun glxgears

or

optimusrun glxgears

that I am running off my Intel because the frame rates (with vblank_mode=0) are far less than what I expected.

2. Anything I put into /etc/X11 fails. No exceptions:  I have never gotten a single config file to work placed in any part of the /etc/X11 directory or subdirectories. Ever. I am not able to startx as user when I do.

3. Can't overclock: Because nvidia-settings will not run. It gives me a "could not load NVIDIA module" error.

I tried both nvidia and nouveau and tried bumblebee and primusrun. Nothing. Everything runs off the Intel.

My BIOS settings don't allow me to disable the Intel, only the nVidia card.

I think I just need a good working xorg.conf file but the wiki doesn't tell you that bumblebee installs its own .conf. Xorg does it at the beginning of an install. And then there's the .conf file in the wiki.

Nothing written in the wiki, including all troubleshooting guides works for me.



Here are my relevant files:

~/.xinitrc

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


exec i3

I used the xorg.conf on the wiki for optimus and placed it where it said it should go. Nothing. I was also using the conf files generated by the installation of bumblebee and the nvidia driver.


Things I've already done:

-added modules to mkinitcpio
-blacklist nouveau
-try nouveau
-add kernel parameters from the wiki
-edited the xorg files until my eyes hurt. lol
-nvidia hook
-regen mkinitcpio

Can anyone help me solve this once and for all?
Solving this would help take me one step further away from Windows. big_smile


Thank you.

Last edited by tedbell (2017-04-20 05:53:31)

Offline

#2 2017-04-19 06:59:38

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

Re: [SOLVED]nVidia Optimus, bumblebee, primus: Can't get switching to work

Those two lines in your xinitrc are for when you don't want to use Bumblebee and use Nvidia in a dedicated manner. Remove them if you intend to use bumblebee. (and if this is your whole file, it isn't complete, use the template from /etc/X11/xinit/xinitrc and append the exec to the end) You said you edited Xorg files, when and where, can you post their contents (and most likely remove them since you don't have to do anything in that regard if you have the proper packages)? Also revert everything from your list of "already done" nothing in there is needed and the chance of breakage is high. Post the outputs of

pacman -Qs bumblebee
pacman -Qs bbswitch
groups
primusrun glxspheres64
dmesg | grep -E 'nvidia|bbswitch'

Offline

#3 2017-04-19 07:08:11

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED]nVidia Optimus, bumblebee, primus: Can't get switching to work

This has been said many times but I'll repeat it: glxgears is not a benchmark. Use glxinfo if you want to check which card is being used.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2017-04-19 17:30:11

tedbell
Member
Registered: 2012-08-04
Posts: 167

Re: [SOLVED]nVidia Optimus, bumblebee, primus: Can't get switching to work

V1del wrote:

Those two lines in your xinitrc are for when you don't want to use Bumblebee and use Nvidia in a dedicated manner. Remove them if you intend to use bumblebee. (and if this is your whole file, it isn't complete, use the template from /etc/X11/xinit/xinitrc and append the exec to the end) You said you edited Xorg files, when and where, can you post their contents (and most likely remove them since you don't have to do anything in that regard if you have the proper packages)? Also revert everything from your list of "already done" nothing in there is needed and the chance of breakage is high. Post the outputs of

pacman -Qs bumblebee
pacman -Qs bbswitch
groups
primusrun glxspheres64
dmesg | grep -E 'nvidia|bbswitch'

Thanks for this. I tried deleting my xorg files to let Xorg configure automatically on boot and it seems to work ok but I'm still getting errors. So right now I'm only using the bumblebee nvidia config. Am I supposed to be using a config file under /etc/X11 in conjunction or will the bumblebee xorg config file suffice for everything?

I'll post the outputs:

/etc/bumblebee/xorg.conf.nvidia

Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
   BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "UseDisplayDevice" "none"
EndSection

pacman -Qs bumblebee

local/bumblebee 3.2.1-15
    NVIDIA Optimus support for Linux through VirtualGL
local/lib32-primus 20151110-3
    Faster OpenGL offloading for Bumblebee (32-bit)
local/primus 20151110-7
    Faster OpenGL offloading for Bumblebee

pacman -Qs bbswitch

local/bbswitch 0.8-65
    Kernel module allowing to switch dedicated graphics card on Optimus laptops

groups

wheel bumblebee audio

primusrun glxspheres64

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xb3
Context is Direct
OpenGL Renderer: GeForce GTX 760M/PCIe/SSE2
62.296674 frames/sec - 41.245133 Mpixels/sec
60.009415 frames/sec - 39.730793 Mpixels/sec
60.009621 frames/sec - 39.730930 Mpixels/sec
60.005704 frames/sec - 39.728337 Mpixels/sec
60.008819 frames/sec - 39.730399 Mpixels/sec
60.010621 frames/sec - 39.731592 Mpixels/sec

dmesg | grep -E 'nvidia|bbswitch'

[   78.293903] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
[   78.294043] nvidia-nvlink: Nvlink Core is being initialized, major device number 238
[ 2294.186434] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  378.13  Tue Feb  7 18:30:08 PST 2017

thanks for the help

edit: Using the xinitrc file you suggested results in a blank x session opening up regradless of my exec command.

Last edited by tedbell (2017-04-19 17:55:28)

Offline

#5 2017-04-19 20:26:13

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

Re: [SOLVED]nVidia Optimus, bumblebee, primus: Can't get switching to work

Looks like everything works. As mentioned you shouldn't measure glxgears framerates, they aren't indicative of anything. Judge the performance of an actual application.

Offline

#6 2017-04-19 20:28:08

tedbell
Member
Registered: 2012-08-04
Posts: 167

Re: [SOLVED]nVidia Optimus, bumblebee, primus: Can't get switching to work

Sweet thanks!

Offline

Board footer

Powered by FluxBB