Bumblebee & Nvidia Proprietary on SolydXK with DDM

Post your tutorials and howtos here.
User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby just » 06 May 2014 13:47

edit 2015-01-26
  • for SolydXK Nightly builds users this guide is obsoleted
  • Device Driver Manager (DDM) 2.0.3+ installs bumblebee-related software for nvidia-optimus cards without a problem and doesn't require any manual intervention
  • you may see a brief report about successfull ddm_2.0.2_all.deb package testing, and another one, about successfull DDM 2.0.3 testing
  • if the above package is not available anymore, the most recent DDM version is found here
  • if you prefer to have a full control over installation process, or, by some reason, DDM doesn't detect your nvidia-optimus, you may install bumblebee by hand. a very simple way to do so is described in this tutorial.


hi all blessed optimus owners :) ,

discovering only now that bumblebee may be installed on solydxk using ddm :evil: .

some manual tweaks are still needed though, to make the system work.

this text refers to freshly installed, updated and backed up solydxk-201405-64bit (home edition). with standard repos only, without additional software installed. just fresh and clean xfce and/or kde installation(s).

before going any further, please make sure that you can:
  • either temporararily disable plymouth, if used, and login into the command shell on bootup. the easiest way to disable plymouth on the fly is to remove "quiet splash" parameters from the kernel command line before booting the system (you may have only "quiet" parameter; remove it).
  • or boot the computer, access hard disk partitions, edit files on it from some other linux. it may be any linux, installed internally (multiboot computers) or externally (liveusb, livecd, etc).
both ways are easy to follow. let's assume that we have only one solyd installed. there's no any other linux available.
  1. boot the solyd.
  2. when welcome/ddm window pops up, allow ddm to install bumblebee-nvidia drivers.
  3. it takes about 50 minutes to finish. be patient.
  4. on the next reboot the computer will fail to start the X server, and will:
  5. either hang when plymouth is finished, if you use it. ctrl-alt-del will not work. you will need to do a cold reboot.
  6. or stop booting at the shell login prompt, if you don't use plymouth. skip the next two steps, login into shell, and go directly to p.9.
  7. start doing a cold reboot. don't boot immediately into solyd. remember to remove the "quiet splash" parameters from the kernel's line before booting. the computer will stop at the shell login prompt:

    Code: Select all

    SolydXK alexsok tty1
    alexsok login:
  8. if you can't or don't want disable plymouth on boot, you may always use another linux. start it, go to the partition which holds the solyd's /, and proceed with the next point.
  9. once login is complete, do the folowing three things.
  10. 1st, check that the file

    Code: Select all

    /etx/X11/xorg.conf
    exists:

    Code: Select all

    $ ls /etc/X11/xorg* -la
    -rw-r--r-- 1 root root 1299 May  4 19:58 /etc/X11/xorg.conf
    -rw-r--r-- 1 root root 1299 May  4 19:58 /etc/X11/xorg.conf.i-will-kill-your-xserver-dont-use-me
    -rw-r--r-- 1 root root    0 May  4 19:58 /etc/X11/xorg.conf.nvidia-xconfig-original
    :~$ 
    yes, it does exist (the first one in the list).
  11. 2nd, rename or delete it. in either case check that it doesn't exist anymore - it prevents the X server startup:

    Code: Select all

    $ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.i-will-kill-xserver-as-well
    $ ls /etc/X11/xorg* -la
    -rw-r--r-- 1 root root 1299 May  4 19:58 /etc/X11/xorg.conf.i-will-kill-xserver-as-well
    -rw-r--r-- 1 root root 1299 May  4 19:58 /etc/X11/xorg.conf.i-will-kill-your-xserver-dont-use-me
    -rw-r--r-- 1 root root    0 May  4 19:58 /etc/X11/xorg.conf.nvidia-xconfig-original
    $ 
    or:

    Code: Select all

    $ sudo rm /etc/X11/xorg.conf
    $ ls /etc/X11/xorg* -la
    -rw-r--r-- 1 root root 1299 May  4 19:58 /etc/X11/xorg.conf.i-will-kill-your-xserver-dont-use-me
    -rw-r--r-- 1 root root    0 May  4 19:58 /etc/X11/xorg.conf.nvidia-xconfig-original
    $ 
  12. 3rd and last:

    Code: Select all

    $ sudo nano /etc/bumblebee/bumblebee.conf
    find the line

    Code: Select all

    KernelDriver=nvidia
    in brief, it prevents bumblebeed service startup. replace it with

    Code: Select all

    KernelDriver=nvidia-current
  13. almost done.
  14. reboot computer into solyd. it will start normally now:

    Code: Select all

    $ sudo shutdown -r now
  15. never use nvidia-xconfig utility if you have an optimus card!
  16. best of all, uninstall offending package:

    Code: Select all

    $ sudo apt-get purge nvidia-xconfig
    [sudo] password for <username>: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      nvidia-xconfig*
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    After this operation, 193 kB disk space will be freed.
    Do you want to continue? [Y/n] Y
    (Reading database ... 149774 files and directories currently installed.)
    Removing nvidia-xconfig (319.72-1) ...
    Processing triggers for man-db (2.6.6-1) ...
    $ 
  17. done.
pros
  1. doesn't require any terminal interaction during the initial installation.
cons
  1. requires manual interventions during the post-install phase.
  2. apart of xorg.conf, creates in /etc/X11 some other (apparently) useless files and subdirs.
  3. potentially dangerous - if the user doesn't uninstall nvidia-xconfig, use it later, and saves the /etc/X11/xorg.conf, proposed by nvidia-xconfig, the system immediately turns back to be unbootable.
  4. takes unreasonably long time to finish.
for eventual bumblebee checks and tests please consult
http://forums.solydxk.com/viewtopic.php ... roprietary


conclusion

the result of the ddm installation (described here) is identical to those obtained with the manual one. the latter was presented some time ago in the topic:
http://forums.solydxk.com/viewtopic.php?f=9&t=1995

Device Driver Manager, started from the system menu either on solydx or solydk, reports the following drivers as installed and activated.

with ddm method (this one):

Code: Select all

+ bumblebee-nvidia  3.2.1-5  Nvidia display driver (recommended)
+ xserver-xorg-video-intel 2:2.21.15-2+b1  Intel display driver
with manual method:

Code: Select all

+ bumblebee-nvidia  3.2.1-5  Nvidia display driver (recommended)
+ xserver-xorg-video-intel 2:2.21.15-2+b1  Intel display driver
either method may be used to install bumblebee with proprietary nvidia drivers for optimus video cards on solydxk. choose one that best suits your tastes.

a clarification about plymouth. even though being mentioned here, it has absolutely no fault in this context. it has nothing to do at all with bumblebee installation, and doesn't influence it in a minimal way.


just

ector62
Posts: 18
Joined: 02 May 2014 22:25

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby ector62 » 07 May 2014 00:19

hi @justh
I performed these steps to install bumblebee with DDM:
1] I removed "quiet splash" from / etc / default / grub
2] I installed bumblebee from DD
3] I have not finished installing reboot
4] I removed xorg.conf from / etc/X11 /
5] I uninstalled nvidia-settings and nvidia-xconfig from the terminal, who wants can use the package manager
6]add in / etc / bumblebe / bumbebee.conf in the following line
KernelDriver = nvidia
add
KernelDriver = nvidia-current
7] I opened tt1 with ctrl + alt + f1
8] I logged in with your username and password
9] I entered "quiet splash" in grub and I gave sudo update-grub
10] I gave startx and I was logged
edit
I updated the guide
the command
startx
you can give the command, from tt1, without rebooting, rebooting is recommended to give, after following the guide.

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby just » 07 May 2014 05:22

so everything is ok now with your solyd, isn't it? the system starts normally and, once you're in the desktop, direct rendering is on, with glx renderer = nvidia, like in this example? :

Code: Select all

$ optirun inxi -Gxx
Graphics:  Card-1: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0126 
           Card-2: NVIDIA GF106M [GeForce GT 555M] bus-ID: 01:00.0 chip-ID: 10de:0dcd 
           X.Org: 1.15.0 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz 
           GLX Renderer: GeForce GT 555M/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 331.49 Direct Rendering: Yes
$ 
if so, everything is really ok.

nowdays, computers are very different one from another. it's difficult to make a valid example for all possible hardware & software combinations & configurations. the skill level of potential readers varies. someone needs step-by-step instructions, for another one it would be enough just to get an idea.

all that long opening post may be reduced to only two simple points:
  • once ddm has drivers installed, remove xorg.conf
  • in bumblebee.conf replace "nvidia" with "nvidia-current" for KernelDriver parameter
glad you have done it. better yet, in slightly different way from those described. this is the right way to learn linux, imho.

ector62
Posts: 18
Joined: 02 May 2014 22:25

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby ector62 » 07 May 2014 20:54

hi,@just
you place the command, you asked me after installing bumblebee.

Code: Select all

 ev@keef:~$ optirun inxi -Gxx
Graphics:  Card-1: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0166 
           Card-2: NVIDIA GF108M [GeForce GT 635M] bus-ID: 01:00.0 chip-ID: 10de:0de3 
           X.Org: 1.15.0 drivers: intel (unloaded: fbdev,vesa) Resolution: 1600x900@60.2hz 
           GLX Renderer: GeForce GT 635M/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 331.49 Direct Rendering: Yes

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby just » 08 May 2014 03:46

great! you did it. it tells the last line of your output.

bravo!

User avatar
amnesix
Posts: 176
Joined: 09 Nov 2013 12:46
Location: Berlin
Contact:

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby amnesix » 08 Jun 2014 07:36

Hi there...

I have such a laptop.

Code: Select all

~$ lspci -vnn | egrep 'VGA|3D'
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller])
01:00.0 3D controller [0302]: NVIDIA Corporation GF108M [GeForce GT 540M] [10de:0df4] (rev a1)
My problem : the ddm doesn't see the GeForce, and doesn't offer me to install bumblebee

Should try to install it via synaptic ?

User avatar
amnesix
Posts: 176
Joined: 09 Nov 2013 12:46
Location: Berlin
Contact:

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby amnesix » 08 Jun 2014 07:45

I'm getting confused...

Code: Select all

~$ nvidia-detect
No NVIDIA GPU detected.
So no GeForce. But :

Code: Select all

~$ lspci -vnn | egrep 'VGA|3D'
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller])
01:00.0 3D controller [0302]: NVIDIA Corporation GF108M [GeForce GT 540M] [10de:0df4] (rev a1)

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby just » 08 Jun 2014 08:49

@amnesix: you're posting your questions not only here, but in french-speaking subforum as well. i'm not speaking french, so trying to understand the point you're at from the french subforum is a bit difficult for me. but, from what i see there:

http://forums.solydxk.com/viewtopic.php ... pas#p37323

the things should be OK now - when you run

Code: Select all

optirun inxi -Gxx
the system correctly uses GeForce GT 540M, which should be your video card. was this command executed on your laptop? what i see is what you get :) on your computer?

does the problem still persist? should i answer here, in this english subform?

User avatar
amnesix
Posts: 176
Joined: 09 Nov 2013 12:46
Location: Berlin
Contact:

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby amnesix » 08 Jun 2014 09:07

I have installed bumblebee using the instructions from :
https://wiki.debian.org/Bumblebee#Installation

But I got no prompt for xorg.conf to ignore.

When I now type : optirun inxi -Gxx, I get this :

Code: Select all

optirun inxi -Gxx
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0116
           X.Org: 1.15.0 drivers: intel (unloaded: fbdev,vesa) Resolution: 1920x1080@60.0hz, 1024x768@60.0hz
           GLX Renderer: GeForce GT 540M/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 331.67 Direct Rendering: Yes
I seem have access to 3D : i can see the glxgears. But what baffles me, is that I have no mention of a second card as by a prvious post, where ector62 got :

Code: Select all

~$ optirun inxi -Gxx
Graphics:  Card-1: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0166
           Card-2: NVIDIA GF108M [GeForce GT 635M] bus-ID: 01:00.0 chip-ID: 10de:0de3
           X.Org: 1.15.0 drivers: intel (unloaded: fbdev,vesa) Resolution: 1600x900@60.2hz
           GLX Renderer: GeForce GT 635M/PCIe/SSE2 GLX Version: 4.4.0 NVIDIA 331.49 Direct Rendering: Yes
Is my bumblebee correctly installed ? That's the question...

When I use optirun glxgears -info, I get the gears all right, but at the end, when I close the window, i get this :

Code: Select all

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  155 (DRI2)
  Minor opcode of failed request:  8 (DRI2SwapBuffers      )
  Resource id in failed request:  0x4200002
  Serial number of failed request:  5983
  Current serial number in output stream:  5984
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 37 requests (37 known processed) with 0 events remaining.
So I'm a little confused.

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby just » 08 Jun 2014 09:35

seems like your bumblebee installation is ok. to solve all doubts, simply run inxi -Gxx twice - without and with optirun:

Code: Select all

inxi -Gxx
and

Code: Select all

optirun inxi -Gxx
compare the GLX Renderer: line (the last one) of both outputs. witout optirun it is Intel. with optirun it is GeForce GT 540M. stop. no other tests needed. bumblebee config is ok.

in case you're curious about how well does optimus perform... don't use glxgears to test it. use glxspheres instead:

http://forums.solydxk.com/viewtopic.php ... res#p30169

on my boxes, without optirun (= on intel gpu) the average frames/sec rate of glxspheres is about 60. with optirun (= on nvidia gpu) it's about 150..200 frames/sec. on nvidia glxspheres runs 3..4 times faster than on intel.

if you get similar results with glxspheres, your bumblebee is perfectly ok.

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby just » 08 Jun 2014 09:58

a final note.

currently there're two boxes with optimus here. glxspheres on nvidia

Code: Select all

optirun -c yuv /opt/VirtualGL/bin/glxspheres64
happily runs on both.

at the same time, for both laptops nvidia-detect reports that

Code: Select all

No NVIDIA GPU detected.
don't ask me why. i don't know.

User avatar
zerozero
Posts: 5373
Joined: 10 Feb 2013 23:37
Location: West Midlands, England
Contact:

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby zerozero » 08 Jun 2014 11:41

the issue with inxi not detecting the 2 cards might be a bug in the version we have in the repo (it's quite old, the development has been very fast)
to check that we need some tweaking:
open (as root) the file

Code: Select all

/etc/inxi.conf
and comment with # the line present there, so it looks like this

Code: Select all

zerozero@home ~ $ cat /etc/inxi.conf
## We want to use the distro to track the package
#B_ALLOW_UPDATE=false
save and close the editor;
after this [the only time we ever need to run inxi as root]

Code: Select all

sudo inxi -U
and then try again

Code: Select all

inxi -Gxx
we might be lucky and get the proper result :)

===
outputs on my system

Code: Select all

zerozero@home ~ $ cat /etc/inxi.conf
## We want to use the distro to track the package
#B_ALLOW_UPDATE=false

Code: Select all

zerozero@home ~ $ sudo inxi -U
[sudo] password for zerozero: 
Starting inxi self updater.
Currently running inxi version number: 2.1.21
Current version patch number: 00
Updating inxi in /usr/bin using svn server as download source...
Successfully updated to svn server version: 2.1.28
New svn server version patch number: 00
To run the new version, just start inxi again.
----------------------------------------
Starting download of man page file now.
Checking Man page download URL...
Man file download URL verified: http://inxi.googlecode.com/svn/trunk/inxi.1.gz
Downloading Man page file now.
Download/install of man page successful. Check to make sure it works: man inxi

Code: Select all

zerozero@home ~ $ inxi -Fzx
System:    Host: home Kernel: 3.14-1-amd64 x86_64 (64 bit gcc: 4.8.2) Desktop: KDE 4.12.4 (Qt 4.8.6) 
           Distro: SolydXK 1 testing 
Machine:   System: Gigabyte product: N/A
           Mobo: Gigabyte model: Z77-D3H v: x.x Bios: American Megatrends v: F12 date: 04/25/2012
CPU:       Quad core Intel Core i7-3770K (-HT-MCP-) cache: 8192 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 28249 
           Clock Speeds: 1: 1620 MHz 2: 1620 MHz 3: 1620 MHz 4: 1620 MHz 5: 1620 MHz 6: 1620 MHz 7: 1620 MHz
           8: 1620 MHz
Graphics:  Card: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
           Display Server: X.Org 1.15.0 driver: intel Resolution: 1440x900@59.9hz
           GLX Renderer: Mesa DRI Intel Ivybridge Desktop GLX Version: 3.0 Mesa 10.1.0 Direct Rendering: Yes
Audio:     Card-1 Intel 7 Series/C210 Series Family High Definition Audio Controller 
           driver: snd_hda_intel bus-ID: 00:1b.0 
           Card-2 Microsoft LifeCam HD-3000 driver: USB Audio usb-ID: 001-002 
           Sound: Advanced Linux Sound Architecture v: k3.14-1-amd64
Network:   Card-1: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet
           driver: atl1c v: 1.0.1.1-NAPI port: e000 bus-ID: 04:00.0
           IF: eth1 state: down mac: <filter>
           Card-2: NetGear WNA1100 Wireless-N 150 [Atheros AR9271] driver: ath9k_htc usb-ID: 005-004
           IF: wlan0 state: up mac: <filter>
Drives:    HDD Total Size: 1000.2GB (37.6% used) ID-1: /dev/sda model: ST500DM002 size: 500.1GB temp: 34C
           ID-2: /dev/sdb model: ST3500418AS size: 500.1GB temp: 33C
Partition: ID-1: / size: 49G used: 11G (24%) fs: ext4 dev: /dev/sda1 
           ID-2: /home size: 400G used: 330G (87%) fs: ext4 dev: /dev/sda2 
           ID-3: swap-1 size: 10.73GB used: 0.00GB (0%) fs: swap dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 31.0C mobo: 25.0C 
           Fan Speeds (in rpm): cpu: 1516 fan-2: 0 fan-3: 0 fan-4: 0 fan-5: 0 
Info:      Processes: 245 Uptime: 1 day Memory: 5513.6/15978.3MB Init: SysVinit runlevel: 2 Gcc sys: 4.8.2 
           Client: Shell (bash 4.3.01) inxi: 2.1.28 
bliss of ignorance

User avatar
amnesix
Posts: 176
Joined: 09 Nov 2013 12:46
Location: Berlin
Contact:

Re: Bumblebee & Nvidia Proprietary on SolydXK with DDM

Postby amnesix » 10 Jun 2014 07:05

You are right, Zerozero.

Now I get this :

Code: Select all

:~$ inxi -Gxx
Graphics:  Card-1: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
           bus-ID: 00:02.0 chip-ID: 8086:0116
           Card-2: NVIDIA GF108M [GeForce GT 540M]
           bus-ID: 01:00.0 chip-ID: 10de:0df4
           Display Server: X.Org 1.15.0 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.0hz
           GLX Renderer: Mesa DRI Intel Sandybridge Mobile
           GLX Version: 3.0 Mesa 10.1.0 Direct Rendering: Yes
Thank you to you all !


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 3 guests