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