# Using the intel driver with Optimus card

## Yopaku

Hello, I didn't get it running on my own so I have to bother you guys, sorry

My notebook has a Nvidia Optimus card. It seems to be tedious to set everything up correctly, so I'm fine with just using the built in intel graphics. I actually did the same on Arch and my notebook was very quiet, the intel graphics really are sufficient for my needs.

I first tried it with nouveau and later with the nvidia-drivers, but because it didn't work I just put intel in my VIDEO_CARDS in the make.conf now.

Edit: Here is the output of lspci

```
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 GF106M [GeForce GT 555M] (rev a1)
```

Below is the Xorg.log and my make.conf

/var/log/Xorg.0.log: http://bpaste.net/show/206053

make.conf: http://bpaste.net/show/206054

I also tried running X -configure which gave me a rather strange error, I guess

X -configure: http://bpaste.net/show/206055

I hope someone can help me.

Thanks

Yopaku

----------

## chithanh

The Intel driver uses KMS. X -configure does not work with KMS. Just start the X server with no xorg.conf at all, it should detect everything automatically. Then "xrandr --listproviders" should list both intel and nouveau, as long as you have the DRM_I915 and DRM_NOUVEAU kernel options enabled, and xf86-video-intel and xf86-video-nouveau installed.

If you want to use the proprietary driver, see https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops

----------

## Yopaku

 *chithanh wrote:*   

> The Intel driver uses KMS. X -configure does not work with KMS. Just start the X server with no xorg.conf at all, it should detect everything automatically. Then "xrandr --listproviders" should list both intel and nouveau, as long as you have the DRM_I915 and DRM_NOUVEAU kernel options enabled, and xf86-video-intel and xf86-video-nouveau installed.
> 
> If you want to use the proprietary driver, see https://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops

 

Thanks for your reply.

I tried it with startx. How do I start it without a config? I also tried to run just xrandr, got "no display" if I remember right.

Built my kernel with "genkernel all", so I should have DRM_I915 and DRM_NOUVEAU.

Edit: I also tried startx with another user, get "no screens".

----------

## chithanh

Verify that DRM_I915_KMS kernel option is enabled and /proc/fb contains inteldrmfb.

For startx to work, you need to set XSESSION to an installed window manager or desktop environment (default are twm+xterm). See https://wiki.gentoo.org/wiki/Xorg/Configuration#Using_startx

It is probably better to start kdm/gdm/... through /etc/init.d/xdm

----------

## Yopaku

Could you tell me how to verify this (DRM_I915_KMS)?

/proc/fb only contains

```
0 VESA VGA
```

I use a .xinitrc which contains (exec awesome). I don't intend to use a display manager, but I installed xdm to see if it maybe works. I just got a black screen with a blinking cursor.

Also: The terminal output seems very very slow. When I scroll in a man page it takes quite a while. Is there a way to fix this? I installed Gentoo before in a VM and didn't have this problem (and X worked right away)

----------

## chithanh

VESA VGA is bad. It means that you use vesafb, and that you have vga=... kernel parameter. Both do not mix with modern X.org/KMS setup.

Check in genkernel --menuconfig that kernel modesetting is enabled for intel.

----------

## Yopaku

Thank you! That did it, it's working now

----------

