Gentoo Archives: gentoo-amd64

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Hurray! Radeon KMS in 2.6.31
Date: Wed, 17 Jun 2009 17:35:43
Message-Id: 5bdc1c8b0906171035i367a429elefd8d1e1df60dfd5@mail.gmail.com
In Reply to: [gentoo-amd64] Re: Hurray! Radeon KMS in 2.6.31 by Duncan <1i5t5.duncan@cox.net>
1 On Wed, Jun 17, 2009 at 10:24 AM, Duncan<1i5t5.duncan@×××.net> wrote:
2 > Mark Knecht <markknecht@×××××.com> posted
3 > 5bdc1c8b0906170847u241d3f5fg34cc48d6e1a5ab3b@××××××××××.com, excerpted
4 > below, on  Wed, 17 Jun 2009 08:47:57 -0700:
5 >
6 >> So what would KMS do for me when I finally have access to it?
7 >
8 > KMS, kernel mode setting, finally unifies the mode (resolution) setting
9 > between X and the text console framebuffer.  This has always been a very
10 > hairy and delicate area, with all sorts of potential and real bugs due to
11 > what's essentially two entirely separate sets of code handling the
12 > display.  Often, the bugs showed up as being unable to get a text console
13 > back once X took over, or in full machine crashes.
14 >
15 > But there's more to it than simply avoiding that.  Among other things,
16 > for those who consider "boot" to mean starting X and getting to a
17 > graphical login (or auto-login all the way to the desktop), it'll mean
18 > avoiding the disconcerting blinks and moments of blank-screen as X
19 > starts, as X will (normally) continue to use the same mode the text
20 > framebuffer was using.  For those that like staring at rather
21 > uninformative picture during the boot process, rather than seeing all
22 > those text messages go by, that will work better and be smoother as well.
23 >
24 > Also, the process will be much faster, as currently, the kernel runs its
25 > detection at boot, then X runs its detection when it starts, and now
26 > those will be combined into only a single detection run.  Switching
27 > between a text VT and the X VT (or more than one X VT, with fast-user-
28 > switching) will be much faster and less prone to lockups, as well.
29 >
30 > Another big feature KMS brings is that letting the kernel handle all that
31 > code will mean that the X userspace code doesn't need root privs any
32 > more, and can be started as a normal user.  For /decades/ (since before
33 > Linux even came to be) the fact that all that hard-to-audit X code runs
34 > as root, with X generally the biggest application by far to run as root,
35 > has made the computer security types extremely nervous, thinking about
36 > all the potential ways all that X code running as root might be exploited
37 > to get root privs.  Now X will be able to run as an ordinary user
38 > program, or as a non-root system level "xorg" user or the like, just as
39 > most other system level services do.  That's going to make a *LOT* of
40 > security folks MUCH happier! =:^)
41 >
42 > Yet another KMS feature will be that finally, when there's a system crash
43 > within X, the kernel will be able to spit the kernel panic to the screen,
44 > where people can grab the info and report it, something that has only
45 > worked from a text console before, because X controlled the display when
46 > it was showing and the kernel, particularly an already panicking kernel,
47 > couldn't simply grab it and print the error like it could from text
48 > mode.  (FWIW, these sorts of problems can't be logged to local disk
49 > either, because by the time the kernel knows there's a problem, it dares
50 > not write anything else to disk because it can't be sure it's in a sane
51 > enough state to know where it's writing any more.  It can write to a
52 > network port if network logging is enabled, or to the screen, but not to
53 > disk, lest it overwrite something valuable because it's screwed up enough
54 > it doesn't know where on the disk it's writing.)  In a way, this brings
55 > the infamous BSOD to Linux -- Linux can spit out that final crash message
56 > just like Windows can, now -- but of course we think we can do it better
57 > than Windows does.  But one does hope that whatever they come up with for
58 > this doesn't in time become as famous as the BSOD on Windows!
59 >
60 > Finally, the X graphics drivers, including the 3D/DRM hardware level
61 > drivers, are going to become much simpler.  Basically, after the change
62 > is complete, either the X hardware level drivers will be a thin wrapper
63 > around the interface the kernel exposes, or they'll not exist at all,
64 > with X sending everything to the kernel over a generic interface, say
65 > OpenGL, at least for newer hardware, that really doesn't have a dedicated
66 > 2D hardware layer at all, only emulation running on the 3D layer.  In
67 > either case, however, X will be smaller and rather less complicated,
68 > while the much faster updating kernel handles the hardware.  Among other
69 > things, this will likely mean much faster support for new graphics cards,
70 > etc, again, because all the code is in one place now, not two very
71 > different code sets sharing and fighting with each other for control,
72 > that must be coordinated between themselves as well as updated for the
73 > new hardware.
74 >
75 > Thus, in general, it'll be a much smoother, potentially much faster, and
76 > much safer, experience for the user.
77 >
78 > OTOH, getting from here to there will involve some challenges.  The Intel
79 > graphics folks have been bearing the brunt of it, leading the pack, with
80 > quite some bleeding going on as well, as the various levels temporarily
81 > fell out of sync with each other, with some hardware supported best using
82 > one combination of kernel, x-driver, drm modules, and xorg-server, while
83 > other hardware was supported best with a different combination, so what
84 > worked best for one Intel graphics user might not work at all for another.
85 >
86 > Fortunately, the rest of the pack was able to learn a lot from the Intel
87 > experience, and it should be much smoother for the Radeon and Nouveau
88 > (new open source nVidia graphics) drivers.  But with the level of change
89 > going on, there's going to be bumps regardless.  That'll mean some
90 > challenges for xorg-overlay and ~arch users, while it's likely to mean
91 > stable users will be left even further behind temporarily (much as they
92 > were with xorg-server 1.3 (1.4?) for so long), until it all settles down
93 > enough to stabilize the new setup for them.
94 >
95 > For more, the phoronix.com site, focusing on Linux gaming and 3D, is very
96 > good on all things X hardware and driver related.  Here's a link to their
97 > display drivers page, with articles covering this and other developments
98 > both current and back some time.
99 >
100 > http://www.phoronix.com/scan.php?page=category&item=Display%20Drivers
101 >
102 > Also of interest, various articles from LWN, H-Online, and ArsTechnica,
103 > which all cover Linux, the kernel, and X, from varying angles in varying
104 > degrees of detail as part of their more general coverage.
105 >
106 > http://lwn.net
107 > http://h-online.com
108 > http://arstechnica.com
109 >
110 > --
111 > Duncan - List replies preferred.   No HTML msgs.
112 > "Every nonfree program has a lord, a master --
113 > and if you use the program, he is your master."  Richard Stallman
114 >
115 >
116 >
117
118 Good stuff.
119
120 So guessing about the path:
121
122 1) Kernel get KMS.
123 2) Xorg-X11 develops and tests for awhile. (probably on-going now?)
124 3) Gentoo devs and bleeding edge users play with it for awhile.
125 4) Shows up in portage under ~amd64 (Is that the same as ~arch for AMD64?)
126 5) More bleeding edge users play with it
127 6) Becomes stable
128 7) I get it.
129
130 What's that? About 1-2 years or something?
131
132 None the less, sounds like quite a nice improvement. I've had LOTS of
133 times where going back and forth between console and X hasn't been
134 perfect, and I certainly don't like the annoying blinks, etc.
135
136 Thanks,
137 Mark

Replies

Subject Author
[gentoo-amd64] Re: Hurray! Radeon KMS in 2.6.31 Nikos Chantziaras <realnc@×××××.de>