# [SOLVED] Optirun, bumblebee & X failures :(

## pepi55

Hello again forum,

I really appreciated last time i got help on this forum! buuuuuut i have another problem I cannot solve   :Sad: 

I have googled for this and sought the forum but it appears im the ONLY one with this problem :/ (which makes it highly likely im just doin' it wrong)

anyhow its really dissapointing there is no wiki page on how to properly configure bumblebee especially because there are more and more laptops coming out with two video cards.

so let me explain... (please feel free to ask for any information you are missing; i am sure that i will miss something important and also please explain how i can provide you with this info since im generally still a total linux noob) 

i had trouble setting bumblebee up right now and have followed THIS guide on configuring my kernel and wifi and pretty much everything INCLUDING bumblebee (my laptop is a dell xps15 L502X so i thought it was close enough) though the wiki explains that the bumblebee packages arent working or something really vague... but i think bumblebee is working fine since the battery time is increased with a whopping 4 hours. 

I am also using the script provided, and the kernel parameters and i also have to mention that i added 

```
echo OFF >> /proc/acpi/bbswitch
```

 to the script so the laptop boots with the card off (i am unable to think of a more efficient/clean way to do this   :Embarassed:  )

here's the error:

```
~ ❯❯❯ optirun -vv glxspheres                                                                                ⏎

[   82.190835] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf

[   82.191039] [INFO]Configured driver: nvidia

[   82.191130] [DEBUG]optirun version 3.2.1 starting...

[   82.191147] [DEBUG]Active configuration:

[   82.191158] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf

[   82.191166] [DEBUG] X display: :8

[   82.191174] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/opengl/nvidia/lib:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib

[   82.191181] [DEBUG] Socket path: /var/run/bumblebee.socket

[   82.191196] [DEBUG] Accel/display bridge: auto

[   82.191210] [DEBUG] VGL Compression: proxy

[   82.191222] [DEBUG] VGLrun extra options: 

[   82.191234] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus

[   82.191260] [DEBUG]Using auto-detected bridge virtualgl

[   82.486934] [INFO]Response: No - error: X did not start properly

[   82.486977] [ERROR]Cannot access secondary GPU - error: X did not start properly

[   82.487008] [DEBUG]Socket closed.

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

[   82.487054] [DEBUG]Killing all remaining processes.
```

here's my Xorg.8.log:

```
~ ❯❯❯ cat /var/log/Xorg.8.log

X.Org X Server 1.14.3

Release Date: 2013-09-12

[   169.143] X Protocol Version 11, Revision 0

[   169.143] Build Operating System: Linux 3.9.11-ckcustom x86_64 Gentoo

[   169.143] Current Operating System: Linux Hades 3.9.11-ck-custom #6 SMP PREEMPT Sun Nov 3 17:10:50 CET 2013 x86_64

[   169.143] Kernel command line: BOOT_IMAGE=/kernel-3.9.11-gentoo root=/dev/sda7 ro i915.i915_enable_rc6=1 i915.semaphores=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 pcie_aspm=force intel_iommu=off

[   169.143] Build Date: 02 November 2013  09:38:15PM

[   169.143] 

[   169.143] Current version of pixman: 0.30.2

[   169.143]    Before reporting problems, check http://wiki.x.org

   to make sure that you have the latest version.

[   169.143] Markers: (--) probed, (**) from config file, (==) default setting,

   (++) from command line, (!!) notice, (II) informational,

   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

[   169.144] (==) Log file: "/var/log/Xorg.8.log", Time: Mon Nov  4 15:03:06 2013

[   169.144] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"

[   169.144] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"

[   169.144] (==) Using system config directory "/usr/share/X11/xorg.conf.d"

[   169.144] (==) ServerLayout "Layout0"

[   169.144] (==) No screen section available. Using defaults.

[   169.144] (**) |-->Screen "Default Screen Section" (0)

[   169.144] (**) |   |-->Monitor "<default monitor>"

[   169.145] (==) No device specified for screen "Default Screen Section".

   Using the first device section listed.

[   169.145] (**) |   |-->Device "DiscreteNvidia"

[   169.145] (==) No monitor specified for screen "Default Screen Section".

   Using a default monitor configuration.

[   169.145] (**) Option "AutoAddDevices" "true"

[   169.145] (**) Option "AutoAddGPU" "false"

[   169.145] (**) Automatically adding devices

[   169.145] (==) Automatically enabling devices

[   169.145] (**) Not automatically adding GPU devices

[   169.145] (WW) The directory "/usr/share/fonts/TTF/" does not exist.

[   169.145]    Entry deleted from font path.

[   169.145] (WW) The directory "/usr/share/fonts/OTF/" does not exist.

[   169.145]    Entry deleted from font path.

[   169.145] (WW) The directory "/usr/share/fonts/Type1/" does not exist.

[   169.145]    Entry deleted from font path.

[   169.145] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".

[   169.145]    Entry deleted from font path.

[   169.145]    (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").

[   169.145] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".

[   169.145]    Entry deleted from font path.

[   169.145]    (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").

[   169.145] (==) FontPath set to:

   /usr/share/fonts/misc/

[   169.145] (++) ModulePath set to "/usr/lib64/opengl/nvidia/lib,/usr/lib64/opengl/nvidia/extensions,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules"

[   169.145] (II) The server relies on udev to provide the list of input devices.

   If no devices become available, reconfigure udev or disable AutoAddDevices.

[   169.145] (II) Loader magic: 0x7f6be0

[   169.145] (II) Module ABI versions:

[   169.145]    X.Org ANSI C Emulation: 0.4

[   169.145]    X.Org Video Driver: 14.1

[   169.145]    X.Org XInput driver : 19.1

[   169.145]    X.Org Server Extension : 7.0

[   169.146] (II) xfree86: Adding drm device (/dev/dri/card1)

[   169.146] (II) xfree86: Adding drm device (/dev/dri/card0)

[   169.146] setversion 1.4 failed

[   169.149] (--) PCI:*(0:1:0:0) 10de:0df5:1028:04b6 rev 161, Mem @ 0xf0000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/524288

[   169.149] Initializing built-in extension Generic Event Extension

[   169.149] Initializing built-in extension SHAPE

[   169.150] Initializing built-in extension MIT-SHM

[   169.150] Initializing built-in extension XInputExtension

[   169.150] Initializing built-in extension XTEST

[   169.150] Initializing built-in extension BIG-REQUESTS

[   169.150] Initializing built-in extension SYNC

[   169.150] Initializing built-in extension XKEYBOARD

[   169.150] Initializing built-in extension XC-MISC

[   169.150] Initializing built-in extension XINERAMA

[   169.150] Initializing built-in extension XFIXES

[   169.150] Initializing built-in extension RENDER

[   169.150] Initializing built-in extension RANDR

[   169.150] Initializing built-in extension COMPOSITE

[   169.150] Initializing built-in extension DAMAGE

[   169.150] Initializing built-in extension MIT-SCREEN-SAVER

[   169.150] Initializing built-in extension DOUBLE-BUFFER

[   169.150] Initializing built-in extension RECORD

[   169.150] Initializing built-in extension DPMS

[   169.150] Initializing built-in extension X-Resource

[   169.150] Initializing built-in extension XVideo

[   169.150] Initializing built-in extension XVideo-MotionCompensation

[   169.150] Initializing built-in extension XFree86-VidModeExtension

[   169.150] Initializing built-in extension XFree86-DRI

[   169.150] Initializing built-in extension DRI2

[   169.150] (II) LoadModule: "glx"

[   169.150] (II) Loading /usr/lib64/opengl/nvidia/extensions/libglx.so

[   169.166] (II) Module glx: vendor="NVIDIA Corporation"

[   169.166]    compiled for 4.0.2, module version = 1.0.0

[   169.166]    Module class: X.Org Server Extension

[   169.166] (II) NVIDIA GLX Module  325.15  Wed Jul 31 18:12:00 PDT 2013

[   169.166] Loading extension GLX

[   169.166] (II) LoadModule: "nvidia"

[   169.166] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so

[   169.166] (II) Module nvidia: vendor="NVIDIA Corporation"

[   169.166]    compiled for 4.0.2, module version = 1.0.0

[   169.166]    Module class: X.Org Video Driver

[   169.166] (II) NVIDIA dlloader X Driver  325.15  Wed Jul 31 17:50:57 PDT 2013

[   169.166] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs

[   169.166] (--) using VT number 8

[   169.166] (II) Loading sub module "fb"

[   169.166] (II) LoadModule: "fb"

[   169.166] (II) Loading /usr/lib64/xorg/modules/libfb.so

[   169.167] (II) Module fb: vendor="X.Org Foundation"

[   169.167]    compiled for 1.14.3, module version = 1.0.0

[   169.167]    ABI class: X.Org ANSI C Emulation, version 0.4

[   169.167] (WW) Unresolved symbol: fbGetGCPrivateKey

[   169.167] (II) Loading sub module "wfb"

[   169.167] (II) LoadModule: "wfb"

[   169.167] (II) Loading /usr/lib64/xorg/modules/libwfb.so

[   169.167] (II) Module wfb: vendor="X.Org Foundation"

[   169.167]    compiled for 1.14.3, module version = 1.0.0

[   169.167]    ABI class: X.Org ANSI C Emulation, version 0.4

[   169.167] (II) Loading sub module "shadow"

[   169.167] (II) LoadModule: "shadow"

[   169.167] (II) Loading /usr/lib64/xorg/modules/libshadow.so

[   169.167] (II) Module shadow: vendor="X.Org Foundation"

[   169.167]    compiled for 1.14.3, module version = 1.1.0

[   169.167]    ABI class: X.Org ANSI C Emulation, version 0.4

[   169.167] (II) Loading sub module "ramdac"

[   169.167] (II) LoadModule: "ramdac"

[   169.167] (II) Module "ramdac" already built-in

[   169.167] (II) NVIDIA(0): Creating default Display subsection in Screen section

   "Default Screen Section" for depth/fbbpp 24/32

[   169.167] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32

[   169.167] (==) NVIDIA(0): RGB weight 888

[   169.167] (==) NVIDIA(0): Default visual is TrueColor

[   169.167] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)

[   169.167] (**) NVIDIA(0): Option "NoLogo" "true"

[   169.167] (**) NVIDIA(0): Option "ProbeAllGpus" "false"

[   169.167] (**) NVIDIA(0): Option "UseEDID" "false"

[   169.167] (**) NVIDIA(0): Option "UseDisplayDevice" "none"

[   169.167] (**) NVIDIA(0): Enabling 2D acceleration

[   169.167] (**) NVIDIA(0): Ignoring EDIDs

[   169.167] (**) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout

[   169.167] (**) NVIDIA(0):     mode

[   169.328] (II) NVIDIA(GPU-0): Found DRM driver nvidia-drm (20130102)

[   169.330] (II) NVIDIA(0): NVIDIA GPU GeForce GT 525M (GF108) at PCI:1:0:0 (GPU-0)

[   169.330] (--) NVIDIA(0): Memory: 1048576 kBytes

[   169.330] (--) NVIDIA(0): VideoBIOS: 70.08.53.00.04

[   169.330] (II) NVIDIA(0): Detected PCI Express Link width: 16X

[   169.330] (--) NVIDIA(0): Valid display device(s) on GeForce GT 525M at PCI:1:0:0

[   169.330] (--) NVIDIA(0):     none

[   169.330] (II) NVIDIA(0): Validated MetaModes:

[   169.330] (II) NVIDIA(0):     "nvidia-auto-select"

[   169.330] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480

[   169.330] (WW) NVIDIA(0): Unable to get display device for DPI computation.

[   169.330] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default

[   169.330] (--) Depth 24 pixmap format is 32 bpp

[   169.330] (II) NVIDIA: Using 3072.00 MB of virtual memory for indirect memory

[   169.330] (II) NVIDIA:     access.

[   169.433] (II) NVIDIA(0): Setting mode "nvidia-auto-select"

[   169.440] Loading extension NV-GLX
```

(as you can see the drivers and stuff are loaded correctly)

le bumblebee.conf:

```
~ ❯❯❯ 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=

# Directory with a dummy config file to pass as a -configdir to secondary X

XorgConfDir=/etc/bumblebee/xorg.conf.d/

## Client options. Will take effect on the next optirun executed.

[optirun]

# Acceleration/ rendering bridge, possible values are auto, virtualgl and

# primus.

Bridge=auto

# The method used for VirtualGL to transport frames between X servers.

# Possible values are proxy, jpeg, rgb, xv and yuv.

VGLTransport=proxy

# List of paths which are searched for the primus libGL.so.1 when using

# the primus bridge

PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus

# 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, use at your own risk

#             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=nvidia

PMMethod=auto

# colon-separated path to the nvidia libraries

LibraryPath=/usr/lib64/opengl/nvidia/lib:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib

# comma-separated path of the directory containing nvidia_drv.so and the

# default Xorg modules path

XorgModulePath=/usr/lib64/opengl/nvidia/lib,/usr/lib64/opengl/nvidia/extensions,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules

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
```

PLEASE tell me if you need any other information!

I also really hope someone is willing to help me :/

Thanks in advance!Last edited by pepi55 on Mon Nov 18, 2013 11:55 pm; edited 1 time in total

----------

## eyoung100

Your Error:

```
[   169.328] (II) NVIDIA(GPU-0): Found DRM driver nvidia-drm (20130102) 

[   169.330] (II) NVIDIA(0): NVIDIA GPU GeForce GT 525M (GF108) at PCI:1:0:0 (GPU-0) 

[   169.330] (--) NVIDIA(0): Memory: 1048576 kBytes 

[   169.330] (--) NVIDIA(0): VideoBIOS: 70.08.53.00.04 

[   169.330] (II) NVIDIA(0): Detected PCI Express Link width: 16X 

[   169.330] (--) NVIDIA(0): Valid display device(s) on GeForce GT 525M at PCI:1:0:0 

[   169.330] (--) NVIDIA(0):     none 

Also:

# 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= 
```

A few questions: Is bumblebeed in the default run level  :Question: What driver are you trying to use, NVIDIA or nouveau  :Question:  Have you emerged x11-drivers/nvidia-drivers, or built the nouveau driver  :Question:  

----------

## pepi55

first of all, thank you very much for the quick reply!!  :Very Happy: 

then:

```
~ ❯❯❯ sudo rc-update | grep bumb                                                                            ⏎

Password: 

            bumblebee |      default
```

then

```
~ ❯❯❯ eix nvidia && eix nouveau

* app-laptop/nvidiabl

     Available versions:  ~0.80 0.81^t ~0.83^t {KERNEL="linux"}

     Homepage:            https://github.com/guillaumezin/nvidiabl

     Description:         Linux driver for setting the backlight brightness on laptops using NVIDIA GPU

* dev-util/nvidia-cuda-sdk

     Available versions:  2.02.0807.1535^b ~4.2.9-r2 ~5.0.35-r1 ~5.5.22^t {+cuda debug +doc emulation +examples opencl}

     Homepage:            http://developer.nvidia.com/cuda

     Description:         NVIDIA CUDA Software Development Kit

* dev-util/nvidia-cuda-toolkit

     Available versions:  4.2.9-r2 ~4.2.9-r3(0/4.2.9) ~5.0.35-r2 ~5.0.35-r3 ~5.0.35-r4(0/5.0.35) ~5.5.22(0/5.5.22) {debugger doc eclipse profiler}

     Homepage:            http://developer.nvidia.com/cuda

     Description:         NVIDIA CUDA Toolkit (compiler and friends)

* media-gfx/nvidia-cg-toolkit

     Available versions:  2.1.0012^s ~2.1.0017^s 2.1.0017-r1^s ~3.1.0013^s ~3.1.0013-r1^s ~3.1.0013-r2^s {doc examples multilib}

     Homepage:            http://developer.nvidia.com/object/cg_toolkit.html

     Description:         NVIDIA's C graphics compiler toolkit

* media-gfx/nvidia-texture-tools

     Available versions:  2.0.8-r1 2.0.8-r2 {cg cuda glew glut openexr}

     Homepage:            http://developer.nvidia.com/object/texture_tools.html

     Description:         A set of cuda-enabled texture tools and compressors

* media-video/nvidia-settings

     Available versions:  ~173.14.37 304.60 ~313.26 ~319.12 ~319.23 ~319.32 ~319.60 ~325.15 ~331.17 {examples}

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA Linux X11 Settings Utility

[D] x11-drivers/nvidia-drivers

     Available versions:  96.43.23^msd 173.14.38^msd 304.108^msd 310.51^msd 313.30^msd 319.49^msd 319.60^msd ~325.08^msd ~325.15^msd ~331.13^msd ~331.17^msd {+X acpi custom-cflags gtk multilib pax_kernel (+)tools KERNEL="FreeBSD linux"}

     Installed versions:  325.15^msd(12:28:15 PM 11/04/2013)(X acpi multilib tools -pax_kernel KERNEL="linux -FreeBSD")

     Homepage:            http://www.nvidia.com/

     Description:         NVIDIA X11 driver and GLX libraries

Found 7 matches.

* x11-base/nouveau-drm

     Available versions:  ~20100520 ~20100811 ~20101107 ~20110526 ~20110602 ~20110801 ~20110820 ~20111101 ~20120322 ~20120605 ~20120728 ~20121015 {KERNEL="linux"}

     Homepage:            http://nouveau.freedesktop.org/

     Description:         Nouveau DRM Kernel Modules for X11

* x11-drivers/xf86-video-nouveau

     Available versions:  0.0.16_pre20120322 1.0.4 ~1.0.6 ~1.0.7 ~1.0.8 1.0.9

     Homepage:            http://nouveau.freedesktop.org/

     Description:         Accelerated Open Source driver for nVidia cards

Found 2 matches.

```

EDIT: forgot to mention that i removed the driver section in the conf on purpose in an desperate attempt   :Crying or Very sad: 

----------

## eyoung100

OK, post the output of:

```
modprobe -r nvidia 

/etc/init.d/bumblebee restart
```

----------

## pepi55

trying now...

```
/h/pepi # ❯❯❯ modprobe -r nvidia

/h/pepi # ❯❯❯ /etc/init.d/bumblebee restart

 * Stopping BumbleBee Daemon ...                                                                        [ ok ]

 * Starting BumbleBee Daemon ...                                                                        [ ok ]
```

and then? probably run glxspheres:

```
/h/pepi # ❯❯❯ optirun -vv glxspheres                                                                        ⏎

[ 7660.956673] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf

[ 7660.956969] [INFO]Configured driver: nvidia

[ 7660.957165] [DEBUG]optirun version 3.2.1 starting...

[ 7660.957192] [DEBUG]Active configuration:

[ 7660.957211] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf

[ 7660.957230] [DEBUG] X display: :8

[ 7660.957256] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/opengl/nvidia/lib:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib

[ 7660.957287] [DEBUG] Socket path: /var/run/bumblebee.socket

[ 7660.957298] [DEBUG] Accel/display bridge: auto

[ 7660.957309] [DEBUG] VGL Compression: proxy

[ 7660.957319] [DEBUG] VGLrun extra options: 

[ 7660.957329] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus

[ 7660.957365] [DEBUG]Using auto-detected bridge virtualgl

[ 7661.229105] [INFO]Response: No - error: X did not start properly

[ 7661.229140] [ERROR]Cannot access secondary GPU - error: X did not start properly

[ 7661.229156] [DEBUG]Socket closed.

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

[ 7661.229197] [DEBUG]Killing all remaining processes.
```

I had my hopes up for something that would appear to be black magic T-T

ty for the effort though!  :Very Happy:  appreciate it very much!

----------

## eyoung100

```
lsmod | grep nvidia

modprobe nvidia

/etc/init.d/bumblebee restart
```

----------

## pepi55

hmm this is weird...

```
~ ❯❯❯ lsmod | grep nvidia

~ ❯❯❯ sudo modprobe nvidia                                                                                  ⏎

Password: 

modprobe: ERROR: could not insert 'nvidia': No such device

~ ❯❯❯ su                                                                                                    ⏎

Password: 

/h/pepi # ❯❯❯ modprobe nvidia

/h/pepi # ❯❯❯ /etc/init.d/bumblebee restart

 * Stopping BumbleBee Daemon ...                                                                        [ ok ]

 * Starting BumbleBee Daemon ...                                                                        [ ok ]

/h/pepi # ❯❯❯ optirun glxspheres

[  176.387745] [ERROR]Cannot access secondary GPU - error: X did not start properly

[  176.387810] [ERROR]Aborting because fallback start is disabled.
```

----------

## eyoung100

Is your user in the video group  :Question: 

Set the video driver to intel.

```
/etc/init.d/xdm stop

nano -w /etc/conf.d/xdm

DISPLAYMANAGER="xdm"

emerge twm xterm xclock

startx
```

Does this give you 3 Terminals and a clock  :Question: 

Ctl + Alt + Terminal Number, then Ctl + C to exit

----------

## pepi55

```
/h/pepi # ❯❯❯ groups pepi

audio cdrom video usb users portage games sudo [b]bumblebee[/b] wheel
```

how do i set the driver to intel?? :s

and yes i do get all the terminals and standard xdm but it reports the same problem :/

though i didnt try it while stopping kde so i will try that now

----------

## eyoung100

You do realize you have to VIDEO_CARDS right  :Question: 

 *eyoung100 wrote:*   

>  *NeddySeagoon wrote:*   The Intel one is a complete graphics system. It can write new images in the pixel buffer and read the pixel buffer out to the dispaly. 
> 
> The nVidia graphics can only write new images in the pixel buffer. It has no way to get the pixel buffer onto the screen. 
> 
> This means that for low power/performce you use the Intel system. 
> ...

 

See No Device Detected While startx

----------

## pepi55

Okay im posting this through xdm

Am i supposed to try optirun in xdm?? since xdm stop command stopped bumblebee service too and i get

```
[ 3533.187076 ] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.

[ 3533.187151 ] [ERROR]Could not connect to bumblebee daemon - is it running?
```

When i try 

```
/etc/init.d/bumblebee start
```

 It outputs some trippy stuff about me not having xdm even though im in it right now?????

(i cant copy paste in xdm so:...) it says something about:

ERROR your xdm value is invalid

no xdm executable found on your system

ERROR: please set your display manager variable in /etc/conf.d/xdm

which btw is: 

```
DISPLAYMANAGER="xdm"
```

then start-stop daemon: /usr/bin/xdm does not exist

error could not start the display manager

then it says starting VirtualGL....  and hangs there

what is happening???? :S :S

----------

## pepi55

Hmm thanks but im not sure i quite get it...

I have disabled all framebuffer devices (forgot to mention i have a custom ck-sources kernel   :Embarassed:  )

i DID follow all the setups for the nvidia drivers and i think the driver itself is working just fine since xorg doesnt complain about it?

i mean i have seen other posts where the driver isnt loading or incompatible and bumblebee says: cannot load module nvidia or something similar... so i do doubt that its the nvidia drivers unless you really think i should recompile the kernel again and the drivers afterwards. (which i did a couple of times to be sure that i havent forgotten to recompile the drivers after the kernel make INCLUDING bumblebee itself, virtualgl, nvidia aaaaaaaaaaaaaaaaaaandd.............. i dont think i have an intel driver............   :Embarassed:   :Embarassed:   :Embarassed:  )

if that is the problem then im terribly terribly sorry for waisting your time :S

EDIT: My bad:

```
VIDEO_CARDS="intel nvidia"
```

Last edited by pepi55 on Mon Nov 04, 2013 11:48 pm; edited 1 time in total

----------

## eyoung100

Read what I quoted again as you cannot use the NVIDIA driver by itself...

----------

## pepi55

okay im sorry for being so bad at this >.< 

so if i understand it right.... i cannot use only the nvidia card to be able to render things on the screen???? :O

I have to use the intel card too and this is where bumblebee comes in, correct?

in that case do i have to do anything special to enable the intel card??

```
~ ❯❯❯ lsmod

Module                  Size  Used by

kcopy                   5116  0 

bbswitch                4512  0 

uvcvideo               70605  0 

videobuf2_vmalloc       2896  1 uvcvideo

videobuf2_memops        1831  1 videobuf2_vmalloc

videobuf2_core         26985  1 uvcvideo

videodev               99212  2 uvcvideo,videobuf2_core

r8169                  55806  0
```

```
Device Drivers

     --> Graphics support

          ---> < > Nouveau (nVidia) cards

              <*> Intel 8xx/9xx/G3x/G4x/HD Graphics

                        [*]   Enable modesetting on intel by default
```

```
/u/s/linux-3.9.11-ck ❯❯❯ sudo lspci | grep VGA

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev ff)
```

----------

## pepi55

the video card should be this one:

2nd Generation Intel® Core™ Processors with Intel® HD Graphics 3000/2000

and the kernel driver is also for intel HD's so i guess it works?? 

so what now? 

im sorry im just at a complete loss here >.<

----------

## pepi55

Ok so still no luck :/ 

i tried some of the solutions from the other thread but none seem to work.

also when i 

```
eselect opengl set *NVIDIA*
```

 and reboot my kde effects are dead. it says it cannot load them and the screen "0:" is unavailable, so that might be my problem??

thing is, i cannot seem to find a config that says something like this anywhere :s

so it might be a problem with the nvidia driver afterall...

oh and the other eselect opengl option is xorg-x11

my xorg.1.log has some weird stuff:

```
[   135.795] (==) Matched intel as autoconfigured driver 0

[   135.795] (==) Matched nouveau as autoconfigured driver 1

[   135.795] (==) Matched nv as autoconfigured driver 2

[   135.795] (==) Matched intel as autoconfigured driver 3

[   135.795] (==) Matched vesa as autoconfigured driver 4

[   135.795] (==) Matched modesetting as autoconfigured driver 5

[   135.795] (==) Matched fbdev as autoconfigured driver 6

[   135.795] (==) Assigned the driver to the xf86ConfigLayout

[   135.795] (II) LoadModule: "intel"

[   135.795] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so

[   135.795] (II) Module intel: vendor="X.Org Foundation"

[   135.795]    compiled for 1.14.3, module version = 2.21.15

[   135.795]    Module class: X.Org Video Driver

[   135.795]    ABI class: X.Org Video Driver, version 14.1

[   135.795] (II) LoadModule: "nouveau"

[   135.795] (WW) Warning, couldn't open module nouveau

[   135.795] (II) UnloadModule: "nouveau"

[   135.795] (II) Unloading nouveau

[   135.795] (EE) Failed to load module "nouveau" (module does not exist, 0)

[   135.795] (II) LoadModule: "nv"

[   135.796] (WW) Warning, couldn't open module nv

[   135.796] (II) UnloadModule: "nv"

[   135.796] (II) Unloading nv

[   135.796] (EE) Failed to load module "nv" (module does not exist, 0)

[   135.796] (II) LoadModule: "vesa"

[   135.796] (WW) Warning, couldn't open module vesa

[   135.796] (II) UnloadModule: "vesa"

[   135.796] (II) Unloading vesa

[   135.796] (EE) Failed to load module "vesa" (module does not exist, 0)

[   135.796] (II) LoadModule: "modesetting"

[   135.796] (WW) Warning, couldn't open module modesetting

[   135.796] (II) UnloadModule: "modesetting"

[   135.796] (II) Unloading modesetting

[   135.796] (EE) Failed to load module "modesetting" (module does not exist, 0)

[   135.796] (II) LoadModule: "fbdev"

[   135.796] (WW) Warning, couldn't open module fbdev

[   135.796] (II) UnloadModule: "fbdev"

[   135.796] (II) Unloading fbdev

[   135.796] (EE) Failed to load module "fbdev" (module does not exist, 0)

[   135.796] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:

        i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,

        915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,

        Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,

        GM45, 4 Series, G45/G43, Q45/Q43, G41, B43, HD Graphics,

        HD Graphics 2000, HD Graphics 3000, HD Graphics 2500,

        HD Graphics 4000, HD Graphics P4000, HD Graphics 4600,

        HD Graphics 5000, HD Graphics P4600/P4700, Iris(TM) Graphics 5100,

        HD Graphics 4400, HD Graphics 4200, Iris(TM) Pro Graphics 5200

[   135.796] (--) using VT number 8
```

a dmesg after optirun:

```
[ 1402.936627] [drm] Module unloaded

[ 1402.937578] bbswitch: disabling discrete graphics

[ 1402.948692] pci 0000:01:00.0: Refused to change power state, currently in D0

[ 1402.988837] pci 0000:01:00.0: power state changed by ACPI to D3cold

[ 1423.130965] bbswitch: enabling discrete graphics

[ 1424.043288] pci 0000:01:00.0: power state changed by ACPI to D0

[ 1424.052782] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none

[ 1424.052950] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1

[ 1424.052957] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  325.15  Wed Jul 31 18:50:56 PDT 2013

[ 1424.056761] nvidia 0000:01:00.0: irq 54 for MSI/MSI-X
```

----------

## pepi55

i changed AutoAddDevices to true (according to here many people are saying it fixed it for them)

and VirtualDisplay=:0 (i think the default display for xorg = 0? idk why it is automatically set to  :Cool: 

and now i get ANOTHER incomplete message -.-

```
~ ❯❯❯ optirun -vv glxspheres

[  170.069534] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf

[  170.069809] [INFO]Configured driver: nvidia

[  170.069928] [DEBUG]optirun version 3.2.1 starting...

[  170.069957] [DEBUG]Active configuration:

[  170.069977] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf

[  170.069998] [DEBUG] X display: :0

[  170.070020] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/opengl/nvidia/lib:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib

[  170.070036] [DEBUG] Socket path: /var/run/bumblebee.socket

[  170.070056] [DEBUG] Accel/display bridge: auto

[  170.070071] [DEBUG] VGL Compression: proxy

[  170.070085] [DEBUG] VGLrun extra options: 

[  170.070096] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus

[  170.070136] [DEBUG]Using auto-detected bridge virtualgl

[  170.072262] [INFO]Response: No - error: [XORG] (EE) 

[  170.072291] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) 

[  170.072313] [DEBUG]Socket closed.

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

[  170.072359] [DEBUG]Killing all remaining processes.
```

why am i getting such incomplete messages from optirun?? :S

EDIT: I found this:

```
GRUB_CMDLINE_LINUX_DEFAULT="i915.i915_enable_rc6=1 i915.semaphores=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 pcie_aspm=force intel_iommu=off"
```

could this in any way interfere with anything??

----------

## eyoung100

Remove bumblebee from the default runlevel, and set intel as the device driver in xorg.conf

```
rc-update del bumblebee default

nano -w /etc/X11/xorg.conf <-- change driver to intel, Save

rc-update del xdm default

nano -w /etc/conf.d/xdm

Set DISPLAYMANAGER TO xdm, Save

emerge twm xterm xclock

startx
```

Does this give you three terms and a clock   :Question: 

----------

## pepi55

yes it gives me 3 terms and a clock but i dont have a xorg.conf??? 

never created one and i honestly dont know how so i just went ahead with the xorg.conf wiki:

created /etc/X11/xorg.conf with these contents:

```
Section "Device"

     Identifier   "INTEL_CARD"

     Driver       "intel"

EndSection
```

I think this is what i am supposed to do??

----------

## eyoung100

Delete what you created, then run:

```
XOrg -configure
```

as Root.

then:

```
nano -w /root/xorg.conf.new

Change the Driver in the Driver Section to intel, Save

mv -v /root/xorg.conf.new /etc/X11/xorg.conf

startx
```

Still have 3 Terms and a clock  :Question: 

----------

## pepi55

Yepp all the terms and clocks are still there... 

EDIT:: I can disable the nvidia card completely using bbswitch and i have done that (confirmed because the laptop fan stopped working entirely)

EDIT2: apearently bbswitch does not work  :Sad: 

or at least when i tried it again now the module gave me trouble (said it was in use) and then suddenly i was able to unload it after which i echoed OFF >> /proc/acpi/bbswitch and it was off but my fan kept spinning and powertop reported wattage of 25+ (i HAVE to unload the nvidia module before echo'ing because otherwise it won't change from "ON" to "OFF" 

i rebooted and then tried the same thing now it worked flawlessly (no fan spinning and have 7 hrs remaining again...)Last edited by pepi55 on Tue Nov 05, 2013 3:23 pm; edited 1 time in total

----------

## eyoung100

Dont worry about bumble bee yet.  Save that xorg.conf to a usb device first.  This is now your baseline configuration.

Bumblebee needed intel to work before bumblebee could work properly.

DO NOT ADD KDE etc until after you configure bumblebee properly. Use startx as the testing tool which means DO NOT add xdm to the default runlevel.  Start by:

```
emerge nvidia-drivers

nano -w /etc/bumblebee/bumblebee.conf 

Set these values to what I have them on:

VirtualDisplay=:8 

KeepUnusedXServer=false 

ServerGroup=bumblebee 

TurnCardOffAtExit=true

NoEcoModeOverride=false

Driver=nvidia

XorgConfDir=/etc/bumblebee/xorg.conf.d/

Bridge=auto  

VGLTransport=proxy 

AllowFallbackToIGC=false 

KernelDriver=

PMMethod=auto

LibraryPath=/usr/lib64/opengl/nvidia/lib:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib

XorgModulePath=/usr/lib64/opengl/nvidia/lib,/usr/lib64/opengl/nvidia/extensions,/usr/lib64/xorg/modules/drivers,/usr/lib64/xorg/modules

XorgConfFile=/etc/bumblebee/xorg.conf.nvidia 

```

----------

## pepi55

okay so the only difference between your settings and mine were that i had an extra line which i commented:

```
PrimusLibraryPath
```

and i had my kernel driver set to nvidia

i havent tried optirun because bumblebee daemon isnt started

----------

## eyoung100

now test bubmblebee

```
/etc/init.d/bumblebee start
```

.

Post your XOrg.0.Log, after trying optirun.  If everything works you should have no errors in optirun and see the three xterms and clock in the crummy twm.  If that's what you see add bumblebee back into a runlevel with:

```
rc-update add bumblebee default
```

----------

## pepi55

/etc/init.d/bumblebee start: (as root)

```
ERROR: Your XDM value is invalid.

     No xdm executable could be found on your system.

ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,

     or install x11-apps/xdm package

  *  Setting up xdm ...

  *  start-stop-daemon: /usr/bin/xdm does not exist

  *  ERROR: could not start the Display Manager

  *  Starting VirtualGL ...

xauth:     file does not exist
```

cat /etc/conf.d/xdm:

```
CHECKVT=7

DISPLAYMANAGER="xdm"
```

emerging xdm now...

EDIT: after xdm emerge:

/etc/init.d/bumblebee start

```
  *  Starting VirtualGL ...

xauth:     file does not exist
```

and it still hangs there....

startx on alt+f2 and then optirun returns "could not connect to daemon - is it running?"

then /etc/init.d/bumblebee start: "WARNING: bumblebee already starting"

then closing "alt+f1" bumblebee and trying start bumblebee again from tty2: "starting virtualGL ... xauth doesnt exist" 

and hangs there

no xorg.0.log because it fails even to start so i dont think there is much left there (besides im still unable to copy/paste in xdm :/)Last edited by pepi55 on Tue Nov 05, 2013 6:32 pm; edited 2 times in total

----------

## eyoung100

xdm should start twm, once it's emerged.  Once this works feel free to change it to whatever it was before(kdm gdm slim etc).  I took out a layer of complexity by using twm and startx

----------

## pepi55

any idea why bumblebee might spit those errors??? :S 

ive double checked paths and configurations with the configurations you sent but bumblebee wont start :/ it just hangs there

----------

## eyoung100

Hangs where  :Question:    We may need to switch displaymanagers

----------

## pepi55

it hung at xauth i edited my last post on the previous page for more details.

now when i start kdm manager and start bumblebee no xauth errors are reported and bumblebee starts succesfully

BUT!! optirun still doesnt work -.-

this is so strange... i might even try to install on an external HD just to check if bumblebee will work on a fresh install or its really me who does something wrong

----------

## eyoung100

 *pepi55 wrote:*   

> it hung at xauth i edited my last post on the previous page for more details.
> 
> now when i start kdm manager and start bumblebee no xauth errors are reported and bumblebee starts succesfully
> 
> BUT!! optirun still doesnt work -.-
> ...

 

Don't do that, the fact that bumble bee starts means that both cards are now working...  See the Bumblebee FAQ

----------

## pepi55

I simply dont know what else i can do.. i have checked the wiki again removed anything obselete (any power scripts, grub ccommand lines etc) but nothing seems to work.

It does work though as you said when i boot the discrete card is OFF but after i run optirun once then its stuck at ON and wont change unless i unload the driver.

```
/h/pepi # ❯❯❯ cat /proc/acpi/bbswitch

0000:01:00.0 ON

/h/pepi # ❯❯❯ echo OFF >> /proc/acpi/bbswitch

/h/pepi # ❯❯❯ cat /proc/acpi/bbswitch

0000:01:00.0 ON

/h/pepi # ❯❯❯ modprobe -r nvidia

/h/pepi # ❯❯❯ echo OFF >> /proc/acpi/bbswitch

/h/pepi # ❯❯❯ cat /proc/acpi/bbswitch

0000:01:00.0 OFF
```

and the x did not start correctly error persists

pfffffffffffffff this is soooooooo frustrating   :Confused: 

```
~ ❯❯❯ optirun --no-xorg glxspheres

Polygons in scene: 62464

Visual ID of window: 0x20

Context is Indirect

OpenGL Renderer: Mesa DRI Intel(R) Sandybridge Mobile 

60.945409 frames/sec - 53.958627 Mpixels/sec

59.782076 frames/sec - 52.928659 Mpixels/sec

59.824981 frames/sec - 52.966645 Mpixels/sec
```

whats happening now?? since i didnt start a secondary x it *HAS* to use the intel???? if not, (and its using nvidia) why are the fps so low???

----------

## pepi55

the FAQ did not help me whatsoever sadly... 

ill report some kind of bug on the git page I hope they would be able to diagnose this issue and help me

thanks for the effort though! and if you stumble upon anything please reply i will report if it has helped.

also im going to keep this thread updated if i find anything for future reference and/or if someone else is having the same problem and is desperately trying to find a fix

----------

## eyoung100

You can't use startx and /etc/init.d/xdm together and bumblebee uses xdm

----------

## pepi55

Nobody on the git page responds -.- 

im giving up hope

seems like ill have to do without using my discrete card until i can find some external hard drive on which i can do a clean install to see if it works then

----------

## pepi55

UPDATE!!!

I reinstalled a minimal desktop gentoo with xfce4 and now optirun works fine.  :Very Happy: 

I guess i had done something with the config :/

well i guess well never know what it was... (i think it might be a bumblebee overlay)

thanks for all the help and a last thing.... how do i mark this as solved??   :Embarassed: 

----------

## eyoung100

edit the title of the first post you made... now that xfce works replace it w/ another DE.

----------

