Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting Bumblebee/primus to work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6259
Location: /usr/lib64/lv2

PostPosted: Mon Mar 19, 2018 2:09 am    Post subject: Getting Bumblebee/primus to work Reply with quote

I have an Optimus laptop with an Nvidia 1050 Ti mobile. (I have confirmed it is Optimus.)

Trying to get bumblebee working. When I try to optirun, such as optirun glxinfo or optirun nvidia-settings, I get:
Code:

[  500.118017] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

[  500.118057] [ERROR]Aborting because fallback start is disabled.



User is in video and bumblebee groups. Same error with user or root.

/var/log/Xorg.8.log (for bumblebee) says:
Code:

[   493.680] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[   493.680] (==) NVIDIA(0): RGB weight 888
[   493.680] (==) NVIDIA(0): Default visual is TrueColor
[   493.680] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[   493.680] (**) NVIDIA(0): Option "ProbeAllGpus" "false"
[   493.681] (**) NVIDIA(0): Option "UseEDID" "false"
[   493.681] (**) NVIDIA(0): Option "UseDisplayDevice" "none"
[   493.681] (**) NVIDIA(0): Enabling 2D acceleration
[   493.681] (**) NVIDIA(0): Ignoring EDIDs
[   493.681] (**) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout
[   493.681] (**) NVIDIA(0):     mode
[   500.114] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0.  Please
[   500.114] (EE) NVIDIA(GPU-0):     check your system's kernel log for additional error
[   500.114] (EE) NVIDIA(GPU-0):     messages and refer to Chapter 8: Common Problems in the
[   500.114] (EE) NVIDIA(GPU-0):     README for additional information.
[   500.114] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA graphics device!
[   500.114] (EE) NVIDIA(0): Failing initialization of X screen 0


I know I have this card. lspci:
Code:

01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)


With bumblebee in the default runlevel, I have to log in twice from lightdm. Not sure if that means anything.

Been haxxing at getting the nvidia side of things working for a few days, would appreciate any advice.

EDIT:

I seem to have gotten this to work. I had to:

  • Go back into menuconfig and disable all framebuffer, including the DRM fb option.
  • Recompile nvidia-drivers
  • Change bridge from primus to auto. Not sure if this means it's now using virtualgl. I did emerge primus.


I think the double-login was related to the kernel framebuffer stuff hanging around with the nvidia driver.

EDIT2:

Progress, but not solution. Steam client runs with optirun steam - but always crashes/quits within a few minutes - and with primusrun steam it fails to load steamui.so. With something like
Code:

vblank_mode=0 LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' optirun -b primus steam

I get openGL extension not supported by display.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1554
Location: /mnt/Gentoo/Europe

PostPosted: Mon Mar 19, 2018 4:17 am    Post subject: Reply with quote

I think, you do not have use bumblebee and primus anymore :)
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6259
Location: /usr/lib64/lv2

PostPosted: Mon Mar 19, 2018 1:25 pm    Post subject: Reply with quote

I found the Gentoo wiki about using xrandr for this - is that what you mean?
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6397
Location: Saint Amant, Acadiana

PostPosted: Mon Mar 19, 2018 1:31 pm    Post subject: Reply with quote

There is also nVidia documentation about Optimus setup, buried somewhere in /usr/share/. Another way to skin this cat.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


Joined: 23 Jul 2005
Posts: 1554
Location: /mnt/Gentoo/Europe

PostPosted: Mon Mar 19, 2018 4:00 pm    Post subject: Reply with quote

audiodef wrote:
I found the Gentoo wiki about using xrandr for this - is that what you mean?


I used to use bumblebee for couple of years, and then this project was abandon, as there is native support of Optimus. I remember even I was trying to keep those bumblebee + primusrun, but I had problem to start it later on, so use native drivers now.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6259
Location: /usr/lib64/lv2

PostPosted: Mon Mar 19, 2018 9:05 pm    Post subject: Reply with quote

Thanks to you both, will keep at it.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Tue Mar 20, 2018 6:58 am    Post subject: Reply with quote

Bumblebee still works on my optimus laptop with Gentoo. I use "primusrun %command%" as game launch option in Steam and these days I play Stellaris, Surviving Mars and Oxygen Not Included. These games are not too demanding graphically so performance with bumblebee is great.

Here's an interesting comment from a bumblebee dev recently posted on a github issue: https://github.com/Bumblebee-Project/Bumblebee/issues/947
Quote:
The reason there have been no commits is simply that no commits have been needed.
I've personally seen Bumblebee as "complete" for a long time now. It works, and should continue to work for the foreseeable future.
I continue to use Bumblebee every day myself (and have used it on all my laptops since originally working on it), and have never come across anything I felt like needed changing/updating - otherwise I would have.

Bumblebee was always meant to be a temporary solution until a proper/official solution presented itself. I am both happy and sad that it continues to be useful to this day. (Happy because, well, it's still serves a purpose; sad because a proper solution should really have been available by now.) It serves its purpose, however, and I don't feel like there is a need to improve it beyond its current state.

Of course, other devs may feel differently about this, but I have a feeling these thoughts are probably shared between all/most of them.


Here is my setup:

Code:
# emerge bumblebee bbswitch primus nvidia-drivers -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-power/bbswitch-0.8-r1::gentoo  0 KiB
[ebuild   R    ] x11-drivers/nvidia-drivers-390.42:0/390::gentoo  USE="X acpi compat driver kms multilib tools -gtk3 -pax_kernel -static-libs -uvm -wayland" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild   R    ] x11-misc/bumblebee-3.2.1_p20170123::gentoo  USE="bbswitch" VIDEO_CARDS="nvidia -nouveau" 0 KiB
[ebuild   R   *] x11-misc/primus-9999-r1::seden  ABI_X86="32 (64) (-x32)" 0 KiB

Total: 4 packages (4 reinstalls), Size of downloads: 0 KiB


I don't remember why exactly I use primus from the seden overlay but this setup works for me.
_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6259
Location: /usr/lib64/lv2

PostPosted: Tue Mar 20, 2018 12:49 pm    Post subject: Reply with quote

Thanks, dweezil. I read another post in Gamers & Players where someone mentioned the seden overlay.

I was just thinking what would be nice is for Xorg/kernel to recognize an Optimus setup and automatically handle it when nvidia-drivers are installed.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum