# KMS on i915 neutral?

## Pilsner

Hello.

Just installed Gentoo on HP Eliteboot 8440p. Video runs on Intel GMA. Want to implement KMS but it does not seem to work. Dmesg does not say anything on modesetting, neither "userspace" nor "kernel". Video driver is i915. Followed all instructions in Gentoo Wiki but still no joy.

Any help is much appreciated.

dmesg |grep -e i915 -e drm

```
intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled

[drm] Initialized drm 1.1.0 20060810

i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

i915 0000:00:02.0: setting latency timer to 64

i915 0000:00:02.0: irq 47 for MSI/MSI-X

[drm] set up 31M of stolen space

fb0: inteldrmfb frame buffer device

drm: registered panic notifier

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

```

uname -a

```
Linux gent 2.6.36-gentoo-r1 #2 Sat Nov 20 00:42:56 MSK 2010 x86_64 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz GenuineIntel GNU/Linux
```

emerge --info

```
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r1 x86_64)

=================================================================

System uname: Linux-2.6.36-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5_CPU_M_540_@_2.53GHz-with-gentoo-1.12.14

Timestamp of tree: Tue, 23 Nov 2010 18:00:01 +0000

app-shells/bash:     4.1_p7

dev-lang/python:     2.6.5-r3, 3.1.2-r4

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 1.12.14-r1

sys-apps/sandbox:    2.3-r1

sys-devel/autoconf:  2.13, 2.65-r1

sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.4-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=core2 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=core2 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LANG="ru_RU.UTF-8"

LC_ALL=""

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="ru"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk hal iconv jpeg kde lcms libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd python qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

lcpci

```
00:00.0 Host bridge: Intel Corporation Arrandale DRAM Controller (rev 12)

00:02.0 VGA compatible controller: Intel Corporation Arrandale Integrated Graphics Controller (rev 12)

00:16.0 Communication controller: Intel Corporation Ibex Peak HECI Controller (rev 06)

00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 06)

00:1a.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 06)

00:1b.0 Audio device: Intel Corporation Ibex Peak High Definition Audio (rev 06)

00:1c.0 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 1 (rev 06)

00:1c.1 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 2 (rev 06)

00:1c.3 PCI bridge: Intel Corporation Ibex Peak PCI Express Root Port 4 (rev 06)

00:1d.0 USB Controller: Intel Corporation Ibex Peak USB2 Enhanced Host Controller (rev 06)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)

00:1f.0 ISA bridge: Intel Corporation Ibex Peak LPC Interface Controller (rev 06)

00:1f.2 SATA controller: Intel Corporation Ibex Peak 6 port SATA AHCI Controller (rev 06)

00:1f.6 Signal processing controller: Intel Corporation Ibex Peak Thermal Subsystem (rev 06)

43:00.0 Network controller: Intel Corporation Device 4239 (rev 35)

44:06.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 06)

44:06.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 25)

44:06.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 14)

44:06.3 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev bb)

ff:00.0 Host bridge: Intel Corporation QuickPath Architecture Generic Non-core Registers (rev 02)

ff:00.1 Host bridge: Intel Corporation QuickPath Architecture System Address Decoder (rev 02)

ff:02.0 Host bridge: Intel Corporation QPI Link 0 (rev 02)

ff:02.1 Host bridge: Intel Corporation QPI Physical 0 (rev 02)

ff:02.2 Host bridge: Intel Corporation Device 2d12 (rev 02)

ff:02.3 Host bridge: Intel Corporation Device 2d13 (rev 02
```

xconfig http://i56.tinypic.com/2j49j40.png

----------

## VoidMage

Pastebin a bigger fraction of dmesg output and xorg log.

Anyway, any recent intel driver is KMS-only.

----------

## Pilsner

Here, 

* dmesg http://pastebin.com/cj6kytax

* Xorg.0.log http://pastebin.com/qc7f3BTR

Seems like KMS is not activated, since there are no "modelines" records. However, it does not also say "defaulting to userspace modesetting". I event tried to add "i915.modeset=1" tp grub menu, but also did not help at all.

----------

## idella4

Pilsner,

help me out here.  What is it exactly you want to see occur, as in kms output in dmesg or xorg?

Something like

```

idella@genny ~/Documents $ sudo grep -e i915 -e drm /var/log/Xorg.0.log

[    18.341] drmOpenDevice: node name is /dev/dri/card0

[    18.341] drmOpenDevice: open result is 7, (OK)

[    18.341] drmOpenByBusid: Searching for BusID pci:0000:02:00.0

[    18.341] drmOpenDevice: node name is /dev/dri/card0

[    18.342] drmOpenDevice: open result is 7, (OK)

[    18.342] drmOpenByBusid: drmOpenMinor returns 7

[    18.342] drmOpenByBusid: Interface 1.4 failed, trying 1.1

[    18.342] drmOpenByBusid: drmGetBusid reports pci:0000:02:00.0

[    18.342] (II) [drm] nouveau interface version: 0.0.16

[    18.342] drmOpenDevice: node name is /dev/dri/card0

[    18.342] drmOpenDevice: open result is 8, (OK)

[    18.342] drmOpenDevice: node name is /dev/dri/card0

[    18.342] drmOpenDevice: open result is 8, (OK)

[    18.342] drmOpenByBusid: Searching for BusID pci:0000:02:00.0

[    18.342] drmOpenDevice: node name is /dev/dri/card0

[    18.342] drmOpenDevice: open result is 8, (OK)

[    18.342] drmOpenByBusid: drmOpenMinor returns 8

[    18.342] drmOpenByBusid: Interface 1.4 failed, trying 1.1

[    18.342] drmOpenByBusid: drmGetBusid reports pci:0000:02:00.0

[    18.342] (II) [drm] DRM interface version 1.3

[    18.342] (II) [drm] DRM open master succeeded.
```

??

  Also could you paste the link th the guide so I can follow what you've done.

What is this setting in your config?

 *Quote:*   

> 
> 
> │ │    [ ] Laptop Hybrid Graphics - GPU switching support                       │ │   
> 
>   │ │    < > Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->│ │   
> ...

 

----------

## Pilsner

I was hoping to see messages in dmesg that would indicate that KMS is enabled: i. e. that kernel sets modelines. But there is nothing like that in dmesg.

I followed Gentoo Wiki page http://en.gentoo-wiki.com/wiki/Intel_GMA.

----------

## idella4

Pilsner

you are looking in the wrong log.

Do grep -e i915 -e drm /var/log/messages, I get a list a mile long. e.g.

```
: parent: 'drm', set: '<NULL>'

Nov 24 23:07:52 genny kernel: [   24.953332] [drm] nouveau 0000:02:00.0: Allocating FIFO number 2

Nov 24 23:07:52 genny kernel: [   24.957224] [drm] nouveau 0000:02:00.0: nouveau_channel_alloc: initialised FIFO 2

Nov 24 23:08:55 genny kernel: [   88.055443] [drm] nouveau 0000:02:00.0: nouveau_channel_free: freeing fifo 2

Nov 24 23:09:27 genny kernel: [  119.455504] [drm] nouveau 0000:02:00.0: Allocating FIFO number 2

Nov 24 23:09:27 genny kernel: [  119.459393] [drm] nouveau 0000:02:00.0: nouveau_channel_alloc: initialised FIFO 2

```

I would suggest to do a test,  remove your intel video card settings and insert settings for nouveau, but that requires my nvidia card.  I'm not convinced you have a deficit.

Tell us what is in messages, and that requires syslog-ng if you don't have it already.

----------

## Pilsner

grep -e i915 -e drm /var/log/messages

```
Nov 24 10:03:07 gent kernel: intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled

Nov 24 10:03:07 gent kernel: [drm] Initialized drm 1.1.0 20060810

Nov 24 10:03:07 gent kernel: i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

Nov 24 10:03:07 gent kernel: i915 0000:00:02.0: setting latency timer to 64

Nov 24 10:03:07 gent kernel: i915 0000:00:02.0: irq 47 for MSI/MSI-X

Nov 24 10:03:07 gent kernel: [drm] set up 31M of stolen space

Nov 24 10:03:07 gent kernel: fb0: inteldrmfb frame buffer device

Nov 24 10:03:07 gent kernel: drm: registered panic notifier

Nov 24 10:03:07 gent kernel: [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

Nov 24 19:25:09 gent kernel: intel ips 0000:00:1f.6: failed to get i915 symbols, graphics turbo disabled

Nov 24 19:25:09 gent kernel: [drm] Initialized drm 1.1.0 20060810

Nov 24 19:25:09 gent kernel: i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16

Nov 24 19:25:09 gent kernel: i915 0000:00:02.0: setting latency timer to 64

Nov 24 19:25:09 gent kernel: i915 0000:00:02.0: irq 45 for MSI/MSI-X

Nov 24 19:25:09 gent kernel: [drm] set up 31M of stolen space

Nov 24 19:25:09 gent kernel: fb0: inteldrmfb frame buffer device

Nov 24 19:25:09 gent kernel: drm: registered panic notifier

Nov 24 19:25:09 gent kernel: [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
```

With previous laptop on Xpress 200m ATI chipset log messages clearly indicated whether KMS is activated or not: i. e. modesetting in userspace or kernel. Now, such information is just not printed out.

----------

## EatMeerkats

KMS is required to run X with the latest intel drivers, so if you can run X, you are using KMS.  Does your kernel config include CONFIG_DRM_I915_KMS=y?

----------

## Pilsner

 *Quote:*   

> KMS is required to run X with the latest intel drivers, so if you can run X, you are using KMS

 

Do you mean xf86-video-intel package?

 *Quote:*   

> CONFIG_DRM_I915_KMS=y?

 

Yes, just like that.

----------

## idella4

Pilsner,

I'm thinking more & more this is a storm in a tea cup.  EatMeerkats is saying, if you're in graphical, then all is well, it proves that kms is operative. I'm pretty sure.  Either way, if you haven't installed the xf86 -video driver, then do so & try it out.

You have the kernel settings from the guide summarized in a dozen lines.  Are you looking for something that isn't there?

All indicates you have kms operative.

----------

## Pilsner

After all seems that it is. I was a bit puzzled that unlike "radeon" driver "intel" did not announce clearly which stage KMS is during startup.

Here is how "radeon" driver announces KMS and modelines:

```
[drm] Initialized drm 1.1.0 20060810

[drm] radeon defaulting to kernel modesetting.

[drm] radeon kernel modesetting enabled.

[drm] initializing kernel modesetting (RS480 0x1002:0x5955).

[drm] register mmio base: 0xD8300000

[drm] register mmio size: 65536

[drm] Generation 2 PCI interface, using max accessible memory

[drm] radeon: irq initialized.

[drm] Detected VRAM RAM=128M, BAR=256M

[drm] RAM width 128bits DDR

[drm] radeon: 128M of VRAM memory ready

[drm] radeon: 512M of GTT memory ready.

[drm] GART: num cpu pages 131072, num gpu pages 131072

[drm] radeon: 2 quad pipes, 1 z pipes initialized.

[drm] Loading R300 Microcode

[drm] radeon: ring at 0x0000000060000000

[drm] ring test succeeded in 2 usecs

[drm] radeon: ib pool ready.

[drm] ib test succeeded in 0 usecs

[drm] Panel ID String: LGP                     

[drm] Panel Size 1400x1050

[drm] Radeon Display Connectors

[drm] Connector 0:

[drm]   VGA

[drm]   DDC: 0x68 0x68 0x68 0x68 0x68 0x68 0x68 0x68

[drm]   Encoders:

[drm]     CRT1: INTERNAL_DAC2

[drm] Connector 1:

[drm]   LVDS

[drm]   DDC: 0x198 0x198 0x19c 0x19c 0x1a0 0x1a0 0x1a4 0x1a4

[drm]   Encoders:

[drm]     LCD1: INTERNAL_LVDS

[drm] Connector 2:

[drm]   S-video

[drm]   Encoders:

[drm]     TV1: INTERNAL_DAC2

[drm] radeon: power management initialized

[drm] fb mappable at 0xC0040000

[drm] vram apper at 0xC0000000

[drm] size 3145728

[drm] fb depth is 24

[drm]    pitch is 4096

fb0: radeondrmfb frame buffer device

drm: registered panic notifier

[drm] Initialized radeon 2.6.0 20080528 for 0000:01:05.0 on minor 0
```

However, looks like my "intel" driver however runs on KMS, because when I added "nomodeset" option to GRUB config file my X did not start up and console came with default screen size instead of "1024x768" as I set in GRUB's menu.lst.

----------

## chithanh

 *Quote:*   

> fb0: inteldrmfb frame buffer device 

 This means that KMS is enabled and working (from the kernel side at least).

----------

