Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bumblebee strikes back
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Xywa
Veteran
Veteran


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

PostPosted: Wed Feb 17, 2016 7:01 pm    Post subject: bumblebee strikes back Reply with quote

Hi,

As for second week my nvidia Optimus doesn't work with Gentoo (with nvidia driver), could someone tell me where I can find bumblebee for Gentoo wiki page?

It used to be 2 years ago and now is just information about Optimus & nvidia drivers:
https://wiki.gentoo.org/wiki/NVIDIA/Optimus

I remember I had to start bumblebee server, but I forgot details.
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Wed Feb 17, 2016 9:02 pm    Post subject: Reply with quote

Hi yah,

Thankfully my laptop has the integrated Intel GPU disabled permanently in hardware / UEFI firmware... So less hassle I guess for me!!

But there is a non-official bumblebee overlay ...

Plus perhaps the Arch Wiki: Bumblebee page. Worth reading to familiarise yourself with the basics!! I often rip-off Arch stuff - it's much more widely used then Gentoo on the Desktop and the Wiki is (nearly) always up to date... The Arch packages get "beaten" on more as well - so are great source of inspiration / patches for Upstream issues (good luck trying to figure out any other distro's obscure source code links, etc). 8)

Potentially OT... :lol:
Arch is quite similar to Gentoo in the installation of GL libraries. However Gentoo has a rather dubious scheme of putting the Mesa GL libs in /usr/lib{32,64} which might potentially bugger up a Bumblebee setup. I've been having a "robust debate" about this in bug report I started - see app-eselect/eselect-opengl with media-libs/mesa with x11-drivers/nvidia-drivers-361 - GLX not working(?) ... Arch creates lib* symlinks from the main lib /usr/lib{32,64} directories to the respective sub-directories (e.g. nvidia, mesa, catalyst) - for shared GL lib's. I'm currently working on some (very) unofficial packages that follow this approach - for my Layman overlay. They work for me...

Out of selfish personal interest... 8O I'd be interested to here if you run into problems with the default Gentoo setup (app-eselect/opengl-1.3.1-r4). I know the default Gentoo GL set-up causes some issues for the native Steam client - but it's hard to figure out what other packages the default Gentoo set-up might potentially break...

Bob
_________________
system: G751JT (ASUS-NotebookSKU); processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz; memory: 32GiB System Memory; display: GM204M [GeForce GTX 970M]; disk: 2048GB Samsung SSD 850;BD-CMB UJ172 S;1024GB Samsung SSD 850
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


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

PostPosted: Thu Feb 18, 2016 7:19 am    Post subject: Reply with quote

BobWya wrote:
Out of selfish personal interest... 8O I'd be interested to here if you run into problems with the default Gentoo setup (app-eselect/opengl-1.3.1-r4). I know the default Gentoo GL set-up causes some issues for the native Steam client - but it's hard to figure out what other packages the default Gentoo set-up might potentially break...


HiYa Bob,

I did manage to start optirun, but I have a problem with primusrun, which is used by... steam. I play many of games through steam, 2 yeras ago by prismusrun, and last 12 months by nvidia optimus driver. Everything in Gentoo ~amd64 was fine till "something" at the beginning of February happen. I have no idea what, and from that time my nvidia is piece of junk so far.

I love arch-wiki and thanks to arch-wiki I could run a year ago nvidia-optimus with nvidia driver (one thing was missing in Gentoo wiki).

I am waiting for a new kernel 4.5 (fix tearing in nvidia optimus) and new xorg-conf (hope will fix current issue).

BTW
I had this:
Code:
$ primusrun glxgears
primus: fatal: failed to load any of the libraries: /usr/lib64/opengl/nvidia/lib/libGL.so.1:/usr/lib32/opengl/nvidia/lib/libGL.so.1:/usr/lib/opengl/nvidia/lib/libGL.so.1
libGLX.so.0: cannot open shared object file: No such file or directory
/usr/lib32/opengl/nvidia/lib/libGL.so.1: wrong ELF class: ELFCLASS32
libGLX.so.0: cannot open shared object file: No such file or directory


I did this:
Quote:
Note: If, when using primusrun on a system with the nouveau driver, you are getting:
primus: fatal: failed to load any of the libraries: /usr/$LIB/nvidia/libGL.so.1
/usr/$LIB/nvidia/libGL.so.1: Cannot open shared object file: No such file or directory
You should add the following in /usr/bin/primus after PRIMUS_libGL:
export PRIMUS_libGLa='/usr/$LIB/libGL.so.1'

https://wiki.archlinux.org/index.php/bumblebee

And now I have this:
Code:
$ primusrun glxgears
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  29
  Current serial number in output stream:  32
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Thu Feb 18, 2016 12:25 pm    Post subject: Reply with quote

Xywa wrote:

HiYa Bob,

I did manage to start optirun, but I have a problem with primusrun, which is used by... steam. I play many of games through steam, 2 yeras ago by prismusrun, and last 12 months by nvidia optimus driver. Everything in Gentoo ~amd64 was fine till "something" at the beginning of February happen. I have no idea what, and from that time my nvidia is piece of junk so far.

I love arch-wiki and thanks to arch-wiki I could run a year ago nvidia-optimus with nvidia driver (one thing was missing in Gentoo wiki).

I am waiting for a new kernel 4.5 (fix tearing in nvidia optimus) and new xorg-conf (hope will fix current issue).

BTW
I had this:
Code:
$ primusrun glxgears
primus: fatal: failed to load any of the libraries: /usr/lib64/opengl/nvidia/lib/libGL.so.1:/usr/lib32/opengl/nvidia/lib/libGL.so.1:/usr/lib/opengl/nvidia/lib/libGL.so.1
libGLX.so.0: cannot open shared object file: No such file or directory
/usr/lib32/opengl/nvidia/lib/libGL.so.1: wrong ELF class: ELFCLASS32
libGLX.so.0: cannot open shared object file: No such file or directory


I did this:
Quote:
Note: If, when using primusrun on a system with the nouveau driver, you are getting:
primus: fatal: failed to load any of the libraries: /usr/$LIB/nvidia/libGL.so.1
/usr/$LIB/nvidia/libGL.so.1: Cannot open shared object file: No such file or directory
You should add the following in /usr/bin/primus after PRIMUS_libGL:
export PRIMUS_libGLa='/usr/$LIB/libGL.so.1'

https://wiki.archlinux.org/index.php/bumblebee

And now I have this:
Code:
$ primusrun glxgears
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  29
  Current serial number in output stream:  32


Are you using x11-drivers/nvidia-drivers-361.28 that may need the +compat USE flag set (to enable legacy the legacy, non-GLVND libGL.so library). The Gentoo installer reverses the default choice of the Nvidia proprietary driver installer (not sure why??)

I've read that >x11-base/xorg-server-18.0 may break Nvidia Optimus support. See Arch Bug 47151 ...

What's the output from:
Code:
file /usr/lib64/opengl/nvidia/lib/lib*


Please note you can't follow the Arch Wiki - you can only use it as a guide! The GL libraries are stored differently on Gentoo. You could try:
Code:
export PRIMUS_libGLa='/usr/$LIB/opengl/nvidia/libGL.so.1'


But as I said I'm not familiar with the Primus / Bumblebee (I've never used them) - especially if a setup is broken by blindly following the wrong Wiki :oops:
I am familiar with how the Nvidia driver is installed on Gentoo 8)

OT...
I'd recommend some little Gentoo setup tweaks - I added many moons ago :lol: :

/etc/portage/make.conf
Code:
FEATURES="... compress-build-logs ..."
PORT_LOGDIR="/var/log/portage/build"


So you get gzip compressed logs of every package emerged (or failed) - since the dawn of time.

Combined with a BASH alias similar to (other shells are available!!) :

/etc/bash/bashrc
Code:
alias lsdate='/bin/ls -Alhrtp --color=auto'


Then the lsdate command (alias) will then sort the contents of a directory by date... Say your log directory... Which you can run through grep... Then pipe the log files through gunzip or less. I'm sure you're getting the idea here!! I don't have those "oh no I installed a world update last week and everything's broken now" moment - nearly so often! 8)


Bob
_________________
system: G751JT (ASUS-NotebookSKU); processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz; memory: 32GiB System Memory; display: GM204M [GeForce GTX 970M]; disk: 2048GB Samsung SSD 850;BD-CMB UJ172 S;1024GB Samsung SSD 850
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


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

PostPosted: Thu Feb 18, 2016 4:02 pm    Post subject: Reply with quote

Quote:
You could try:

Code:
export PRIMUS_libGLa='/usr/$LIB/opengl/nvidia/libGL.so.1'

but I found this is only for noveau driver

A year ago we had similair mess w X system, that time the sollution was to downgrade the kernel and nvidia driver.

Code:
 - - compat      : Install non-GLVND libGL for backwards compatibility

^^ what does it mean?
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Thu Feb 18, 2016 4:57 pm    Post subject: Reply with quote

Xywa wrote:
Quote:
You could try:

Code:
export PRIMUS_libGLa='/usr/$LIB/opengl/nvidia/libGL.so.1'

but I found this is only for noveau driver

A year ago we had similair mess w X system, that time the sollution was to downgrade the kernel and nvidia driver.

Code:
 - - compat      : Install non-GLVND libGL for backwards compatibility

^^ what does it mean?


The low down on GLVND from Reddit ... compat is just the catchy USE flag the Gentoo dev's called this Nvidia library choice...

Yeah, personally I've just lost suspend-resume support (yet again) - with something I updated yesterday - probably bloody Nvidia ( driver version 361.28 ) again... :evil:

Are the primus* executables shell-script wrappers or are they pure binaries ? If they are just shell scripts I could take a look them... Post them here... I can probably spot if the current Gentoo eselect-opengl mechanism will break the GL switching.

Otherwise I probably can't help - since I've got nothing to test primus support on!!

Bob
_________________
system: G751JT (ASUS-NotebookSKU); processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz; memory: 32GiB System Memory; display: GM204M [GeForce GTX 970M]; disk: 2048GB Samsung SSD 850;BD-CMB UJ172 S;1024GB Samsung SSD 850
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


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

PostPosted: Thu Feb 18, 2016 7:05 pm    Post subject: Reply with quote

OK. Lets try solve the problem with Nvidia properity driver.

I set back standard Gentoo nvidia Optimus settings.

When I start form console by startx pure X without KDE, I have message after 1sek:
Code:
xinit: connection to X server lost

and I am back in console

Xorg.0.log:
http://pastebin.com/cAxGW6UL
Only error from pure X:
Code:
[ 31160.063] (II) Loading sub module "glamoregl"
[ 31160.063] (II) LoadModule: "glamoregl"
[ 31160.063] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[ 31160.066] (II) Module glamoregl: vendor="X.Org Foundation"
[ 31160.066]    compiled for 1.18.1, module version = 1.0.0
[ 31160.066]    ABI class: X.Org ANSI C Emulation, version 0.4
[ 31160.066] (II) glamor: OpenGL accelerated X.org driver based.
[ 31160.073] (EE) modeset(G0): eglInitialize() failed
[ 31160.073] (EE) modeset(G0): glamor initialization failed


The same settings^^ + KDE5 Plasma, I could see kmail, very streechd kwellet box, and I cannot do nothing
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Thu Feb 18, 2016 7:15 pm    Post subject: Reply with quote

OK that's useful stuff - I can work with that!!

What's the output from:
Code:
emerge -pv xorg-server

+
Code:
emerge -pv dev-qt/qtgui:5 dev-qt/qtwidgets:5 dev-qt/qtmultimedia:5

_________________
system: G751JT (ASUS-NotebookSKU); processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz; memory: 32GiB System Memory; display: GM204M [GeForce GTX 970M]; disk: 2048GB Samsung SSD 850;BD-CMB UJ172 S;1024GB Samsung SSD 850
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


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

PostPosted: Fri Feb 19, 2016 8:01 am    Post subject: Reply with quote

Code:
# emerge -pv xorg-server

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

Calculating dependencies... done!
[ebuild   R    ] x11-base/xorg-server-1.18.1:0/1.18.1::gentoo  USE="glamor ipv6 suid udev xorg -dmx -doc -kdrive -libressl -minimal (-selinux) -static-libs -systemd -tslib -unwind -wayland -xephyr -xnest -xvfb" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Code:
# emerge -pv dev-qt/qtgui:5 dev-qt/qtwidgets:5 dev-qt/qtmultimedia:5

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

Calculating dependencies... done!
[ebuild   R    ] dev-qt/qtgui-5.5.1-r1:5::gentoo  USE="dbus egl gif gles2 jpeg png udev xcb -accessibility -debug -eglfs -evdev -gtkstyle -ibus -libinput {-test} -tslib -tuio" 0 KiB
[ebuild   R    ] dev-qt/qtwidgets-5.5.1-r1:5::gentoo  USE="gles2 png xcb -debug -gtkstyle {-test}" 0 KiB
[ebuild   R    ] dev-qt/qtmultimedia-5.5.1-r2:5::gentoo  USE="alsa gles2 qml widgets -debug -gstreamer -gstreamer010 -openal -pulseaudio {-test}" 0 KiB

Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Fri Feb 19, 2016 1:48 pm    Post subject: Reply with quote

Xywa wrote:
Code:
# emerge -pv xorg-server

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

Calculating dependencies... done!
[ebuild   R    ] x11-base/xorg-server-1.18.1:0/1.18.1::gentoo  USE="glamor ipv6 suid udev xorg -dmx -doc -kdrive -libressl -minimal (-selinux) -static-libs -systemd -tslib -unwind -wayland -xephyr -xnest -xvfb" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Are you sure you want +glamor support there? My understanding that it is only supported by the open-source kernel drivers...

Xywa wrote:

Code:
# emerge -pv dev-qt/qtgui:5 dev-qt/qtwidgets:5 dev-qt/qtmultimedia:5

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

Calculating dependencies... done!
[ebuild   R    ] dev-qt/qtgui-5.5.1-r1:5::gentoo  USE="dbus egl gif gles2 jpeg png udev xcb -accessibility -debug -eglfs -evdev -gtkstyle -ibus -libinput {-test} -tslib -tuio" 0 KiB
[ebuild   R    ] dev-qt/qtwidgets-5.5.1-r1:5::gentoo  USE="gles2 png xcb -debug -gtkstyle {-test}" 0 KiB
[ebuild   R    ] dev-qt/qtmultimedia-5.5.1-r2:5::gentoo  USE="alsa gles2 qml widgets -debug -gstreamer -gstreamer010 -openal -pulseaudio {-test}" 0 KiB

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


I've had issues using +gles2 (/ egl ) support with x11-drivers/nvidia driver... Especially with the dev-qt/*:5 libraries...

It would also be super-useful 8) to know if your kwin_x11 executable is cross-linking both the Nvidia and Mesa GL libraries... If you can get that far!!
Code:
ldd -d /usr/bin/kwin_x11  | grep GL

You could run that under a pure Nvidia setup (i.e. not trying to load an Optimus configuration - just to get Plasma 5 working).

I found it useful to install the LXQt Desktop - it can share most of the resources of Plasma 5 (since it's based on dev-qt/*:5). It's super lightweight (in terms of disk usage and build times). It was really useful when I was troubleshooting Plasma 5 issues. LXQt can run on Kwin 5 or Openbox (well most Window Managers I guess).


I found this blog post by Foster McLane about Bumblebee on Gentoo - that might be of interest...
Not much detail there - but he does have a Github page and (1-2 Gentoo overlays??). So perhaps you could get some advice off him?

Bob
_________________
system: G751JT (ASUS-NotebookSKU); processor: Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz; memory: 32GiB System Memory; display: GM204M [GeForce GTX 970M]; disk: 2048GB Samsung SSD 850;BD-CMB UJ172 S;1024GB Samsung SSD 850
Back to top
View user's profile Send private message
Atmmac
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2013
Posts: 130
Location: Watertown, MA

PostPosted: Tue Feb 23, 2016 6:14 pm    Post subject: Reply with quote

Are you sure you downgraded right? We had discussed this in the other posts under kernel and hardware.
https://forums.gentoo.org/viewtopic-t-1038828.html

If I remember correctly you need to delete your xorg.conf and set up an overlay for bumblebee and primus. Its been a long time since I used them. Hell I may be doing the same as you if these new xorg-server versions don't work out. Optimus is always such a PIA.
Back to top
View user's profile Send private message
Xywa
Veteran
Veteran


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

PostPosted: Wed Feb 24, 2016 7:19 am    Post subject: Reply with quote

Atmmac wrote:
Are you sure you downgraded right? We had discussed this in the other posts under kernel and hardware.
https://forums.gentoo.org/viewtopic-t-1038828.html


I think so, but as bumblebee is no longer developed, I think I will go back to nvidia Optimus driver and try to find a reason, why X cannot startx with this driver form February.

New xrandr 1.5 is Today, kernel 4.5 coming soon (with many fixes for nvidia Optimus), new (patched) xorg-server. Hopefully I will forgot after that about any Optimus problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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