You are not logged in.

#1 2009-04-04 13:06:51

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

KMS is still a bit buggy in 2.6.29, so we didn't enable it by default. It can be enabled by the user, but it is a bit tricky right now. Note that KMS right now only works with chipsets that use the i915 DRM driver. Also make sure you use the latest Xorg package from testing (including xf86-video-intel) - I think they are moving to extra today, but they might still be in testing on your mirror.

Method 1: Enable KMS "late". This doesn't change the initramfs, but your console changes resolution in the "Load Modules" step of the boot process:

1) Add the following line to /etc/modprobe.conf:

options i915 modeset=1

2) Change the MODULES line in /etc/rc.conf to look like this (Don't actually add the "...", it stands for what was there before):

MODULES=(... intel_agp i915)

This is important. If you don't do it like this, the i915 driver will be loaded when the X server launches and things will crash. The i915 module is not autoloaded with our kernel configuration (which is weird, but we can't change it).
3) Remove all "vga=" and "video=" options from your kernel commandline in /boot/grub/menu.lst

Method 2: Enable KMS "early". You need to change the initramfs, KMS will enable right after the kernel has booted and before the Arch initscripts take over (looks nicer)

1) Add the following line to /etc/modprobe.conf:

options i915 modeset=1

2) Change the MODULES and FILES lines in /etc/mkinitcpio.conf to look like this (Don't actually add the "...", it stands for what was there before):

MODULES="... intel_agp i915"
FILES="... /etc/modprobe.conf"

3) Regenerate your initramfs using "mkinitcpio -p kernel26"
3) Remove all "vga=" and "video=" options from your kernel commandline in /boot/grub/menu.lst

You should now get a framebuffer in your native resolution, X will launch faster and console switching will work almost instantly. To disable modesetting again (in case something is broken for you), just comment the line in modprobe.conf again (and if you used method 2, regenerate your initramfs again).


EDIT: With the new module-init-tools 3.8, all occurrences of /etc/modprobe.conf must be replaced with /etc/modprobe.d/modprobe.conf. Or you can create a separate file /etc/modprobe.d/kms.conf.

Last edited by brain0 (2009-06-11 17:30:48)

Offline

#2 2009-04-04 14:10:18

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Nice howto. I'll give it a try as soon as the kernel is uploaded to [extra] smile


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#3 2009-04-04 14:13:29

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,357
Website

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Here is my guide:  http://bbs.archlinux.org/viewtopic.php? … 65#p522665   Does the same thing but allows you to have easily a separate grub entry to test this out.

Offline

#4 2009-04-04 15:11:40

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Allan wrote:

Here is my guide:  http://bbs.archlinux.org/viewtopic.php? … 65#p522665   Does the same thing but allows you to have easily a separate grub entry to test this out.

Yours is trully good, I have to recompile the kernel though.


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#5 2009-04-09 10:07:51

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 636

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Thanks, nice and easy guide. Works fine here (945GM)


Excuse my poor English.

Offline

#6 2009-04-09 10:18:11

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

There is a lot said about KMS but can someone explain to me why KMS is good or bad? I have a Intel 945GSE chipset so I guess it can be useful for me.

Offline

#7 2009-04-09 10:29:56

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Wilco wrote:

There is a lot said about KMS but can someone explain to me why KMS is good or bad? I have a Intel 945GSE chipset so I guess it can be useful for me.

KMS bad: on some cards/with some driver versions doesn't work (corrupted screen output, comp freezes)
KMS good: from the kernel infrastructure side: a lot of cleanup, one graphics driver for both console and X (so no need for extra framebuffer stuff); from the user side: quick switching between consoles and X, and in X another acceleration mode (namely DRI2 / UXA) accessible

By the way, http://kernelnewbies.org/LinuxChanges is usually pretty digestible.

EDIT: typos
EDIT2: totally forgot why I went to this thread: THANKS for the guide!

Last edited by bender02 (2009-04-09 10:33:28)

Offline

#8 2009-04-09 12:32:13

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Is there a way to use ONLY xorg and xf86-video-intel from testing and the other packages from the normal repository?

Offline

#9 2009-04-09 19:17:04

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

not entirely related to KMS, but does anyone know if and when xorg-server 1.6 will leave testing? i have been waiting for it eagerly but do not want to update against the *entire* testing repo, and i read that just picking xorg-server from testing is not reccomended.....

S.


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#10 2009-04-09 20:17:49

edubarr
Member
Registered: 2009-03-25
Posts: 19

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Thanks for the tip, just tried it out with the latest kernel from testing and it works fine. I was putting it off so that I could recompile it using my custom config, the way I did with the previous kernel. It doesn't make a lot of sense though, since my only 'customization' was enabling KMS.

@stefan1975
I installed only xorg-server and xf86-input that I needed from testing and didn't have any trouble at all. It will get the dependencies it needs for things like mesa and dri but that's it. Just make sure that the testing repo is the last one on your pacman.conf, this way you can install the stuff you need using the 'pacman -Sy testing/packagename' way.

Last edited by edubarr (2009-04-09 20:19:06)

Offline

#11 2009-04-09 20:49:55

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

These things should go into intel's wiki page. (I'm too lazy to add them myself)

Last edited by Dheart (2009-04-09 20:50:16)


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#12 2009-04-09 21:36:22

Denacke
Member
Registered: 2008-04-09
Posts: 106

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Thanks, worked excellent here!

Offline

#13 2009-04-09 21:38:05

CaptainShanks
Member
Registered: 2008-10-25
Posts: 57

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Wow, thank you very much big_smile I'm only having a sligt problem whenever Compiz gets enabled (White Screen) but otherwise, everything is working spiffy.

Offline

#14 2009-04-09 21:58:24

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

[offtopic] Can that be done with xf86-video-ati as well ? with different options of course... [/offtopic]

Offline

#15 2009-04-09 23:26:03

edubarr
Member
Registered: 2009-03-25
Posts: 19

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

flamelab wrote:

[offtopic] Can that be done with xf86-video-ati as well ? with different options of course... [/offtopic]

AFAIK there's a kernel-kms package in AUR especifically for ATI with KMS enabled. It patches the kernel with the necessary files since the current kernel does not support it yet.

Offline

#16 2009-04-10 00:07:57

blacklake
Member
Registered: 2009-04-04
Posts: 5

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

And for NVidia driver? KMS isn't supported yet?

I heard some news at Phoronix of a NVidia driver KMS-enabled on Fedora 11...

Offline

#17 2009-04-10 02:58:02

edubarr
Member
Registered: 2009-03-25
Posts: 19

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

I just ran into a small issue here. My laptop does not hibernate properly now. It used to work with my old custom kernel (with the i915  built in). I'm currently running an old version of the intel-git drivers, so I don't know if there was any new patch in arch's kernel that caused this to malfunction, or if I need to set anything when comming out of hibernation for the system not to hang. I'll post more details after I find more info on this issue.

Offline

#18 2009-04-10 03:08:49

Cypher
Member
From: Coquimbo, Chile
Registered: 2007-04-14
Posts: 67

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

1.- works fine with splasy ??

2.- anyone here using kdm4+xorg-server1.6+intelx3100+kms ?, cause kdm4 show artifacts to me :-/

Offline

#19 2009-04-10 07:24:28

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

edubarr wrote:

@stefan1975
I installed only xorg-server and xf86-input that I needed from testing and didn't have any trouble at all. It will get the dependencies it needs for things like mesa and dri but that's it. Just make sure that the testing repo is the last one on your pacman.conf, this way you can install the stuff you need using the 'pacman -Sy testing/packagename' way.

Thanks! That answered my question as well

Offline

#20 2009-04-10 21:40:18

Le_J
Member
From: Mountain View, CA
Registered: 2009-01-03
Posts: 10

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Cypher wrote:

2.- anyone here using kdm4+xorg-server1.6+intelx3100+kms ?, cause kdm4 show artifacts to me :-/

kdm4 shows artifacts for me too, but: kdm4+xorg-server1.5.3+nvidia. I have no idea how to remove them. Have you managed it ?

Offline

#21 2009-04-10 23:06:32

edubarr
Member
Registered: 2009-03-25
Posts: 19

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

I couldn't find anything that would help me in fixing the hibernation issue so I tried it out with the intel drivers in testing (2.6.99-902) and now everything works fine. I really don't have a clue why that happens, especially since it didn't work properly before and that's why I went with the git version... Anyway, using all packages from arch works for me now -- it makes it easier for me to keep my system up-to-date this way. smile

Offline

#22 2009-04-11 02:53:26

Cypher
Member
From: Coquimbo, Chile
Registered: 2007-04-14
Posts: 67

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Le_J wrote:
Cypher wrote:

2.- anyone here using kdm4+xorg-server1.6+intelx3100+kms ?, cause kdm4 show artifacts to me :-/

kdm4 shows artifacts for me too, but: kdm4+xorg-server1.5.3+nvidia. I have no idea how to remove them. Have you managed it ?

im going to report this as a bug tongue, think that is the best.

Offline

#23 2009-04-11 07:11:34

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 628

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

blacklake wrote:

And for NVidia driver? KMS isn't supported yet?

I heard some news at Phoronix of a NVidia driver KMS-enabled on Fedora 11...

You can find some info about KMS support in nVidia proprietary driver here.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#24 2009-04-11 17:49:25

ColdPie
Member
Registered: 2007-09-18
Posts: 47

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

Thanks for the guide, it worked great on my laptop.  I'm loving how much better the console looks (was using an incorrect resolution vga line because i couldn't be bothered to fix it) and how fast switching between X and vterms is.  Can't wait for nouveau to hit stride so I can have KMS on my desktop too smile

Offline

#25 2009-04-11 19:00:21

dakor
Member
Registered: 2004-03-19
Posts: 107

Re: HOWTO: Enable KMS with the stock 2.6.29-ARCH kernel

I have a X4500HD and just enabled kms.  With KMS and UXA enabled everything works. If I try to use EXA and then startx I get get a black screen that flickers.


freenode.net  #linuxn00b

Offline

Board footer

Powered by FluxBB