# [SOLVED] Optimus and Nvidia

## Arthanis

I found this post (https://forums.gentoo.org/viewtopic-t-959568.html) and posted my doubt, but it seems dead, so forgive me if it is a double post:

Well, I just bought a laptop with optimus technology, and I tried bumblebee and didn`t like it. I read around and I understand that it is now possible to use the nvidia gpu without bumblebee even though my laptop lacks a hardware muxer to disable the intel.

So and followed all the instructions here but couldn' t get it to work. I uninstalled xdm and bumblebee to make things simplier.

These are my adapters:

```

lspci -v |grep VGA

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA controller])

lspci -v |grep 3D 

01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)

```

Here is my pci devices and kernel modules being used:

```

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)

   Subsystem: CLEVO/KAPOK Computer Device 2300

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)

   Kernel driver in use: pcieport

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: i915

   Kernel modules: i915

00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: xhci_hcd

00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: mei_me

   Kernel modules: mei_me

00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: ehci-pci

00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: snd_hda_intel

   Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)

   Kernel driver in use: pcieport

00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)

   Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)

   Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: ehci-pci

00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: lpc_ich

00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)

   Subsystem: CLEVO/KAPOK Computer Device 2300

01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: nvidia

   Kernel modules: nvidia

03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)

   Subsystem: Intel Corporation Centrino Advanced-N 6235 AGN

   Kernel driver in use: iwlwifi

   Kernel modules: iwlwifi

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5287 (rev 01)

   Subsystem: CLEVO/KAPOK Computer Device 2300

04:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)

   Subsystem: CLEVO/KAPOK Computer Device 2300

   Kernel driver in use: r8169

```

Here is my full dmesg on boot:  http://pastebin.com/T1STepGj

Nvidia seems to load fine:

```

g1310max linux # dmesg |grep -i nvidia

[    2.140090] nvidia: module license 'NVIDIA' taints kernel.

[    2.171864] Modules linked in: nvidia(PO+) iwldvm snd_hda_codec_via i915(+) snd_hda_codec_generic joydev coretemp iwlwifi snd_hda_intel snd_hda_codec mei_me drm_kms_helper mei snd_hwdep

[    2.172645] CPU: 2 PID: 1343 Comm: nvidia-smi Tainted: P          IO 3.14.14-gentoo #26

[    2.175708]  [<ffffffffa07c86e7>] nvidia_open+0x567/0x8f0 [nvidia]

[    2.175868]  [<ffffffffa07d2dcf>] nvidia_frontend_open+0x4f/0xa0 [nvidia]

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

[    4.888746] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  340.24  Wed Jul  2 14:24:20 PDT 2014

```

Although there are some warnings in kernel about intel:

```

g1310max linux # dmesg |grep -i vga

[    0.000000] Console: colour VGA+ 80x25

[    0.148899] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none

[    0.149048] vgaarb: loaded

[    0.149137] vgaarb: bridge control possible 0000:00:02.0

[    2.070477] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem

[    2.205517] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2

```

I don`t know what is it about this timeout warning.

I have enabled intel kernel mode setting with intel_agpgart and intel drivers, here is my complete kernel config:

http://pastebin.com/LvsuqA0T

Relevant kernel config entries:

```

CONFIG_DRM=y

CONFIG_DRM_KMS_HELPER=m

CONFIG_DRM_KMS_FB_HELPER=y

# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set

# CONFIG_DRM_I2C_CH7006 is not set

# CONFIG_DRM_I2C_SIL164 is not set

# CONFIG_DRM_I2C_NXP_TDA998X is not set

# CONFIG_DRM_TDFX is not set

# CONFIG_DRM_R128 is not set

# CONFIG_DRM_RADEON is not set

# CONFIG_DRM_NOUVEAU is not set

CONFIG_DRM_I810=m

CONFIG_DRM_I915=m

CONFIG_DRM_I915_KMS=y

CONFIG_DRM_I915_FBDEV=y

# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set

# CONFIG_DRM_I915_UMS is not set

# CONFIG_DRM_MGA is not set

# CONFIG_DRM_SIS is not set

# CONFIG_DRM_VIA is not set

# CONFIG_DRM_SAVAGE is not set

# CONFIG_DRM_VMWGFX is not set

# CONFIG_DRM_GMA500 is not set

# CONFIG_DRM_UDL is not set

# CONFIG_DRM_AST is not set

# CONFIG_DRM_MGAG200 is not set

# CONFIG_DRM_CIRRUS_QEMU is not set

# CONFIG_DRM_QXL is not set

# CONFIG_DRM_BOCHS is not set

```

I also have x11-drivers/xf86-video-intel,  xf86-video-modesetting, nvidia-drivers and x11-base/xorg-drivers (with VIDEO_CARDS="intel modesetting nvidia") on their latest versions:

```

eix xorg-drivers

[I] x11-base/xorg-drivers

     Available versions:  1.9 1.10 1.11 1.12 1.13 1.14 1.15 ~1.16 {INPUT_DEVICES="acecad aiptek elographics evdev fpit hyperpen joystick keyboard mouse mutouch penmount synaptics tslib vmmouse void wacom" VIDEO_CARDS="apm ark ast chips cirrus dummy epson fbdev fglrx freedreno geode glint i128 i740 impact intel mach64 mga modesetting neomagic newport nouveau nv nvidia omap omapfb qxl r128 radeon radeonsi rendition s3 s3virge savage siliconmotion sis sisusb sunbw2 suncg14 suncg3 suncg6 sunffb sunleo suntcx tdfx tga trident tseng v4l vesa via virtualbox vmware voodoo"}

     Installed versions:  1.15(12:34:58 08/04/14)(INPUT_DEVICES="evdev keyboard mouse synaptics -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -tslib -vmmouse -void -wacom" VIDEO_CARDS="intel modesetting nvidia -apm -ast -chips -cirrus -dummy -epson -fbdev -fglrx -freedreno -geode -glint -i128 -i740 -mach64 -mga -neomagic -nouveau -nv -omap -omapfb -qxl -r128 -radeon -radeonsi -rendition -s3virge -savage -siliconmotion -sisusb -sunbw2 -suncg14 -suncg3 -suncg6 -sunffb -sunleo -suntcx -tdfx -tga -trident -tseng -v4l -vesa -via -virtualbox -vmware -voodoo")

eix -I xf86 

[I] x11-drivers/xf86-video-intel

     Available versions:  ~*2.9.1 2.19.0 2.20.13 2.21.15 ~2.99.903 ~2.99.905-r1 ~2.99.906 ~2.99.907-r1 ~2.99.909 ~2.99.910 ~2.99.911-r1 ~2.99.912 ~2.99.912-r1 ~2.99.914 {debug dri glamor (+)sna +udev uxa xvmc}

     Installed versions:  2.21.15(11:12:21 08/04/14)(dri sna udev -glamor -uxa -xvmc)

     Description:         X.Org driver for Intel cards

[I] x11-drivers/xf86-video-modesetting

     Available versions:  0.8.1 ~0.9.0

     Installed versions:  0.8.1(10:43:55 08/04/14)

     Description:         Unaccelerated generic driver for kernel modesetting

[I] x11-drivers/nvidia-drivers

     Available versions:  96.43.23^msd 173.14.39^msd 304.123^msd 331.89^msd 334.21-r3^msd 337.25^msd 340.24^msd {+X acpi custom-cflags gtk multilib pax_kernel (+)tools uvm KERNEL="FreeBSD linux"}

     Installed versions:  340.24^msd(12:02:08 08/04/14)(X acpi tools -multilib -pax_kernel -uvm KERNEL="linux -FreeBSD")

     Description:         NVIDIA Accelerated Graphics Driver

```

 As well, the respective modules are loaded:

 *Quote:*   

> 
> 
> lsmod
> 
> Module                  Size  Used by
> ...

 

Also, I tried to recompile mesa specifically with i915 VIDEO_CARDS variable to no avail:

```

[I] media-libs/mesa

     Available versions:  [M]7.10.3 [M]7.11.2 [M]8.0.4-r1 [M]~9.0.3 9.1.6 ~9.2.5-r1 10.0.4 ~10.1.0 ~10.1.1 ~10.1.3 ~10.1.4 ~10.1.6 ~10.2.1 ~10.2.2 ~10.2.4 {bindist +classic debug +dri3 +egl g3dvl +gallium gbm gles gles1 gles2 hardened (+)llvm (+)llvm-shared-libs motif +nptl opencl openmax openvg osmesa pax_kernel pic r600-llvm-compiler selinux shared-dricore +shared-glapi vdpau wayland xa xorg xvmc ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" VIDEO_CARDS="freedreno i915 i965 ilo intel mach64 mga nouveau r100 r128 r200 r300 r600 radeon radeonsi savage sis tdfx via vmware"}

     Installed versions:  10.0.4(12:38:13 08/04/14)(classic egl gallium gbm llvm nptl xa -bindist -debug -gles1 -gles2 -llvm-shared-libs -opencl -openvg -osmesa -pax_kernel -pic -r600-llvm-compiler -selinux -vdpau -wayland -xvmc ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="-FreeBSD" VIDEO_CARDS="i965 intel -freedreno -i915 -ilo -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware")

```

I think it's also worth mentioning that I had to set a kernel command line on grub to get modesetting on kernel:

```

cat /etc/default/grub |grep 915

GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid/g1310max.bin i915.modeset=1"

cat /sys/module/i915/parameters/modeset 

1

```

The only way I get my Xorg to work is if I have /etc/X11/xorg.conf, which give me the following /var/log/Xorg.0.log:

http://pastebin.com/rC10K0wf

Which seems to yield intel i965 driver with kms correctly:

```

cat /var/log/Xorg.0.log |grep -i intel

[   602.720] (==) Matched intel as autoconfigured driver 0

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

[   602.720] (II) LoadModule: "intel"

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

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

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

[   602.730] (II) intel(0): Creating default Display subsection in Screen section

[   602.730] (==) intel(0): Depth 24, (--) framebuffer bpp 32

[   602.730] (==) intel(0): RGB weight 888

[   602.730] (==) intel(0): Default visual is TrueColor

[   602.730] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4600

[   602.730] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2

[   602.730] (**) intel(0): Framebuffer tiled

[   602.730] (**) intel(0): Pixmaps tiled

[   602.730] (**) intel(0): "Tear free" disabled

[   602.730] (**) intel(0): Forcing per-crtc-pixmaps? no

[   602.730] (II) intel(0): Output eDP1 has no monitor section

[   602.730] (--) intel(0): found backlight control interface acpi_video0 (type 'firmware')

[   602.730] (II) intel(0): Output VGA1 has no monitor section

[   602.730] (II) intel(0): Output DP1 has no monitor section

[   602.730] (II) intel(0): Output HDMI1 has no monitor section

[   602.730] (--) intel(0): Output eDP1 using initial mode 1920x1080 on pipe 0

[   602.730] (==) intel(0): DPI set to (96, 96)

[   602.731] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend

[   602.731] (==) intel(0): Backing store enabled

[   602.731] (==) intel(0): Silken mouse enabled

[   602.731] (II) intel(0): HW Cursor enabled

[   602.731] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.

[   602.731] (==) intel(0): DPMS enabled

[   602.731] (II) intel(0): [DRI2] Setup complete

[   602.731] (II) intel(0): [DRI2]   DRI driver: i965

[   602.731] (II) intel(0): direct rendering: DRI2 Enabled

[   602.731] (==) intel(0): hotplug detection: "enabled"

[   602.738] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 0 using eDP1, position (0, 0), rotation normal

[   602.747] (II) intel(0): Setting screen physical size to 508 x 285

[   602.791] (II) config/udev: Adding input device HDA Intel HDMI HDMI (/dev/input/event10)

[   602.791] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event7)

[   602.791] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event6)

[   602.843] (II) intel(0): EDID vendor "CMN", prod id 4931

[   602.843] (II) intel(0): Printing DDC gathered Modelines:

[   602.843] (II) intel(0): Modeline "1920x1080"x0.0  138.78  1920 1966 1996 2080  1080 1082 1086 1112 -hsync -vsync (66.7 kHz eP)

[   602.843] (II) intel(0): Modeline "1920x1080"x0.0   92.52  1920 1966 1996 2080  1080 1082 1086 1112 -hsync -vsync (44.5 kHz e)

```

Although I'm not sure because of the last line of this snippet:

```

cat /var/log/Xorg.0.log |grep -i modesetting

[   602.720] (==) Matched modesetting as autoconfigured driver 4

[   602.723] (II) LoadModule: "modesetting"

[   602.723] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so

[   602.723] (II) Module modesetting: vendor="X.Org Foundation"

[   602.724] (II) modesetting: Driver for Modesetting Kernel Drivers: kms

[   602.729] (WW) Falling back to old probe method for modesetting

```

Does this fallback mean that kms isn't working?

Anyway, without the xorg file, I get a funcional X environment, but without 3D acceleration:

```

glxinfo                

name of display: :0.0

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Error: couldn't find RGB GLX visual or fbconfig

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Error: couldn't find RGB GLX visual or fbconfig

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

Xlib:  extension "GLX" missing on display ":0.0".

```

So, following this topic, I tried with the following xorg.conf:

```

cat /etc/X11/xorg.conf 

Section "ServerLayout" 

    Identifier "layout" 

    Screen 0 "nvidia" 

    Inactive "intel" 

EndSection 

Section "Device" 

    Identifier "nvidia" 

    Driver "nvidia" 

    BusID "PCI:1:00.0 " 

EndSection 

Section "Screen" 

    Identifier "nvidia" 

    Device "nvidia" 

    # Uncomment this line if your computer has no display devices connected to 

    # the NVIDIA GPU.  Leave it commented if you have display devices 

    # connected to the NVIDIA GPU that you would like to use. 

    Option "UseDisplayDevice" "none" 

EndSection 

Section "Device" 

    Identifier "intel" 

    Driver "modesetting" 

    BusID "PCI:0:02.0"

EndSection 

Section "Screen" 

    Identifier "intel" 

    Device "intel" 

EndSection 

```

And with the following contents from .xinitrc :

```

cat .xinitrc 

xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto 

exec startxfce4 --with-ck-launch

```

Which gives me the following Xorg.0.log:

http://pastebin.com/3d3RUSdT

It seems to try to load nvidia module, but fails:

```

Failed to initialize GLX extension (Compatible NVIDIA X driver not found)

```

Which is strange, because everything seems to be in order. Any help would be appreciated. Thank you very much in advance.Last edited by Arthanis on Sun Aug 10, 2014 9:27 pm; edited 1 time in total

----------

## Yamakuzure

It is possible to use nvidia *only* with intel disabled. Yes. If you want to switch, you need something that actually can do the switch. Bumblebee + Primusrun is the best I could find so far. (From "Bumblebee" Overlay)

Otherwise I do not understand what you want to achieve.

The xorg.conf you posted is one used by switchers like bumblebee. It does not let you use your nvidia card directly but configures your system to run on the Intel HD. With the configs you posted it will not be possible to use your nvidia card at all.

----------

## Arthanis

Well, I see. I guess I misunterstood this post (https://forums.gentoo.org/viewtopic-t-959568.html) because of this:

 *Quote:*   

> Nouveau driver and bumblebeed : 1500 fps in 5 seconds (glxgears) 
> 
> Nvidia driver and bumblebeed : 1500 to 1700 fps in 5 seconds (glxgears) 
> 
> New driver support the optimus by nvidia : 8000 to 8800 fps in 5 seconds (glxgears) 
> ...

 

Anyway, so no matter which nvidia proprietary driver I choose, do I have to enable hybrid graphics (CONFIG_VGA_SWITCHROO) on the kernel or not?

----------

## krinn

 *Arthanis wrote:*   

> 
> 
> Nvidia seems to load fine:
> 
> ```
> ...

 

No, for me it looks like you have a kernel oops with nvidia, but we only get the two line that have the nvidia keyword in them because of your grep.

This is a oops part for me, and it mean your driver doesn't load fine as you think.

```
[    2.175708]  [<ffffffffa07c86e7>] nvidia_open+0x567/0x8f0 [nvidia]

[    2.175868]  [<ffffffffa07d2dcf>] nvidia_frontend_open+0x4f/0xa0 [nvidia]

```

----------

## Arthanis

krinn, I linked a full dmesg in pastebin on the post, would you please check it out and see if it seems indeed an oops?

EDIT: Here is what I think is the relevant part of dmesg regarding nvidia:

```

[    2.133071] nvidia: module license 'NVIDIA' taints kernel.

[    2.133075] Disabling lock debugging due to kernel taint

[    2.171903] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2

[    2.180007] systemd-udevd[1191]: renamed network interface wlan0 to wlp3s0

[    2.180967] Switched to clocksource tsc

[    2.182087] fbcon: inteldrmfb (fb0) is primary device

[    2.182514] BUG: unable to handle kernel NULL pointer dereference at           (null)

[    2.182519] IP: [<ffffffff816926d7>] __down_common+0x45/0xe4

[    2.182520] PGD c6320067 PUD c5ef3067 PMD 0 

[    2.182522] Oops: 0002 [#1] SMP 

[    2.182527] Modules linked in: nvidia(PO+) iwldvm coretemp snd_hda_codec_via snd_hda_codec_generic iwlwifi joydev mei_me(+) mei i915(+) snd_hda_intel snd_hda_codec drm_kms_helper snd_hwdep

[    2.182529] CPU: 0 PID: 1342 Comm: nvidia-smi Tainted: P          IO 3.14.14-gentoo #26

[    2.182530] Hardware name: Notebook                         W230SS                 /W230SS                 , BIOS 4.6.5 04/15/2014

[    2.182530] task: ffff880225d587a0 ti: ffff880223f40000 task.ti: ffff880223f40000

[    2.182533] RIP: 0010:[<ffffffff816926d7>]  [<ffffffff816926d7>] __down_common+0x45/0xe4

[    2.182533] RSP: 0018:ffff880223f41ac8  EFLAGS: 00010092

[    2.182534] RAX: 0000000000000000 RBX: ffffffffa0bb1400 RCX: ffff880223f41ad8

[    2.182535] RDX: 7fffffffffffffff RSI: ffffffffa0bb1408 RDI: ffffffffa0bb1400

[    2.182535] RBP: ffff880223f41b28 R08: 0000000000018890 R09: 0000000000000027

[    2.182536] R10: 000000000000001f R11: 0000000000000024 R12: 7fffffffffffffff

[    2.182537] R13: 0000000000000002 R14: 0000000000000000 R15: ffff880225d587a0

[    2.182538] FS:  00007ffc1013c700(0000) GS:ffff88022fa00000(0000) knlGS:0000000000000000

[    2.182538] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033

[    2.182539] CR2: 0000000000000000 CR3: 00000000c5ea4000 CR4: 00000000001407f0

[    2.182539] Stack:

[    2.182541]  0000000000000000 0000000100020002 ffffffffa0bb1408 0000000000000000

[    2.182542]  ffffffff000280da ffffffff00000141 ffff880225d587a0 ffffffffa0bb1400

[    2.182543]  ffff8800c6128000 0000000000000002 ffff88022586c700 00000000000000ff

[    2.182544] Call Trace:

[    2.182547]  [<ffffffff816927d5>] __down+0x18/0x1a

[    2.182550]  [<ffffffff8107e58c>] down+0x3c/0x50

[    2.182616]  [<ffffffffa07b56e7>] nvidia_open+0x567/0x8f0 [nvidia]

[    2.182668]  [<ffffffffa07bfdcf>] nvidia_frontend_open+0x4f/0xa0 [nvidia]

[    2.182670]  [<ffffffff8111bf17>] chrdev_open+0xa7/0x180

[    2.182673]  [<ffffffff81115263>] do_dentry_open+0x243/0x2d0

[    2.182674]  [<ffffffff8111be70>] ? cdev_put+0x30/0x30

[    2.182676]  [<ffffffff81115320>] finish_open+0x30/0x40

[    2.182678]  [<ffffffff811262fe>] do_last.isra.54+0x71e/0xd00

[    2.182680]  [<ffffffff81122783>] ? inode_permission+0x13/0x50

[    2.182682]  [<ffffffff81122c09>] ? link_path_walk+0x69/0x7e0

[    2.182683]  [<ffffffff81126999>] path_openat+0xb9/0x620

[    2.182685]  [<ffffffff8112719e>] do_filp_open+0x3e/0xa0

[    2.182687]  [<ffffffff81133502>] ? __alloc_fd+0x42/0x120

[    2.182689]  [<ffffffff81116aa7>] do_sys_open+0x137/0x220

[    2.182691]  [<ffffffff81116bad>] SyS_open+0x1d/0x20

[    2.182693]  [<ffffffff81699c66>] system_call_fastpath+0x1a/0x1f

[    2.182707] Code: 48 8d 77 08 4d 89 ee 41 54 41 81 e6 81 00 00 00 49 89 d4 53 48 89 fb 48 83 ec 38 48 8b 47 10 48 89 75 b0 48 89 4f 10 48 89 45 

b8 <48> 89 08 4c 89 e8 83 e0 01 4c 89 7d c0 c6 45 c8 00 48 89 45 a8 

[    2.182709] RIP  [<ffffffff816926d7>] __down_common+0x45/0xe4

[    2.182710]  RSP <ffff880223f41ac8>

[    2.182710] CR2: 0000000000000000

[    2.182711] ---[ end trace 0bfcf8d45430bc02 ]---

.

.

.

[    2.305556] random: nonblocking pool is initialized

[    2.337567] EXT4-fs (sda2): re-mounted. Opts: data=ordered,commit=600

[    3.722738] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off

[    4.843462] Console: switching to colour frame buffer device 240x67

[    4.856882] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device

[    4.856884] i915 0000:00:02.0: registered panic notifier

[    4.856979] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS

[    4.857010] ACPI: Video Device [PEGP] (multi-head: yes  rom: yes  post: no)

[    4.857076] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:4d/LNXVIDEO:00/input/input15

[    4.858947] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)

[    4.859603] acpi device:53: registered as cooling_device4

[    4.859684] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:01/input/input16

[    4.859738] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

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

[    4.859789] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  340.24  Wed Jul  2 14:24:20 PDT 2014

.

.

.

[ 1885.406357] bbswitch: version 0.8

[ 1885.406364] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0

[ 1885.406371] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP

[ 1885.406382] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)

[ 1885.406472] bbswitch: detected an Optimus _DSM function

[ 1885.406480] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on

```

It looks OK to me. Anyway I rebooted after the post and the Xorg message about nvidia is gone.Last edited by Arthanis on Tue Aug 05, 2014 3:57 pm; edited 1 time in total

----------

## Arthanis

Yamakuzure, doesnt this arcticle here (http://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops) talk about bumblebee-less setup ?

 *Quote:*   

> Note
> 
> This is about the native Optimus support in x11-drivers/nvidia-drivers - It is *not* about bumblebee - bumblebee is not used in this configuration.

 

Or does it only work with muxed hardware?

----------

## Yamakuzure

 *Arthanis wrote:*   

> Yamakuzure, doesnt this arcticle here (http://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops) talk about bumblebee-less setup ?
> 
>  *Quote:*   Note
> 
> This is about the native Optimus support in x11-drivers/nvidia-drivers - It is *not* about bumblebee - bumblebee is not used in this configuration. 
> ...

 No idea. All the game and play with xrandr do not work for me anyway, because on my (muxless) system:

```
 ~ $ xrandr --listproviders

Providers: number : 1

Provider 0: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel
```

Further they all want to switch OpenGL to nvidia. I will *not* do this with an OpenGL driven window manager like kwin.  :Wink: 

----------

## cyberjun

Hi,

What worked for me was this: https://wiki.archlinux.org/index.php/NVIDIA_Optimus#LightDM. With lightdm, I get to see the login screen as the xrandr commands are run before login. I have a Lenovo G500s laptop with optimus. I had almost given up and then I tried this arch wiki. 

Works very nicely. HDMI out works too, along with suspend/hibernate etc.

--cyberjun

----------

## Arthanis

 *Quote:*   

> 
> 
> Hi, 
> 
> What worked for me was this: https://wiki.archlinux.org/index.php/NVIDIA_Optimus#LightDM. With lightdm, I get to see the login screen as the xrandr commands are run before login. I have a Lenovo G500s laptop with optimus. I had almost given up and then I tried this arch wiki. 
> ...

 

Well, It seems that this tutorial is bumblebee-less because it suggest to use bumblebee optionally at the end of the article. Anyway I will try both ways. I will keep you guys updated.

----------

## cyberjun

Yes. it is bumblebee less. You have to remove bumblebee from your runlevels and also remove/blacklist bbswitch module.

--cyberjun

----------

## Arthanis

Cyberjun, would you please enlight me? It's all so confusing. How can I use optimus without bbumblebee if I have a muxless laptop? And to do that, do I nees Do I need CONFIG_VGASWITCHERROO ir not? No BBSWITCH?

And also, it all goes back to the beginning of my post. Everytime I try to startx with taht kind of xorg.conf, it gives me the dreaded "no screens found" error. And if am able to do it, does powermizer (nvidia gpu frequency scale) work?

----------

## cyberjun

Hi,

I don't know what muxless means. On my laptop, I can switch exclusively to Integrated Graphics or Hybrid (in BIOS) but not exclusively to discreete (NVIDIA). Does that mean muxless?

You don't need CONFIG_VGA_SWITCHEROO. In fact disable it if already enabled. Also I don't have bbswitch loaded. bumblebee service is also disabled. If you get this setup right, nvidia-settings shows powermizer working.

My Nvidia card shows up like this in lspci output:

 *Quote:*   

> 01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (rev a1)

 

My Xorg.conf:

 *Quote:*   

> Section "ServerLayout"
> 
> 	Identifier	"Layout0"
> 
> 	Screen 0	"nvidia"
> ...

 

cat /etc/lightdm/display_setup.sh

 *Quote:*   

> 
> 
> lsmod | grep nvidia
> 
> if [ $? -eq 0 ]; then
> ...

 

I don't have bbswitch autoloaded. 

cat /etc/modprobe.d/nvidia.conf

 *Quote:*   

> # Nvidia drivers support
> 
> alias char-major-195 nvidia
> 
> alias /dev/nvidiactl char-major-195
> ...

 

----------

## Yamakuzure

From the wikipedia page on nvidia optimus: (MUX == "[MU]ltiple[X]er")

"Optimus avoids usage of a hardware multiplexer and prevents glitches associated with changing the display driver from IGP to GPU by transferring the display surface from the GPU frame buffer over the PCI Express bus to the main memory-based framebuffer used by the IGP. The Optimus Copy Engine is a new alternative to traditional DMA transfers between the GPU framebuffer memory and main memory used by the IGP"

In other words: You can not use your nvidia card directly, it is always indirect. Without a multiplexer there is no direct connection between any video out and the card.

And further: "The binary Nvidia driver added partial Optimus support May 3, 2013 in the 319.17.[5] As of May 2013, power management for discrete card is not supported, which means it cannot save battery by turning off Nvidia graphic card completely."

So while it is a nice thing that the nvidia linux drivers natively support optimus in some way, they are out of the window for people like me with an often traveling laptop. I need to be able to have the discrete card switched off completely, and only bumblebe can do this at the moment.

However, what is the problem anyway? Is it too much asked to write "primusrun foo" instead of just "foo"? Actually I find this more convenient, as I have absolute control over when the nvidia card is switched on and when not.

----------

## Dr.Willy

 *Yamakuzure wrote:*   

> However, what is the problem anyway? Is it too much asked to write "primusrun foo" instead of just "foo"? Actually I find this more convenient, as I have absolute control over when the nvidia card is switched on and when not.

 

Well, how do you for instance run flash videos on your nvidia card?

Running the browser with primusrun doesn't seem like a good idea, because at least for me firefox is one of those "always on" programs.

----------

## Yamakuzure

 *Dr.Willy wrote:*   

>  *Yamakuzure wrote:*   However, what is the problem anyway? Is it too much asked to write "primusrun foo" instead of just "foo"? Actually I find this more convenient, as I have absolute control over when the nvidia card is switched on and when not. 
> 
> Well, how do you for instance run flash videos on your nvidia card?
> 
> Running the browser with primusrun doesn't seem like a good idea, because at least for me firefox is one of those "always on" programs.

 Why would I want to run something as simple as flash videos on the nvidia card? There would nothing be gained.

No matter whether I start firefox with intel or nvidia, The Firefox FPS test always ends up with 60+. And I haven't found anything on youtube yet, that couldn't be displayed full screen without problems. (And I doubt there is anything flash based out there that really needs the nvidia acceleration. If so, using primusrun/optirun for that alone would be simple enough.)

If you have a bad performance with the intel chipset, then there might be a different problem?

----------

## Arthanis

 *Quote:*   

> 
> 
> However, what is the problem anyway? Is it too much asked to write "primusrun foo" instead of just "foo"? Actually I find this more convenient, as I have absolute control over when the nvidia card is switched on and when not.
> 
> 

 

My reasons (fell free to refute them):

-Well, for starters its kinda pain to run stuff like STEAM, since it calls many others executables and I think it would be a pain to run all of them using optirun/primus.

-For what I've read until now, using bumblebee/optirun seems to have a signifcant performance hit. I don't know about primus.

-As awesome as Bumblebee is, its setup is kinda messy, with all bbswitch, virtualGL and such. Specially using gentoo, I like to keep things as simple and lightweight as possible, with minimal dependencies and daemons (don't we all?)

-From what I've read until now, HDMI out with bumblebee does not support sound

-Most of the time, I have a power source available, so if I lose 25% of my battery time, I won't bother.

- I had a macbook running linux (late 2011) with only nvidia and gentoo, and the battery lasted quite a while (a little more than 3 hours) because of powermizer. If powermizer works, I really think that optimus is an overkill that introduces a lot of unecessary complexity, so I would like to test this for myself. Also, I buy nvidia mostly because of the linux support, so the lack of proper optimus support pisses me off to the point that I would rather get rid of optimus.

- I read that compiz and bumblebee won't play along very well (http://askubuntu.com/questions/84369/running-compiz-using-optirun)

In a perfect world, I would like to be able use only intel (as it is now) and everytime I decide to run steam and/or compiz, I would link a different xorg.conf and restart X. But if its not possible (or require too much hassle), I prefer nvidia only.

----------

## Yamakuzure

 *Arthanis wrote:*   

>  *Quote:*   
> 
> However, what is the problem anyway? Is it too much asked to write "primusrun foo" instead of just "foo"? Actually I find this more convenient, as I have absolute control over when the nvidia card is switched on and when not.
> 
>  
> ...

 Look up this Official Howto how to configure Steam to only use the nvidia card (using primusrun) on intense games that actually need it. *Arthanis wrote:*   

> -For what I've read until now, using bumblebee/optirun seems to have a signifcant performance hit. I don't know about primus.

 Yes, there is a virtual X-Server in between. But it is far less than using virtualgl directly, and primusrun is a lot faster than optirun. No idea how it correlates on a MUX'd system using nvidia directly. On my muxless system the difference is < 5%. *Quote:*   

> -As awesome as Bumblebee is, its setup is kinda messy, with all bbswitch, virtualGL and such. Specially using gentoo, I like to keep things as simple and lightweight as possible, with minimal dependencies and daemons (don't we all?)

 Well, I did "emerge primusrun" and then added /etc/init.d/bumblebee to the default runlevel. Nothing messy about that. (Of course I had to unkeyword the live ebuilds from the used packages.) *Quote:*   

> -From what I've read until now, HDMI out with bumblebee does not support sound
> 
> -Most of the time, I have a power source available, so if I lose 25% of my battery time, I won't bother.

 Those are good points. Although it's more like ~66% of the battery time. However, if your Laptop does not 'travel', then why fiddle with the stuff anyway instead of switching to nvidia-only via BIOS? *Quote:*   

> 
> 
> - I had a macbook running linux (late 2011) with only nvidia and gentoo, and the battery lasted quite a while (a little more than 3 hours) because of powermizer. If powermizer works, I really think that optimus is an overkill that introduces a lot of unecessary complexity, so I would like to test this for myself. Also, I buy nvidia mostly because of the linux support, so the lack of proper optimus support pisses me off to the point that I would rather get rid of optimus.
> 
> - I read that compiz and bumblebee won't play along very well (http://askubuntu.com/questions/84369/running-compiz-using-optirun)

 Good points, right. I wouldn't know, as I do not use compiz for over 3 years now. kwin has enough effects for my liking. But on other DMs/WMs I can see why one would like to use compiz. However, isn't your intel HD chipset strong enough for compiz? I had an old Core2Duo four years ago with integrated intel only, and compiz worked just fine on two monitors. For todays Intel HD chips it should be a joke, right? *Quote:*   

> In a perfect world, I would like to be able use only intel (as it is now) and everytime I decide to run steam and/or compiz, I would link a different xorg.conf and restart X. But if its not possible (or require too much hassle), I prefer nvidia only.

 So the steam problem is solved above, and maybe compiz is no problem at all?  :Wink: 

Everybody should use what works best for them. If nvidia-only works best for you, then to hell with the intel HD chip.  :Very Happy: 

----------

## Arthanis

Well, I was finally able to use nvidia-only with proprietary drivers. But before I mark this post as SOLVED, I will try to give it back to the community by summarizing all the experience and knowledge I got about this subject, because its not clear what all the options for optimus on linux are. Please if anyone see any error feel free to correct any misconception I may have had.

As far as I'm concerned, these are the options when it comes to optimus on Linux:

Option A: If you have a muxed hardware, you can disable the integrated GPU, use only nvidia either with nvidia-drivers or noveau, and be happy

If you have muxless (or willing to use the integrated chip), the options are:

Option B: Use nvidia proprietary drivers support for optimus, using nvidia chip all the time

If you choose to use bumblebee (with iether noveau or nvidia), there are two backend that transport the data from the framebuffer:

Option C: Bumblebee + Virtual GL ("network" backend, slower)

Option D: Bumblebee + primus (local backend, faster)

Options A and B:

-PROS: Less hassle, better performance

-CONS: More Heat, more power consumption

Options C and D

-PROS: Flexibility, better power management

-CONS: More hassle, more daemons, more bugs, less stability, no HDMI sound, compulsory use of DM (i like using auto startx after shell login, without any DM)

I finally got it working with option B, with the following steps:

- Enable intel modesetting, intel i915 in kernel, rcu_igp_delay, agpgart, drm_i915_kms, agp_intel

- Enable the following options in /etc/default/grub:

```
GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid/g1310max.bin i915.modeset=1 rcutree.rcu_idle_gp_delay=1"

```

- Enabling VIDEOCARDS="intel modesettings nvidia" in make.conf, which will pull xorg-drivers and xf86-video-intel when emerging xorg-server

- Install xrandr

- Creating the following ~/.xinitrc:

```

xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto

exec ck-launch-session startxfce4  #for xfce4, probably works with any other DE

```

- The following xorg.conf:

```

Section "ServerLayout"

    Identifier     "Layout0"

    Screen      0  "nvidia" 0 0

    Inactive       "intel"

    InputDevice    "Keyboard0" "CoreKeyboard"

    InputDevice    "Mouse0" "CorePointer"

EndSection

Section "InputDevice"

    # generated from default

    Identifier     "Keyboard0"

    Driver         "keyboard"

EndSection

Section "InputDevice"

    # generated from data in "/etc/conf.d/gpm"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol"

    Option         "Device" "/dev/input/mice"

    Option         "Emulate3Buttons" "no"

    Option         "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    Option         "DPMS"

EndSection

Section "Device"

    Identifier     "nvidia"

    Driver         "nvidia"

    BusID          "PCI:1:0:0"

EndSection

Section "Device"

    Identifier     "intel"

    Driver         "modesetting"

    BusID          "PCI:0:2:0"

EndSection

Section "Screen"

    Identifier     "nvidia"

    Device         "nvidia"

    Monitor        "Monitor0"

    DefaultDepth    24

    Option         "UseDisplayDevice" "none"

    SubSection     "Display"

        Depth       24

        Modes      "nvidia-auto-select"

    EndSubSection

EndSection

Section "Screen"

    Identifier     "intel"

    Device         "intel"

    Monitor        "Monitor0"

EndSection

```

- I HATE THE DAMN DMs, so I put in my ~/.bash_profile

```

#!/bin/sh

startx

```

That being said, there are somethings that I quite don't understand is when to use VGA_SWITCHEROO. I have it disabled and works fine for me.

Answering Yamakuzure:

 *Quote:*   

> 
> 
> Although it's more like ~66% of the battery time. However, if your Laptop does not 'travel', then why fiddle with the stuff anyway instead of switching to nvidia-only via BIOS?
> 
> 

 

Simply because unfortunately I don't have a muxed hardwared =/ . I really don't believe that its 66%, since I checked and powermizer is working. Im benchmarking it right now, since I can now switch between nvidia only and intel only using xorg.conf and will post the result.

I would like to suggest that after someone who knows more than me and make the appropriate corrections, make a sticky thread about this, because it seems to me that there are still a lot of questions about the subject.

Anyway, thank you all guys for the support, I'm very happy that I got it working, since now I can switch manually between intel and nvidia at will. I will come back with the results of my battery time benchmark.

----------

## Moriah

I recently upgraded from a Lenovo w500 to a w530, mainly to get 8 cores and 32 GB of ram.  I always used the w500 iin intel mode and used the vga output to an external monitor when at my desk.  When on battery, I had the same 1920x1200 resolution on the laptop screen as I had on the external vga.  The 2 monitors had exactly the same picture.

The w530 is a downgrade as far as the built-in screen is concerned. The laptop screen is 1920x1080.  But the graphics controller is either intel, or nvidia K100M, which has very high resolution capabilities via the mini-displayport.  The vga connector on the w530 gives me problems.  I tried to connect it to the same external monitor I used with my w500, and it failed to read the EDID info, so the resolution was early 1990's style 800x600.    :Evil or Very Mad: 

So I decided to bite the bullet and got a Dell P2815Q monitor that does 3840 x 2160.    :Very Happy: 

It works great under w7, which I only installed to prove that the hardware would work.

It must use the displayport input to the monitor, which means it must use the mini-displayport output from the w530.  But the mini-displayport output only works with the nvidia controller.  So I must get the nvidia controller working under gentoo linux.

I boot my laptop to a command prompt login, not an X-server, so all that flap about blank screen before login will not affect me.  I do, however, switch between the tty consoles with alt-ctl-F1 thru F6, and between multiple X-servers on alt-ctl-F7 thru F11.  F12 displays my syslog.

I run a minimal window manager: ctwm, which is basicly a very simple twm with multiple virtual desktops.

Since it will be impossible to keep the same picture on the laptop screen and the Dell monitor (given I run the Dell in it 3840x2160 mode), I am willing to give up the laptop display entirely when using the external monitor.  I usually close the lid when using the external monitor on the w500 anyway.

I am currently running:

```

onesimus ~ $ uname -a

Linux onesimus 3.12.21-gentoo-r1 #2 SMP PREEMPT Tue Jun 17 21:26:50 EDT 2014 x86_64 Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz GenuineIntel GNU/Linux

rj@onesimus ~ $ 

```

I have my BIOS configured for the laptop display as the boot display, optimus enabled, and auto-detectable.

It boots into gentoo and runs X fine on the built-in laptop display.

What do I need to do to get the nvidia controller working with the Dell hires monitor?

I do not play video games or other stressing animated video stuff, nor CAD, etc.  I do software development, so I like lots of text on the screen, but it doesn't need extreme update rate performance, just extreme resolution.

I operate on battery with the intel graphics chip only, and would like to keep it that way, but I need the nvidia chip for the hires monitor when I am at my desk.

I appreciate all the help I can get on this.

PS:  I expect one day, after all this other stuff is working, to upgrade my laptop built-in screen to the screen used in the w540, which is 2880x1620.  My wife has a Dell laptop with a 31??x1800 touch screen, and the resolution looks beautiful.  I suspect I would need to use the nvidia controller to drive that higher resolution 2880x1620 screen, but I am not sure.

----------

## Moriah

I have installed the nvidia driver and have at least that much working, as when I boot the new kernel, I can see:

```

onesimus ~ # lsmod | grep nv

nvidiafb               39840  0 

cfbfillrect             3790  1 nvidiafb

cfbimgblt               2354  1 nvidiafb

vgastate                8801  1 nvidiafb

cfbcopyarea             3298  1 nvidiafb

fb_ddc                  1407  1 nvidiafb

onesimus ~ # 

```

Also, I have set the BIOS to use the mini-displayport for output, and the discrete graphics is enabled, optimus is disabled.

This let the laptop boot and uses the external Dell monitor as the boot display.  That all works.

BTW  I finally figured out how to pair and connect to my microsoft bluetooth mouse and keyboard under the new bluez5 stuff.  It ain't pretty, but at least it works.  I'll try to pretty it up later, after I get the nvidia and Dell monitor working properly.

Now I start X, right from the command prompt, using X &, and that works too.  I can then start a display manager with DISPLAY=:0 twm &, and I get the mouse menu and all that works.  I can switch between the bare console and the X display on the Dell monitor with alt-ctl-F1 and alt-ctl-F7, just like I do when running with the integrated intel video on the laptop screen.

The problem is the X display is onl 1024x768, which is a victory because at least it displays something, but hardly the resolution I paid for when I shucked out the bucks for the nice super hi res monitor.    :Evil or Very Mad: 

Furthermore, the get-edid | parse-edid sequence fails to read the EDID from the Dell monitor:

```

onesimus ~ # get-edid | parse-edid

parse-edid: parse-edid version 2.0.0

get-edid: get-edid version 2.0.0

        Performing real mode VBE call

        Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0

        Function supported

        Call successful

        VBE version 300

        VBE string at 0x11100 "NVIDIA"

VBE/DDC service about to be called

        Report DDC capabilities

        Performing real mode VBE call

        Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0

        Function supported

        Call successful

        Monitor and video card combination does not support DDC1 transfers

        Monitor and video card combination does not support DDC2 transfers

        0 seconds per 128 byte EDID block transfer

        Screen is not blanked during DDC transfer

Reading next EDID block

VBE/DDC service about to be called

        Read EDID

        Performing real mode VBE call

        Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0

        Function supported

        Call failed

The EDID data should not be trusted as the VBE call failed

Error: output block unchanged

parse-edid: IO error reading EDID

onesimus ~ # 

```

So, since I can be happy booting for the external monitor, and re-booting for the builtin monitor, My problem now is to get the resolution up to snuff on the external monitor.

Any suggestions?    :Question: 

----------

## Arthanis

Moriah, O don't know how to solve your problem, but I do know that the module nvidiafb you have loaded, conflicts with nvidia-drivers, so for starters, I would remove or blacklist it.

Anyway, Im marking this thread as solved. The results for power management are:

intel only: about 4:00 hours of battery power

nvidia : about 3:40 hours of battery power

Obviously, I did not use any gpu intense software, just normal browsing and stuff. Thank you all for the help.

----------

## Yamakuzure

Well it surely depends on usage. I can only say that on my laptop 'powertop' reports a power consumption between 15 and 18 Watts on intel, and 48 to 52 Watts on nvidia. But then, I am using kwin with opengl backend, so I'd have more usage of the gpu anyway.

----------

## Arthanis

I couldn't agree more. Im using xfce with very little compositing. No compiz nor nothing. Would you please tell me which command line you used for powertop? Mine has the following output:

```
powertop

Summary: -nan wakeups/second,  -nan GPU ops/seconds, -nan VFS ops/sec and -0.0% CPU use

                Usage       Events/s    Category       Description

            100.0%                      Device         Display backlight

              2.1 pkts/s                Device         Network interface: wlp3s0 (iwlwifi)

              0.0 pkts/s                Device         Network interface: enp4s0f1 (r8169)

            100.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1

            100.0%                      Device         PCI Device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller

            100.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller

            100.0%                      Device         PCI Device: Intel Corporation HM87 Express LPC Controller

            100.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1

            100.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [

            100.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3

            100.0%                      Device         PCI Device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Control

            100.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4

            100.0%                      Device         PCI Device: Realtek Semiconductor Co., Ltd. Device 5287

            100.0%                      Device         PCI Device: NVIDIA Corporation GM107M [GeForce GTX 860M]

              0.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI

              0.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1

              0.0%                      Device         USB device: EHCI Host Controller

              0.0%                      Device         USB device: usb-device-8087-07da

              0.0%                      Device         USB device: usb-device-8087-8008

              0.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller

              0.0%                      Device         alsa:hwC0D0

              0.0%                      Device         PCI Device: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2

              0.0%                      Device         USB device: EHCI Host Controller

              0.0%                      Device         PCI Device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller

              0.0%                      Device         USB device: xHCI Host Controller

              0.0%                      Device         USB device: usb-device-8087-8000

              0.0 pkts/s                Device         nic:sit0

              0.0%                      Device         USB device: xHCI Host Controller

```

Thanks in advance.

----------

## Yamakuzure

No special command line options. just 'powertop'.

powertop only displays the important values when you are on battery.  :Wink:  Otherwise it is quite limited. Here is a comparison:

powertop on AC:

```
PowerTOP 2.5      Overview   Idle stats   Frequency stats   Device stats   Tunables                                     

Summary: 1876.2 wakeups/second,  63.9 GPU ops/seconds, 0.0 VFS ops/sec and 18.6% CPU use

                Usage       Events/s    Category       Description

             70.5 ms/s     697.2        Process        /opt/vmware/lib/vmware/bin/vmware-vmx.real -s vmx.stdio.keep=TRUE -# product=1;name=VMware Workstation;version=10.0.2;buildnumb

             34.3 ms/s     355.0        Process        /usr/bin/firefox

              9.9 ms/s     182.9        Process        kwin
```

powertop on battery:

```
PowerTOP 2.5      Overview   Idle stats   Frequency stats   Device stats   Tunables                                     

The battery reports a discharge rate of 24.7 W

The estimated remaining time is 2 hours, 32 minutes

Summary: 1313.1 wakeups/second,  40.9 GPU ops/seconds, 0.0 VFS ops/sec and 13.5% CPU use

                Usage       Events/s    Category       Description

             65.8 ms/s     457.9        Process        /opt/vmware/lib/vmware/bin/vmware-vmx.real -s vmx.stdio.keep=TRUE -# product=1;name=VMware Workstation;version=10.0.2;buildnumb

              3.4 ms/s     206.2        Timer          hrtimer_wakeup

             22.8 ms/s     139.5        Process        /usr/bin/firefox

              5.8 ms/s      84.8        Process        kwin
```

Note: VMware runs on nvidia using primusrun, so it is a bit intense. right now.

----------

## Maffblaster

 *Moriah wrote:*   

> I have installed the nvidia driver and have at least that much working, as when I boot the new kernel, I can see:
> 
> Any suggestions?   

 

Did you get everything working, Moriah? 

I have a different monitor setup than you, but I'm having the same problems. For some reason kdm is failing to start for me, although nvidia drivers seem to be loaded properly in the kernel. I get the "no screens found" error when attempting to start the X server and a similar message from xrandr ("can't open display" error). I actually haven't tried setting my computer on a dock during the boot process, so I'll try that when I get home. Maybe, just maybe, it will be able to locate the monitors...

----------

## Moriah

Rather than repeat evverything here, I'll just refer you to the thread with my current info in it.  

https://forums.gentoo.org/viewtopic-t-997692-highlight-.html

----------

## Fitzcarraldo

 *Arthanis wrote:*   

> Well, I was finally able to use nvidia-only with proprietary drivers. But before I mark this post as SOLVED, I will try to give it back to the community by summarizing all the experience and knowledge I got about this subject, because its not clear what all the options for optimus on linux are. Please if anyone see any error feel free to correct any misconception I may have had.
> 
> .
> 
> .
> ...

 

You, Sir, are a star. Without your post I would still be flailing about hopelessly with the NVIDIA Optimus hardware in a Clevo W230SS laptop I have just bought with the following graphics controllers:

```
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
```

```
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)
```

I have spent the last two days breaking my head trying to get X Windows working on this new laptop. I carefully followed the Gentoo Wiki article NVIDIA Driver with Optimus Laptops but X Windows would not find the screen. Then I followed your HowTo in your post of August 9, 2014 and have finally managed to get the laptop to display a KDE desktop. The KDM log-in screen has 'tiled' mini-screens, with the KDM login window in the top-left mini-screen, but, once I log-in, the KDE desktop is displayed correctly.

I have been a content AMD ATI user in the past, so this NVIDIA stuff is all new to me. You wrote that you can "switch manually between intel and nvidia at will". How do I switch manually between the Intel and NVIDIA controllers? Is there a command or commands I have to use?

EDIT April 21, 2015: Regarding the 'tiled mini-screens' on the KDM log-in screen, I found a post showing how to fix that. My xorg.conf now looks like the following:

```
Section "ServerLayout"

    Identifier     "Layout0"

    Screen      0  "nvidia" 0 0

    Inactive       "intel"

    InputDevice    "Keyboard0" "CoreKeyboard"

    InputDevice    "Mouse0" "CorePointer"

EndSection

#Section "Files"

#EndSection

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol"

    Option         "Device" "/dev/input/mice"

    Option         "Emulate3Buttons" "no"

    Option         "ZAxisMapping" "4 5"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    Option         "DPMS"

EndSection

Section "Device"

    Identifier     "nvidia"

    Driver         "nvidia"

    BusID          "PCI:1:0:0"

EndSection

Section "Device"

    Identifier     "intel"

    Driver         "modesetting"

    BusID          "PCI:0:2:0"

EndSection

Section "Screen"

    Identifier     "nvidia"

    Device         "nvidia"

    Monitor        "Monitor0"

    DefaultDepth    24

    Option         "UseDisplayDevice" "none"

    SubSection     "Display"

        Depth       24

#        Modes      "nvidia-auto-select"

        Virtual     1920 1080

    EndSubSection

EndSection

Section "Screen"

    Identifier     "intel"

    Device         "intel"

    Monitor        "Monitor0"

EndSection
```

----------

## Arthanis

Just to help others, here is how to switch between nvidia and intel:

Step 1: eselect the appropriate opengl backend (with eselect opengl [nvidia or xorg-x11])

Step 2: Change your .xinitrc accordingly: comment the first 2 lines for intel, uncomment for nvidia:

```

xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto

.

.

.

```

Step 3: Use the correct xorg.conf file.

For intel, it worked not having a xorg.conf file at all, but then I was having screen tearing problems (lack of vsync), so I had to add just a device section just to add some options:

```

Section "Device"

   Identifier  "Intel Graphics"

   Driver      "intel"

   Option      "AccelMethod" "sna"

   Option      "TearFree" "true"

EndSection

```

For nvidia:

```

Section "ServerLayout" 

Identifier   "Layout0" 

Screen 0   "nvidia" 

Inactive   "intel" 

EndSection 

Section "Monitor" 

Identifier   "Monitor0" 

Option   "DPMS" 

EndSection 

Section "Device" 

Identifier   "nvidia" 

Driver   "nvidia" 

BusID   "PCI:1:0:0" 

EndSection 

Section "Device" 

Identifier   "intel" 

Driver   "modesetting" 

BusID   "PCI:0:2:0" 

EndSection 

Section "Screen" 

Identifier   "nvidia" 

Device   "nvidia" 

Option   "UseDisplayDevice" "none" 

EndSection 

Section "Screen" 

Identifier   "intel" 

Device   "intel" 

Monitor   "Monitor0" 

EndSection 

```

Step 4: restart X

Just some more notes: nvidia alone doesn't have vsync and problably never will (at least until wayland support comes alive, if ever), they claim its a xorg implementation limitation. Another thing I cannot get to work is sound through HDMI, with either intel or nvidia. If someone can ever achieve this, plz pm me.

----------

## Holysword

Is it me or the current guides on how to use bumblebee are actually pretty bad? The ones I've found sound like "emerge bumblebee, problem solved, bye".

I am using systemd and I don't even know which services to activate. I mean, is there a service to activate? Or should I just add it to regular OpenRC?

I don't have a xorg.conf and my .xinit contains only "exec englightenment_start" so nothing imposing nvidia or intel particularly. eselect shows that I'm using xorg for OpenGL. Yet, when I start X it seems that it is using all of the cards at the same time, or just I don't understand what is going on!

```

[   546.957] 

X.Org X Server 1.16.4

Release Date: 2014-12-20

[   546.957] X Protocol Version 11, Revision 0

[   546.957] Build Operating System: Linux 3.17.8-gentoo-r1 x86_64 Gentoo

[   546.957] Current Operating System: Linux jarvis 3.17.8-gentoo-r1 #5 SMP Tue Apr 28 07:32:18 PDT 2015 x86_64

[   546.957] Kernel command line: BOOT_IMAGE=/vmlinuz-3.17.8-gentoo-r1 root=/dev/sda3 ro init=/usr/lib/systemd/systemd

[   546.957] Build Date: 25 April 2015  05:28:10PM

[   546.957]  

[   546.957] Current version of pixman: 0.32.6

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

        to make sure that you have the latest version.

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

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

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

[   546.958] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jul  6 18:07:02 2015

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

[   546.958] (==) No Layout section.  Using the first Screen section.

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

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

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

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

        Using a default monitor configuration.

[   546.958] (==) Automatically adding devices

[   546.958] (==) Automatically enabling devices

[   546.958] (==) Automatically adding GPU devices

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

[   546.958]    Entry deleted from font path.

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

[   546.958]    Entry deleted from font path.

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

[   546.958]    Entry deleted from font path.

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

[   546.958]    Entry deleted from font path.

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

[   546.958] (==) FontPath set to:

        /usr/share/fonts/misc/,

        /usr/share/fonts/100dpi/

[   546.958] (==) ModulePath set to "/usr/lib64/xorg/modules"

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

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

[   546.958] (II) Loader magic: 0x808d20

[   546.958] (II) Module ABI versions:

[   546.958]    X.Org ANSI C Emulation: 0.4

[   546.958]    X.Org Video Driver: 18.0

[   546.958]    X.Org XInput driver : 21.0

[   546.958]    X.Org Server Extension : 8.0

[   546.959] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31

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

[   546.960] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 8 paused 0

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

[   546.960] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 9 paused 0

[   546.961] (--) PCI:*(0:0:2:0) 8086:0416:103c:1966 rev 6, Mem @ 0xd3000000/4194304, 0xc0000000/268435456, I/O @ 0x00006000/64

[   546.961] (--) PCI: (0:1:0:0) 10de:1292:103c:1966 rev 161, Mem @ 0xd2000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00005000/128, BIOS @ 0x????????/524288

[   546.961] (II) LoadModule: "glx"

[   546.961] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so

[   546.963] (II) Module glx: vendor="X.Org Foundation"

[   546.963]    compiled for 1.16.4, module version = 1.0.0

[   546.963]    ABI class: X.Org Server Extension, version 8.0

[   546.963] (==) AIGLX enabled

[   546.963] (II) Applying OutputClass "nvidia" to /dev/dri/card1

[   546.963]    loading driver: nvidia

[   546.963] (==) Matched intel as autoconfigured driver 0

[   546.963] (==) Matched nvidia as autoconfigured driver 1

[   546.963] (==) Matched nouveau as autoconfigured driver 2

[   546.963] (==) Matched nv as autoconfigured driver 3

[   546.963] (==) Matched intel as autoconfigured driver 4

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

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

[   546.963] (==) Matched vesa as autoconfigured driver 7

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

[   546.963] (II) LoadModule: "intel"

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

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

[   546.963]    compiled for 1.16.4, module version = 2.99.917

[   546.963]    Module class: X.Org Video Driver

[   546.963]    ABI class: X.Org Video Driver, version 18.0

[   546.963] (II) LoadModule: "nvidia"

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

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

[   546.963]    compiled for 4.0.2, module version = 1.0.0

[   546.963]    Module class: X.Org Video Driver

[   546.964] (II) LoadModule: "nouveau"

[   546.964] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so

[   546.964] (II) Module nouveau: vendor="X.Org Foundation"

[   546.964]    compiled for 1.16.4, module version = 1.0.11

[   546.964]    Module class: X.Org Video Driver

[   546.964]    ABI class: X.Org Video Driver, version 18.0

[   546.964] (II) LoadModule: "nv"

[   546.964] (II) Loading /usr/lib64/xorg/modules/drivers/nv_drv.so

[   546.964] (II) Module nv: vendor="X.Org Foundation"

[   546.964]    compiled for 1.16.4, module version = 2.1.20

[   546.964]    Module class: X.Org Video Driver

[   546.964]    ABI class: X.Org Video Driver, version 18.0

[   546.964] (II) LoadModule: "modesetting"

[   546.964] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so

[   546.964] (II) Module modesetting: vendor="X.Org Foundation"

[   546.964]    compiled for 1.16.4, module version = 0.9.0

[   546.964]    Module class: X.Org Video Driver

[   546.964]    ABI class: X.Org Video Driver, version 18.0

[   546.964] (II) LoadModule: "fbdev"

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

[   546.964] (II) UnloadModule: "fbdev"

[   546.964] (II) Unloading fbdev

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

[   546.964] (II) LoadModule: "vesa"

[   546.964] (II) Loading /usr/lib64/xorg/modules/drivers/vesa_drv.so

[   546.964] (II) Module vesa: vendor="X.Org Foundation"

[   546.964]    compiled for 1.16.4, module version = 2.3.3

[   546.964]    Module class: X.Org Video Driver

[   546.964]    ABI class: X.Org Video Driver, version 18.0

[   546.964] (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

[   546.964] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000

[   546.964] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100

[   546.964] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300

[   546.964] (II) NVIDIA dlloader X Driver  352.21  Tue Jun  9 20:58:55 PDT 2015

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

[   546.964] (II) NOUVEAU driver 

[   546.964] (II) NOUVEAU driver for NVIDIA chipset families :

[   546.964]    RIVA TNT        (NV04)

[   546.964]    RIVA TNT2       (NV05)

[   546.964]    GeForce 256     (NV10)

[   546.965]    GeForce 2       (NV11, NV15)

[   546.965]    GeForce 4MX     (NV17, NV18)

[   546.965]    GeForce 3       (NV20)

[   546.965]    GeForce 4Ti     (NV25, NV28)

[   546.965]    GeForce FX      (NV3x)

[   546.965]    GeForce 6       (NV4x)

[   546.965]    GeForce 7       (G7x)

[   546.965]    GeForce 8       (G8x)

[   546.965]    GeForce GTX 200 (NVA0)

[   546.965]    GeForce GTX 400 (NVC0)

[   546.965] (II) NOUVEAU driver 

[   546.965] (II) NOUVEAU driver for NVIDIA chipset families :

[   546.965]    RIVA TNT        (NV04)

[   546.965]    RIVA TNT2       (NV05)

[   546.965]    GeForce 256     (NV10)

[   546.965]    GeForce 2       (NV11, NV15)

[   546.965]    GeForce 4MX     (NV17, NV18)

[   546.965]    GeForce 3       (NV20)

[   546.965]    GeForce 4Ti     (NV25, NV28)

[   546.965]    GeForce FX      (NV3x)

[   546.965]    GeForce 6       (NV4x)

[   546.965]    GeForce 7       (G7x)

[   546.965]    GeForce 8       (G8x)

[   546.965]    GeForce GTX 200 (NVA0)

[   546.965]    GeForce GTX 400 (NVC0)

[   546.965] (II) modesetting: Driver for Modesetting Kernel Drivers: kms

[   546.965] (II) VESA: driver for VESA chipsets: vesa

[   546.965] (++) using VT number 1

[   546.965] (--) controlling tty is VT number 1, auto-enabling KeepTty

[   546.965] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20140725

[   546.965] (EE) [drm] KMS not enabled

[   546.965] (EE) [drm] KMS not enabled

[   546.965] (WW) Falling back to old probe method for modesetting

[   546.965] (WW) Falling back to old probe method for vesa

[   546.965] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4600

[   546.965] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2

[   546.965] (II) intel(0): Creating default Display subsection in Screen section

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

[   546.965] (==) intel(0): Depth 24, (--) framebuffer bpp 32

[   546.965] (==) intel(0): RGB weight 888

[   546.965] (==) intel(0): Default visual is TrueColor

[   546.966] (II) intel(0): Output eDP1 has no monitor section

[   546.966] (--) intel(0): Found backlight control interface intel_backlight (type 'raw') for output eDP1

[   546.966] (II) intel(0): Enabled output eDP1

[   546.966] (II) intel(0): Output VGA1 has no monitor section

[   546.966] (II) intel(0): Enabled output VGA1

[   546.966] (II) intel(0): Output HDMI1 has no monitor section

[   546.966] (II) intel(0): Enabled output HDMI1

[   546.966] (--) intel(0): Using a maximum size of 256x256 for hardware cursors

[   546.966] (II) intel(0): Output VIRTUAL1 has no monitor section

[   546.966] (II) intel(0): Enabled output VIRTUAL1

[   546.966] (--) intel(0): Output eDP1 using initial mode 1920x1080 on pipe 0

[   546.966] (==) intel(0): TearFree disabled

[   546.966] (==) intel(0): DPI set to (96, 96)

[   546.966] (II) Loading sub module "dri2"

[   546.966] (II) LoadModule: "dri2"

[   546.966] (II) Module "dri2" already built-in

[   546.966] (II) Loading sub module "present"

[   546.966] (II) LoadModule: "present"

[   546.966] (II) Module "present" already built-in

[   546.966] (II) UnloadModule: "nvidia"

[   546.966] (II) Unloading nvidia

[   546.966] (II) UnloadModule: "vesa"

[   546.966] (II) Unloading vesa

[   546.966] (==) Depth 24 pixmap format is 32 bpp

[   546.966] (II) intel(0): SNA initialized with Haswell (gen7.5, gt2) backend

[   546.966] (==) intel(0): Backing store enabled

[   546.966] (==) intel(0): Silken mouse enabled

[   546.966] (II) intel(0): HW Cursor enabled

[   546.966] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.

[   546.966] (==) intel(0): DPMS enabled

[   546.966] (==) intel(0): display hotplug detection enabled

[   546.966] (II) intel(0): [DRI2] Setup complete

[   546.966] (II) intel(0): [DRI2]   DRI driver: i965

[   546.966] (II) intel(0): [DRI2]   VDPAU driver: i965

[   546.966] (II) intel(0): direct rendering: DRI2 enabled

[   546.966] (II) intel(0): hardware support for Present enabled

[   546.966] (--) RandR disabled

[   546.982] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer

[   546.982] (II) AIGLX: enabled GLX_ARB_create_context

[   546.982] (II) AIGLX: enabled GLX_ARB_create_context_profile

[   546.982] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile

[   546.982] (II) AIGLX: enabled GLX_INTEL_swap_event

[   546.982] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control

[   546.982] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB

[   546.982] (II) AIGLX: enabled GLX_ARB_fbconfig_float

[   546.982] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects

[   546.982] (II) AIGLX: enabled GLX_ARB_create_context_robustness

[   546.982] (II) AIGLX: Loaded and initialized i965

[   546.982] (II) GLX: Initialized DRI2 GL provider for screen 0

[   546.985] (II) intel(0): switch to mode 1920x1080@60.0 on eDP1 using pipe 0, position (0, 0), rotation normal, reflection none

[   546.993] (II) intel(0): Setting screen physical size to 508 x 285

[   547.010] (II) config/udev: Adding input device Power Button (/dev/input/event2)

[   547.010] (**) Power Button: Applying InputClass "evdev keyboard catchall"

[   547.010] (**) Power Button: Applying InputClass "joystick-all"

[   547.010] (II) LoadModule: "evdev"

[   547.010] (II) Loading /usr/lib64/xorg/modules/input/evdev_drv.so

[   547.011] (II) Module evdev: vendor="X.Org Foundation"

[   547.011]    compiled for 1.16.4, module version = 2.9.1

[   547.011]    Module class: X.Org XInput Driver

[   547.011]    ABI class: X.Org XInput driver, version 21.0

[   547.011] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 16 paused 0

[   547.011] (II) Using input driver 'evdev' for 'Power Button'

[   547.011] (**) Power Button: always reports core events

[   547.011] (**) evdev: Power Button: Device: "/dev/input/event2"

[   547.011] (--) evdev: Power Button: Vendor 0 Product 0x1

[   547.011] (--) evdev: Power Button: Found keys

[   547.011] (II) evdev: Power Button: Configuring as keyboard

[   547.011] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input2/event2"

[   547.011] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)

[   547.011] (**) Option "xkb_rules" "evdev"

[   547.011] (**) Option "xkb_model" "pc104"

[   547.011] (**) Option "xkb_layout" "us"

[   547.026] (II) config/udev: Adding input device Video Bus (/dev/input/event11)

[   547.026] (**) Video Bus: Applying InputClass "evdev keyboard catchall"

[   547.026] (**) Video Bus: Applying InputClass "joystick-all"

[   547.027] (II) systemd-logind: got fd for /dev/input/event11 13:75 fd 17 paused 0

[   547.027] (II) Using input driver 'evdev' for 'Video Bus'

[   547.027] (**) Video Bus: always reports core events

[   547.027] (**) evdev: Video Bus: Device: "/dev/input/event11"

[   547.027] (--) evdev: Video Bus: Vendor 0 Product 0x6

[   547.027] (--) evdev: Video Bus: Found keys

[   547.027] (II) evdev: Video Bus: Configuring as keyboard

[   547.027] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input12/event11"

[   547.027] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 7)

[   547.027] (**) Option "xkb_rules" "evdev"

[   547.027] (**) Option "xkb_model" "pc104"

[   547.027] (**) Option "xkb_layout" "us"

[   547.027] (II) config/udev: Adding input device Video Bus (/dev/input/event10)

[   547.027] (**) Video Bus: Applying InputClass "evdev keyboard catchall"

[   547.027] (**) Video Bus: Applying InputClass "joystick-all"

[   547.028] (II) systemd-logind: got fd for /dev/input/event10 13:74 fd 18 paused 0

[   547.028] (II) Using input driver 'evdev' for 'Video Bus'

[   547.028] (**) Video Bus: always reports core events

[   547.028] (**) evdev: Video Bus: Device: "/dev/input/event10"

[   547.028] (--) evdev: Video Bus: Vendor 0 Product 0x6

[   547.028] (--) evdev: Video Bus: Found keys

[   547.028] (II) evdev: Video Bus: Configuring as keyboard

[   547.028] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:4a/LNXVIDEO:00/input/input11/event10"

[   547.028] (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD, id 8)

[   547.028] (**) Option "xkb_rules" "evdev"

[   547.028] (**) Option "xkb_model" "pc104"

[   547.028] (**) Option "xkb_layout" "us"

[   547.028] (II) config/udev: Adding input device Power Button (/dev/input/event1)

[   547.028] (**) Power Button: Applying InputClass "evdev keyboard catchall"

[   547.028] (**) Power Button: Applying InputClass "joystick-all"

[   547.028] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 19 paused 0

[   547.028] (II) Using input driver 'evdev' for 'Power Button'

[   547.028] (**) Power Button: always reports core events

[   547.028] (**) evdev: Power Button: Device: "/dev/input/event1"

[   547.028] (--) evdev: Power Button: Vendor 0 Product 0x1

[   547.028] (--) evdev: Power Button: Found keys

[   547.028] (II) evdev: Power Button: Configuring as keyboard

[   547.028] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1/event1"

[   547.028] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 9)

[   547.028] (**) Option "xkb_rules" "evdev"

[   547.028] (**) Option "xkb_model" "pc104"

[   547.028] (**) Option "xkb_layout" "us"

[   547.029] (II) config/udev: Adding input device Lid Switch (/dev/input/event0)

[   547.029] (**) Lid Switch: Applying InputClass "joystick-all"

[   547.029] (II) No input driver specified, ignoring this device.

[   547.029] (II) This device may have been added with another device file.

[   547.029] (II) config/udev: Adding input device Logitech Gamepad F310 (/dev/input/event8)

[   547.029] (**) Logitech Gamepad F310: Applying InputClass "joystick-all"

[   547.029] (II) No input driver specified, ignoring this device.

[   547.029] (II) This device may have been added with another device file.

[   547.029] (II) config/udev: Adding input device Logitech Gamepad F310 (/dev/input/js0)

[   547.029] (**) Logitech Gamepad F310: Applying InputClass "joystick-all"

[   547.029] (II) No input driver specified, ignoring this device.

[   547.029] (II) This device may have been added with another device file.

[   547.030] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event4)

[   547.030] (**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall"

[   547.030] (**) Logitech USB Receiver: Applying InputClass "joystick-all"

[   547.030] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 20 paused 0

[   547.030] (II) Using input driver 'evdev' for 'Logitech USB Receiver'

[   547.030] (**) Logitech USB Receiver: always reports core events

[   547.030] (**) evdev: Logitech USB Receiver: Device: "/dev/input/event4"

[   547.030] (--) evdev: Logitech USB Receiver: Vendor 0x46d Product 0xc531

[   547.030] (--) evdev: Logitech USB Receiver: Found 20 mouse buttons

[   547.030] (--) evdev: Logitech USB Receiver: Found scroll wheel(s)

[   547.030] (--) evdev: Logitech USB Receiver: Found relative axes

[   547.030] (--) evdev: Logitech USB Receiver: Found x and y relative axes

[   547.030] (II) evdev: Logitech USB Receiver: Configuring as mouse

[   547.030] (II) evdev: Logitech USB Receiver: Adding scrollwheel support

[   547.030] (**) evdev: Logitech USB Receiver: YAxisMapping: buttons 4 and 5

[   547.030] (**) evdev: Logitech USB Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[   547.030] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/0003:046D:C531.0001/input/input5/event4"

[   547.030] (II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: MOUSE, id 10)

[   547.030] (II) evdev: Logitech USB Receiver: initialized for relative axes.

[   547.030] (**) Logitech USB Receiver: (accel) keeping acceleration scheme 1

[   547.030] (**) Logitech USB Receiver: (accel) acceleration profile 0

[   547.030] (**) Logitech USB Receiver: (accel) acceleration factor: 2.000

[   547.030] (**) Logitech USB Receiver: (accel) acceleration threshold: 4

[   547.030] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/mouse0)

[   547.030] (**) Logitech USB Receiver: Applying InputClass "joystick-all"

[   547.030] (II) No input driver specified, ignoring this device.

[   547.030] (II) This device may have been added with another device file.

[   547.031] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event5)

[   547.031] (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"

[   547.031] (**) Logitech USB Receiver: Applying InputClass "joystick-all"

[   547.031] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 21 paused 0

[   547.031] (II) Using input driver 'evdev' for 'Logitech USB Receiver'

[   547.031] (**) Logitech USB Receiver: always reports core events

[   547.031] (**) evdev: Logitech USB Receiver: Device: "/dev/input/event5"

[   547.031] (--) evdev: Logitech USB Receiver: Vendor 0x46d Product 0xc531

[   547.031] (--) evdev: Logitech USB Receiver: Found 1 mouse buttons

[   547.031] (--) evdev: Logitech USB Receiver: Found scroll wheel(s)

[   547.031] (--) evdev: Logitech USB Receiver: Found relative axes

[   547.031] (II) evdev: Logitech USB Receiver: Forcing relative x/y axes to exist.

[   547.031] (--) evdev: Logitech USB Receiver: Found absolute axes

[   547.031] (II) evdev: Logitech USB Receiver: Forcing absolute x/y axes to exist.

[   547.031] (--) evdev: Logitech USB Receiver: Found keys

[   547.031] (II) evdev: Logitech USB Receiver: Configuring as mouse

[   547.031] (II) evdev: Logitech USB Receiver: Configuring as keyboard

[   547.031] (II) evdev: Logitech USB Receiver: Adding scrollwheel support

[   547.031] (**) evdev: Logitech USB Receiver: YAxisMapping: buttons 4 and 5

[   547.031] (**) evdev: Logitech USB Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[   547.031] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.1/0003:046D:C531.0002/input/input6/event5"

[   547.031] (II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: KEYBOARD, id 11)

[   547.031] (**) Option "xkb_rules" "evdev"

[   547.031] (**) Option "xkb_model" "pc104"

[   547.031] (**) Option "xkb_layout" "us"

[   547.031] (II) evdev: Logitech USB Receiver: initialized for relative axes.

[   547.031] (WW) evdev: Logitech USB Receiver: ignoring absolute axes.

[   547.031] (**) Logitech USB Receiver: (accel) keeping acceleration scheme 1

[   547.031] (**) Logitech USB Receiver: (accel) acceleration profile 0

[   547.031] (**) Logitech USB Receiver: (accel) acceleration factor: 2.000

[   547.031] (**) Logitech USB Receiver: (accel) acceleration threshold: 4

[   547.032] (II) config/udev: Adding input device Logitech G700s Rechargeable Gaming Mouse (/dev/input/event6)

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: Applying InputClass "evdev pointer catchall"

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: Applying InputClass "joystick-all"

[   547.032] (II) systemd-logind: got fd for /dev/input/event6 13:70 fd 22 paused 0

[   547.032] (II) Using input driver 'evdev' for 'Logitech G700s Rechargeable Gaming Mouse'

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: always reports core events

[   547.032] (**) evdev: Logitech G700s Rechargeable Gaming Mouse: Device: "/dev/input/event6"

[   547.032] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Vendor 0x46d Product 0xc07c

[   547.032] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found 20 mouse buttons

[   547.032] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found scroll wheel(s)

[   547.032] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found relative axes

[   547.032] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found x and y relative axes

[   547.032] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Configuring as mouse

[   547.032] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Adding scrollwheel support

[   547.032] (**) evdev: Logitech G700s Rechargeable Gaming Mouse: YAxisMapping: buttons 4 and 5

[   547.032] (**) evdev: Logitech G700s Rechargeable Gaming Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[   547.032] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:046D:C07C.0003/input/input7/event6"

[   547.032] (II) XINPUT: Adding extended input device "Logitech G700s Rechargeable Gaming Mouse" (type: MOUSE, id 12)

[   547.032] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: initialized for relative axes.

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) keeping acceleration scheme 1

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) acceleration profile 0

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) acceleration factor: 2.000

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) acceleration threshold: 4

[   547.032] (II) config/udev: Adding input device Logitech G700s Rechargeable Gaming Mouse (/dev/input/mouse1)

[   547.032] (**) Logitech G700s Rechargeable Gaming Mouse: Applying InputClass "joystick-all"

[   547.032] (II) No input driver specified, ignoring this device.

[   547.032] (II) This device may have been added with another device file.

[   547.033] (II) config/udev: Adding input device Logitech G700s Rechargeable Gaming Mouse (/dev/input/event7)

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: Applying InputClass "evdev keyboard catchall"

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: Applying InputClass "joystick-all"

[   547.033] (II) systemd-logind: got fd for /dev/input/event7 13:71 fd 23 paused 0

[   547.033] (II) Using input driver 'evdev' for 'Logitech G700s Rechargeable Gaming Mouse'

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: always reports core events

[   547.033] (**) evdev: Logitech G700s Rechargeable Gaming Mouse: Device: "/dev/input/event7"

[   547.033] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Vendor 0x46d Product 0xc07c

[   547.033] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found 1 mouse buttons

[   547.033] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found scroll wheel(s)

[   547.033] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found relative axes

[   547.033] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Forcing relative x/y axes to exist.

[   547.033] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found absolute axes

[   547.033] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Forcing absolute x/y axes to exist.

[   547.033] (--) evdev: Logitech G700s Rechargeable Gaming Mouse: Found keys

[   547.033] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Configuring as mouse

[   547.033] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Configuring as keyboard

[   547.033] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: Adding scrollwheel support

[   547.033] (**) evdev: Logitech G700s Rechargeable Gaming Mouse: YAxisMapping: buttons 4 and 5

[   547.033] (**) evdev: Logitech G700s Rechargeable Gaming Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

[   547.033] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.1/0003:046D:C07C.0004/input/input8/event7"

[   547.033] (II) XINPUT: Adding extended input device "Logitech G700s Rechargeable Gaming Mouse" (type: KEYBOARD, id 13)

[   547.033] (**) Option "xkb_rules" "evdev"

[   547.033] (**) Option "xkb_model" "pc104"

[   547.033] (**) Option "xkb_layout" "us"

[   547.033] (II) evdev: Logitech G700s Rechargeable Gaming Mouse: initialized for relative axes.

[   547.033] (WW) evdev: Logitech G700s Rechargeable Gaming Mouse: ignoring absolute axes.

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) keeping acceleration scheme 1

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) acceleration profile 0

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) acceleration factor: 2.000

[   547.033] (**) Logitech G700s Rechargeable Gaming Mouse: (accel) acceleration threshold: 4

[   547.034] (II) config/udev: Adding input device HP Truevision HD (/dev/input/event9)

[   547.034] (**) HP Truevision HD: Applying InputClass "evdev keyboard catchall"

[   547.034] (**) HP Truevision HD: Applying InputClass "joystick-all"

[   547.034] (II) systemd-logind: got fd for /dev/input/event9 13:73 fd 24 paused 0

[   547.034] (II) Using input driver 'evdev' for 'HP Truevision HD'

[   547.034] (**) HP Truevision HD: always reports core events

[   547.034] (**) evdev: HP Truevision HD: Device: "/dev/input/event9"

[   547.034] (--) evdev: HP Truevision HD: Vendor 0x5c8 Product 0x361

[   547.034] (--) evdev: HP Truevision HD: Found keys

[   547.034] (II) evdev: HP Truevision HD: Configuring as keyboard

[   547.034] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-7/3-7:1.0/input/input10/event9"

[   547.034] (II) XINPUT: Adding extended input device "HP Truevision HD" (type: KEYBOARD, id 14)

[   547.034] (**) Option "xkb_rules" "evdev"

[   547.034] (**) Option "xkb_model" "pc104"

[   547.034] (**) Option "xkb_layout" "us"

[   547.034] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)

[   547.034] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"

[   547.034] (**) AT Translated Set 2 keyboard: Applying InputClass "joystick-all"

[   547.035] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 25 paused 0

[   547.035] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'

[   547.035] (**) AT Translated Set 2 keyboard: always reports core events

[   547.035] (**) evdev: AT Translated Set 2 keyboard: Device: "/dev/input/event3"

[   547.035] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1

[   547.035] (--) evdev: AT Translated Set 2 keyboard: Found keys

[   547.035] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard

[   547.035] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input3/event3"

[   547.035] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 15)

[   547.035] (**) Option "xkb_rules" "evdev"

[   547.035] (**) Option "xkb_model" "pc104"

[   547.035] (**) Option "xkb_layout" "us"
```

EDIT#1: Found a good guide in these two links:

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

https://cjenkins.wordpress.com/2013/01/01/steam-for-linux-on-optimus-enabled-computer-running-ubuntu-12-04-64bits/

Still having some troubles though...

----------

