You are not logged in.

#1 2008-10-03 08:55:27

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 305

Kernel based mode setting

Hi,

I've recently come accross the term "Kernel based mode setting", which is for video cards.

As a person who used to enjoy rendering graphics in MS-DOS a long time ago, I've always wondered: Why can't I just go to video mode 13h with the linux kernel and directly plot pixels???

Is that one of the things that will be possible thanks to this kernel based mode setting that will likely arrive some day?

I also read that it turns out to be difficult to make, namely that it works only for some specific NVidia cards and if you're lucky maybe also a few Radeon cards. However, it was already possible in DOS so long ago, and I've seen executables handcrafted in assembly that can still do it now when ran in Windows, so I'd think that there isn't much video card specific about this, or is there?

Last edited by aardwolf (2008-10-03 09:04:29)

Offline

#2 2008-12-22 08:57:15

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: Kernel based mode setting

Yes how is this being progressed? Since the new kernel (2.6.28) is being released in just a couple of days wouldn't a wiki article be a good idea?

Offline

#3 2008-12-22 19:32:19

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: Kernel based mode setting

aardwolf wrote:

As a person who used to enjoy rendering graphics in MS-DOS a long time ago, I've always wondered: Why can't I just go to video mode 13h with the linux kernel and directly plot pixels???

Is that one of the things that will be possible thanks to this kernel based mode setting that will likely arrive some day?

i always wondered the same thing, specifically why the kernel doesnt call int13h at bootup (using  a vesa module maybe? dont all video cards nowadays have vesa built-in compatibility?).  i know for other architectures outside of x86/64 vesa and even video may not be available, but as a boot option or module it could work, right?  I remember seeing a framebuffer device used on the kernel, and that allowed changing modes at boot.  whatever happened to that?  and why was it never integrated to load X?

questions are all i have. hmm


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#4 2008-12-25 09:24:25

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: Kernel based mode setting

Yeah so now the kernel is released.. anyone know how to get this going. Awecourse I have a intel gpu tongue smile

Offline

#5 2008-12-25 09:47:36

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

Re: Kernel based mode setting

Tigertailz wrote:

Yeah so now the kernel is released.. anyone know how to get this going. Awecourse I have a intel gpu tongue smile

You have to wait. This kernel is not KMS. 2.6.29 is.


Excuse my poor English.

Offline

#6 2008-12-25 09:52:41

Zariel
Member
Registered: 2008-10-07
Posts: 446

Re: Kernel based mode setting

Do want KMS for nvidia binary :E wish they wouold open source the driver =/

Offline

#7 2008-12-26 08:41:32

Tigertailz
Member
From: Sweden
Registered: 2007-09-11
Posts: 89

Re: Kernel based mode setting

agapito wrote:
Tigertailz wrote:

Yeah so now the kernel is released.. anyone know how to get this going. Awecourse I have a intel gpu tongue smile

You have to wait. This kernel is not KMS. 2.6.29 is.

darn wasn't this kernel supposed to be the one ?

Offline

#8 2008-12-26 10:08:46

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

Re: Kernel based mode setting

Tigertailz wrote:
agapito wrote:
Tigertailz wrote:

Yeah so now the kernel is released.. anyone know how to get this going. Awecourse I have a intel gpu tongue smile

You have to wait. This kernel is not KMS. 2.6.29 is.

darn wasn't this kernel supposed to be the one ?

No, never.

http://www.phoronix.com/scan.php?page=n … &px=Njk0NA


Excuse my poor English.

Offline

#9 2009-03-25 21:20:48

rostoQ
Member
Registered: 2008-06-25
Posts: 40

Re: Kernel based mode setting

with 2.6.29 being in testing now, (with intel drivers supporting kms), how would i get KMS?

Offline

#10 2009-03-25 22:43:17

qubit
Member
Registered: 2007-04-25
Posts: 47

Re: Kernel based mode setting

rostoQ wrote:

with 2.6.29 being in testing now, (with intel drivers supporting kms), how would i get KMS?

Some info about KMS You need xserver 1.6 and intel driver 2.6, both in testing repo.

Last edited by qubit (2009-03-25 22:45:19)

Offline

#11 2009-03-26 00:15:47

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,563

Re: Kernel based mode setting

Unfortunately, it seems Nouveau's KMS isn't supported yet (I don't know where support has to be specifically, all I know is there's KMS code in Nouveau but 2.6.29 only works with Intel graphics). Ah well, soon smile Nouveau doesn't get me acceptable 3D on my computer, but it's nice to use when I don't need 3D, and KMS will be fun to look at.

Offline

#12 2009-03-26 01:07:27

Ronin-Sage
Member
Registered: 2008-10-24
Posts: 153
Website

Re: Kernel based mode setting

I can't seem to configure xf86-video-intel for KMS support. It always returns with the error saying how --enable-kms is an "unrecognized option". Attempting to run the testing/xf86-video-intel driver with KMS support(i915.modeset=1 at boot) results in X locking up.

Offline

#13 2009-03-26 05:17:01

baze
Member
Registered: 2005-10-30
Posts: 393

Re: Kernel based mode setting

you don't need to pass any --enable-kms to the driver's configure as the driver relies on libdrm headers for that stuff and doesn't do it itself directly. i asked devs in #intel-gfx yesterday and they said it was irrelevant if the driver was built on a system without a kms supporting kernel, no need to recompile the driver.

but as far as i know the 2.6.29 in testing doesn't even have kms enabled, right? drm_i915_kms is not set. so to everybody who has that appearantly working: have you rebuilt the driver or what exactly? a wiki page for enabling kms would be nice...

Offline

#14 2009-03-26 07:49:08

Arkane
Member
From: Switzerland
Registered: 2008-02-18
Posts: 263

Re: Kernel based mode setting

I built a custom kernel enabling all the options that seemed like they could have something to do with KMS, but my drivers are straight from [testing].

Seems to work, because VT switching and X startup are much faster and don't cause the usual brightness flicker.

Last edited by Arkane (2009-03-26 07:49:52)


What does not kill you will hurt a lot.

Offline

#15 2009-03-31 22:33:09

andrej.podzimek
Member
From: Zürich, Switzerland
Registered: 2005-04-10
Posts: 115

Re: Kernel based mode setting

The current situation is pretty simple: It doesn't work. VT switching that crashed occasionally has been upgraded so that it crashes almost certainly. Awful flickering on X.org startup is still there, as usual.

Using a vanilla 2.6.29 kernel with an Intel chipset and modesetting switched on. Currently, it's not worth trying. I'll have to wait till it's fixed or till a workaround is found.

Offline

#16 2009-03-31 22:38:24

sirius
Member
From: Norway
Registered: 2008-12-25
Posts: 68

Re: Kernel based mode setting

I've tested Fedora 11 Beta today, and KMS is pretty sweet. I'm not moving away from Arch, though, so I think I'll install Fedora on my gf's laptop :-)

Offline

#17 2009-04-01 14:48:17

andrej.podzimek
Member
From: Zürich, Switzerland
Registered: 2005-04-10
Posts: 115

Re: Kernel based mode setting

sirius wrote:

I've tested Fedora 11 Beta today, and KMS is pretty sweet.

If that works, it might be worth using some of their patches in ArchLinux. (The implementation in the Vanilla kernel does not work, so they must have changed something.)

Switching from X to a text terminal fills the display with 1 pixel wide vertical stripes of rainbow colours. That's aesthetically pleasing, in a way, but it's not exactly what I would expect... The system does not crash. I was able to login and produce a beep, but no text was visible.

Switching back to X shows a black screen. However, the system still works, so this is probably just a matter of the graphic chipset. Fortunately, keyboard shortcuts saved the whole situation. I was able to run xrandr --output LVDS --auto, which fixed the problem.

What could be the cause of all this? Do I need a userspace daemon or should I try a kernel patch?

Offline

#18 2009-04-01 17:04:53

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

Re: Kernel based mode setting

andrej.podzimek wrote:
sirius wrote:

I've tested Fedora 11 Beta today, and KMS is pretty sweet.

If that works, it might be worth using some of their patches in ArchLinux. (The implementation in the Vanilla kernel does not work, so they must have changed something.)

Well, it works for me. Note that it's not only about the kernel, but also which specific versions of xf86-video-intel driver and which xorg-server are you using.

Offline

#19 2009-04-01 17:22:38

Arkane
Member
From: Switzerland
Registered: 2008-02-18
Posts: 263

Re: Kernel based mode setting

It works for me too, like I said above. You can't really say "KMS doesn't work in the vanilla kernel".

I don't think it would be strange for some chips not to be supported as well as others since this is a brand new feature, though.

Last edited by Arkane (2009-04-01 17:23:27)


What does not kill you will hurt a lot.

Offline

#20 2009-04-03 02:07:43

andrej.podzimek
Member
From: Zürich, Switzerland
Registered: 2005-04-10
Posts: 115

Re: Kernel based mode setting

2.6.29.1: still the same problem. This time I don't even get the rainbow. :-(

Offline

#21 2009-04-03 05:37:17

baze
Member
Registered: 2005-10-30
Posts: 393

Re: Kernel based mode setting

using 2.6.29-3 and -4 from arch, kms doesn't get enabled when i add i915.modeset=1 to the kernel line (removed vga=792 too). i only get the message that this option is unknown and will be ignored. The system boots up, no mode change, and when X is supposed to start, the screen goes black and i have to power it off the hard way. It's a t60 with the gma945 and i tried with both the driver from testing and git master from a few days ago.
the weird part is that i rebuilt the -3 kernel a week ago myself and the only change i made was enabling kms by default so i don't need the i915.modeset line anymore and with that kernel and otherwise the exact same system, it works perfectly!
mode gets changed, X starts up, vt switching without flickering, all that stuff just works after only enabling CONFIG_DRM_I915_KMS=y. no other changes were made to the config.

any idea why it doesn't work with the provided kernel? and when kms doesn't get activated, why do i get no mode change but X goes black where when i use the provided kernel but don't add i915.modeset=1 the mode doesn't get changed (of course), but X works fine with that kernel too??

weird stuff.

ok, i had to add i915.modeset=1 to the kernel line and add both intel_agp and i915 to the MODULES=() in rc.conf. now it works. thanks, brain0.

Last edited by baze (2009-04-04 10:44:50)

Offline

#22 2009-04-16 18:28:45

franzburg
Member
Registered: 2008-12-17
Posts: 3

Re: Kernel based mode setting

baze wrote:

ok, i had to add i915.modeset=1 to the kernel line and add both intel_agp and i915 to the MODULES=() in rc.conf. now it works. thanks, brain0.

Thanks, works nicely here, too!

Franz

Offline

#23 2009-04-24 18:04:32

andrej.podzimek
Member
From: Zürich, Switzerland
Registered: 2005-04-10
Posts: 115

Re: Kernel based mode setting

The new X.org is a big improvement, but there's still a problem:

1) xf86-video-intel supports KMS, but has no support for dual head configurations.
2) xf86-video-intel-legacy supports dual head configurations, but has no support for KMS.

Let's hope xf86-video-intel will get fixed somehow...

Offline

#24 2009-04-25 07:00:11

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

Re: Kernel based mode setting

I give KMS an A for Fail. Oh, wait, I did something wrong there. With KMS enabled, the kernel is less responsive overall and using any terminal emulator is horrendous, and I am a huge ncruses.h fan. At least KMS is a total failure for X, it's very pleasing with intelfb, but most Arch user's ignore intelfb anyhow and use vesafb by mistake using vga on the kernel line... With KMS enabled, intelfb actually works! Yeay!

Offline

#25 2009-04-25 09:11:18

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

Re: Kernel based mode setting

Aprz wrote:

I give KMS an A for Fail. Oh, wait, I did something wrong there. With KMS enabled, the kernel is less responsive overall and using any terminal emulator is horrendous, and I am a huge ncruses.h fan. At least KMS is a total failure for X, it's very pleasing with intelfb, but most Arch user's ignore intelfb anyhow and use vesafb by mistake using vga on the kernel line... With KMS enabled, intelfb actually works! Yeay!

- kernel responsivity has nothing to do with kms enabled or disabled, and the performance of terminals is also unrelated (EDIT: to the kernel responsiveness - it's got to do with kms though) - moreover this issue has been worked around - search the forums
- intelfb and kms are mutually exclusive
- so please get your facts straight before you troll the forums

Last edited by bender02 (2009-04-25 09:12:18)

Offline

Board footer

Powered by FluxBB