can`t get nvidia driver working #176

Closed
raveit65 opened this Issue Jun 5, 2012 · 8 comments

Comments

Projects
None yet
2 participants

raveit65 commented Jun 5, 2012

First, bumblebee with nouveau are working well on fedora 17.
Also, the nvidia driver had been worked with bumblebee-2.4.1 on my MSI FX-700
I used bumblebee and bbswitch from elrepo rebuild for fedora
http://elrepo.org/linux/testing/el6/SRPMS/
nvidia driver is 295.53 from nvidia site installed with -no-opengl-files

My config files:

[root@satelitte rave]# cat /etc/bumblebee/bumblebee.conf 
# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=true
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia

## Client options. Will take effect on the next optirun executed.
[optirun]
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=
Module=nvidia
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib64/nvidia;/usr/lib64/nvidia/tls;/usr/lib64/vdpau
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules,/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules/extensions
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

[root@satelitte rave]# cat /etc/bumblebee/xorg.conf.nvidia 
Section "ServerLayout"
    Identifier "Layout0"
    Option "AutoAddDevices" "false"
EndSection

Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "ConnectedMonitor" "DFP"
EndSection

The bumblebee daemon doesn't start.

/usr/sbin/bumblebeed -D -x /etc/bumblebee/xorg.conf.nvidia --driver nvidia -m /usr/lib64/xorg/modules -k nvidia.ko -l /usr/lib64/xorg/modules/driver

(my latest try)

then

[rave@satelitte ~]$ sudo optirun smplayer
[ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
[ERROR]Could not connect to bumblebee daemon - is it running?

If i try start the dameon without define nvidia in /etc/bumblebee/bumblebee.conf, the daemon starts but use xorg.conf.nouveau and optirun fails. (nouveau is uninstalled)

[root@satelitte rave]# cat /var/log/Xorg.8.log

[    69.031] (==) Log file: "/var/log/Xorg.8.log", Time: Tue Jun  5 20:24:27 2012
[    69.031] (++) Using config file: "/etc/bumblebee/xorg.conf.nouveau"
[    69.031] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    69.031] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    69.032] (==) ServerLayout "Layout0"

[    69.036]    compiled for 1.12.0, module version = 1.2.0
[    69.036]    ABI class: X.Org Server Extension, version 6.0
[    69.036] (II) Loading extension DRI2
[    69.036] (II) LoadModule: "nouveau"
[    69.036] (WW) Warning, couldn't open module nouveau
[    69.036] (II) UnloadModule: "nouveau"
[    69.036] (II) Unloading nouveau
[    69.036] (EE) Failed to load module "nouveau" (module does not exist, 0)

I hate nouveau foggy , so perhaps you can help me.
If you need more info let me know.

Owner

Lekensteyn commented Jun 5, 2012

You must not use the .ko suffix for -k. Do not daemonize and add --debug for more info.

raveit65 commented Jun 7, 2012

Ok,
new day, new kernel and a lucky punch :)
I change /etc/bumblebbe.conf to

Driver=nvidia

and in driver section

KernelDriver=nvidia
Module=nvidia

Now it works, but without define 'Driver=nvidia', bumblebeed try to start nouveau.
Also without `KernelDriver=nvidia' bumblebeed doesn't find the kernel module.
So pls write this in the readme.

The init sript /etc/rc./ini.d/bumblebeed from the packages from http://elrepo.org/linux/testing/el6/SRPMS/
working well after a little error fix.
Perhaps you can use this init script for bumblebee.

Thanks for helping

raveit65 closed this Jun 7, 2012

raveit65 commented Jun 7, 2012

I see that already sript files for init and systemd are in your source code.
I think my probs results because the the elrepo rpm is build for nouveau.
I will build my own rpm.

Owner

Lekensteyn commented Jun 7, 2012

Sorry, it's a bug in Bumblebee which has been committed, but not released. Commits:
c7319f6
7302f1d

raveit65 commented Jun 7, 2012

For the new rpm i used those configure flags
%configure
CONF_PIDFILE=/var/run
CONF_DRIVER=nvidia
CONF_DRIVER_MODULE_NVIDIA=nvidia
CONF_LDPATH_NVIDIA=/usr/lib64/nvidia
CONF_MODPATH_NVIDIA=/usr/lib64/xorg/modules,/usr/lib64/xorg/modules/extensions/nvidia,/usr/lib64/xorg/modules/extensions,/usr/lib64/xorg/modules/drivers

in result the rpm will build with those files

installed (but not packed) File(s) found:
/etc/bash_completion.d/bumblebee
/etc/bumblebee/bumblebee.conf
/etc/bumblebee/xorg.conf.nouveau
/etc/bumblebee/xorg.conf.nvidia
/usr/bin/bumblebee-bugreport
/usr/bin/optirun
/usr/sbin/bumblebeed
/usr/share/doc/bumblebee/README.markdown
/usr/share/doc/bumblebee/RELEASE_NOTES_3_0
/usr/share/man/man1/bumblebeed.1.gz
/usr/share/man/man1/optirun.1.gz

I miss the the systemd files. Is there a extra configure flag or should i insert them manualy in the rpm build process?

Owner

Lekensteyn commented Jun 7, 2012

The systemd script has to be copied manually from the scripts directory iirc.

raveit65 commented Jun 7, 2012

rpm with systemd + nvidia is done for fedora and work well.
https://dl.dropbox.com/u/49862637/Mate-desktop/SOURCE/bumblebee-3.0-3.fc17.src.rpm
One litle issue, if i choose CONF_PIDFILE=/var/run as configure flag bumblebeed can't write the pidfile in /var/run.
Without this flag it works.

Let me say a big thankx for your work, you did a great job!
Bumblebee-3,0 is a big step forward
A configure flag for systemd in the next release would be amazing.

Owner

Lekensteyn commented Jun 7, 2012

It expects a file, not a directory name. So you need to use CONF_PIDFILE=/var/run/bumblebeed.pid. No problem, you're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment