29 January 2009

Since we ALL know X is nowhere near stable...


Some X developers decided that it's too easy to accidentally press 3 keys that are spread far apart on the keyboard and require 2 hands to press simultaneously (???), so they got rid of disabled by default Ctrl+Alt+Backspace (also known as "zapping").

Some people within Ubuntu realized that this makes no sense since X really likes to lockup. At UDS, they decided to keep zapping available, but they would disable it by default. Having a way to re-enable (from a GUI) zapping was also agreed on at UDS.

What's Happening

Alberto Milone has provided us with a way to re-enable zapping from the command line and from KDE. But where's GNOME? Well, he did add a checkbox for it to the Screen Resolution tool, but it seems it won't be accepted into Ubuntu, since it's an "expert" option (according to Mark). EDIT: The discussion is on-going.

My Opinion

I'm with Alberto and Jordan. There are plenty of people who use ctrl+Alt+Backspace who are not experts. They use it because that's what we've recommended for years when X (inevitably) locks up. They are not going to want to muck about with xorg.conf or installing extra command line apps for it.

It wouldn't be so bad if X was actually stable. It wouldn't be so bad if our TTYs worked reliably. As it is, you have to try to switch to the TTY twice before it works, if it works. Sometimes I seem to just not have any TTYs at all. Alt+SysRq+T usually does not take me to a TTY like it should. Until Alberto posted how to fix this from the command line, the only thing I could do when X locked up (multiple times a day!) was Alt+SysRq+B: reboot the system. Things I could've fixed by just Ctrl+Alt+Backspace and waiting 5 seconds now require waiting a full reboot cycle (about 45 seconds til the desktop's usable, if I type my password really fast). Even the smallest X lockup is just as disastrous as a kernel panic now. It's like Windows.

I liked how Jordan summed it up when we were chatting: "apparently X is perfect, we have ttys all the time, and a checkbox is too complicate for users to think about."

What do you guys think? Are the TTYs reliable enough that we can count on non-experts to be able to go to TTY1 and "sudo /etc/init.d/gdm restart"? Can we even count on non-experts knowing how to do that? Or do you think X is stable enough that nobody ever needs to do that?


newz said...

Not sure what you mean by X being unstable, but I can say for certain that ctrl+alt+backspace is a horrible idea. Who ever heard of a modern operating system that had a secret key sequence that would crash your desktop and make you lose all of your work?

And believe it or not I *have* pressed ctrl+alt+backspace on accident and I know someone else who has as well.

Mackenzie said...

It doesn't crash the desktop. It's how you recover from the fact that X crashes all by itself all the time anyway.

newz said...

It does if you push it on accident.

Also, I see that part of the debate is the presence of configuration options... fewer configuration options is better. Ubuntu revolutionized the Linux desktop by having fewer options and a clean UI. I'd like to see that trend progress, not go backwards.

This is esoteric option best hidden away where only a developer will find it.

massysett said...

Just curious: what are you using on X that makes it so unstable, so I can avoid it? In years of using Linux, the only time I had problems with X locking up was when I used to regularly play (encrypted) DVDs with xine-ui. I stopped having that problem at least a couple of years ago. Now the only time I need ctrl-alt-backspace is if I am fiddling around with my xorg.conf and I want to make sure X has restarted so I can try the new settings.

I agree with you that disabling ctrl-alt-backspace is a bad idea; I just wonder why you need to use it every day when my X is stable as a rock.

Mackenzie said...

On Jaunty, if I right-clicked almost any panel applet up until about a week ago, it'd lock GNOME/X. Jordan says he had that problem on Intrepid with the Clock applet.

In KDE4, my mouse cannot click on anything, and I can't type into a KRunner box after I get it open, so the only way to escape if I accidentally login to KDE4 is to Ctrl+Alt+Backspace.

When I resume from suspend, sometimes my keyboard is dead, but then Ctrl+Alt+Backspace can't help...have to click "switch user" on the locked screen so it takes me to a new X session, *then* I can go to a TTY and restart gdm.

Today when I resumed, my load average was 6, and closing individual apps didn't bring it down below 4. Network Manager also couldn't connect, and my mouse wouldn't move right. Ctrl+Alt+Backspace was the only way I could find to get out, since my mouse couldn't reach menus.

hansrodtang said...

Now I have to re-educate all my friends. I have told them if Linux freezes for some reason, they should just press Ctrl-Alt-Backspace for a quick "refresh" without needing to do a slow reboot.

hansrodtang said...

And that small option is hardly an "expert option".

Steven Harms said...

Disabling this is absolutely the wrong direction. For those who say X doesn't crash, you are not living in the real world.

I run over 3000 linux machines, and even on open source intel drivers it can crash. You can claim otherwise, but I would love to see your evidence that it doesn't crash and it is the user's fault if it does. We can have a great debate.

kevix said...

When newbies will ask for support, any guru will tell them about ctrl-alt-backspace. It has been an option that has been used forever. I can understand the idea to make it a checkbox option, even making it an 'advanced' one. I'd make it 'on' by default. But removing it is absurd. The probability to activate that combination by accident is tiny, near zero.

Matt P said...

On my laptop, X occasionally locks up completely, and Ctrl-Alt-Backspace has been incredibly useful. This has happened for years, so it's not one driver, distribution or version to blame.

What's more, I can't see how having this enabled is a problem for anyone - why not just leave it in? What is the benefit of not having this option turned on by default?

If Ubuntu disable this, I'll just have to remember to turn it on again every time I upgrade.. sigh. Much as I like Ubuntu, this sort of thing really feels unnecessary.

RainCT said...

I am one of those who sometimes presses it by mistake, but still I agree that there should be an option to easily enable it again. Personally I agree with Mario Limonciello in that an "Advanced" button which opens a new dialogue with this and additional options would be the best thing to do.

louish said...

simply put. I want the choice. Personally, I use the ctrl+alt+backspace a fair amount. Yes, it is my own fault, but since I broke a finger on one hand, and it's never worked the same again, I've been making a few more error's than normal. And when X does go hair wire, I love the option of just hitting ctrl+alt+backspace and within a few seconds I'm back in business.

Best Regards

TheNano said...

Why not make it like this:
It is disabled by default but when you press ctrl+alt+backsapce X asks you if want to enable it.
Or if you press ctrl+alt+backsapce X asks you if you really want to restart x , then you need to press them again in order to restart X.

PMB Enterprises, L.L.C. said...

I find it interesting that anyone would suggest that 'accidentally' pressing 'CTRL-ALT-Backspace' is a common mistake, common enough to abolish it. I can't remember every making that three-finger stretch to do anything else but salvage a problem in X.

Sure, X still crashes on me, though not as much as it use to not too long ago. I now run machines with Puppy Linux, Debian Etch, Ubuntu Intrepid and FC 10. On occasion I have had to do some xorg.conf hacking to get xserver to behave after an install on a particularly unloved machine. Then there is the change in display hardware or a monitor change that messes things up.

As for being able to switch to a TTY from a failed X session: more times than not I can. But not always. And using the SysRq key in any key combination on Ubuntu has 'never' worked for me, especially on a laptop keyboard.

To those who would want Linux to emulate the Mac (and what Windows wished it could achieve), please don't. We don't need another platform to insulate us from responsibility or harbor secrets we will never know. Open Source, remember? Keep the interface clean and free of minutia, yes. Allow every user an 'easy' choice of how much or how little interaction is desired. But lets leave fire escapes unlocked and accessible...just in case we have a need for them.

'CTRL-ALT-Backspace' is a necessity in Linux running an xserver. Maybe some day it won't be, but right now it is. And from what I have been seeing in this new Bulletproof X, it will be a long time before X will be a stable place to be.

Stephen said...

I don't get it. Ctrl-Alt-Bkspace has always been such a reassurance to me. When I first started Linux, that key combo and the fact that it did NOT restart the entire computer, was the proof that this was a truly stable OS. I know enough now to probably be able to get out of an X crash without a full reset, but the new users that the Linux community is courting will be frustrated for sure. Suddenly every X crash will be attributed to a Linux crash. It's bad PR. And really, if it ain't broke people...
Let's not go mucking with things just because we can. I'm baffled that anyone can actually accidentally hit those keys.

massysett said...

Okay, I see. I guess the reason X doesn't crash for me is that I am running a pretty boring Debian Etch desktop, with no Compiz and KDE 3.5.

I often suspend my old Dell D410 laptop and I never have any problems on resume. I have a Thinkpad coming so I'll see if it's a problem then.

Honestly I can't remember the last time X crash or froze on me. It has literally been *years*. I don't doubt that it is crashing for other people but that just has not been my experience. I guess I will stay away from newer software releases if they keep crashing X, because that is something I just do not want to deal with.

pooster said...

Uh, yeah. The fact that there's discussion as to the option to enable zapping means that it has not been removed "by some X developers." The default value has just been changed such that zapping is not enabled.

This is not a problem with X.org.

This is not a problem for a literate individual with the ability to utilize a text editor.

This is a problem with Canonical and the Fearless Leader thereof.

massysett said...

"For those who say X doesn't crash, you are not living in the real world." . . . "You can claim otherwise, but I would love to see your evidence that it doesn't crash and it is the user's fault if it does."

Look man, I don't doubt that X crashes for you, but that does not mean that it is crashing for everybody. I'm not saying it is anybody's fault that it crashes. There's absolutely no need to insult people just because they have a different experience from you. My X does not crash or lock up and it has not done so in years. I just run 2 linux machines, not thousands, but that is my experience. Do you think I'm lying or that I don't live in the real world?

Derek Buranen said...

Try this:
ctrl+alt+f1 (or use f2-f6)

Each one of these should be a terminal.


sudo service gdm restart

voila? If it restarts gdm, but doesn't push you back to X. Try ctrl+alt+f7, f8, or f9


0iKcmaEnnZETSwYUX09J19lOHgH_vA-- said...

No pain, no gain. PulseAudio (and ALSA) would have progressed much more slowly if it hadn't been enabled by default in several popular Linux distributions. Likewise, problems in the graphics stack are less likely to get fixed if Zap remains enabled by default.

You should also clarify that your KDE4 issues are not at all related to Zap; you neglected to mention that they are correlated with your ~/.config/autostart/ content(s). Test by removing your fusion desktop file (just as my KDE4 "problems" disappeared when I removed my xmonad desktop file and restarted the KDE4 session).

Jef Spaleta said...

Can you identify who is the leading contributor to the upstream X.org project from Ubuntu or Canonical at the moment?

Perhaps that person has some ideas on additional opportunities for people in the Ubuntu community concerned about X stability to contribute into the upstream codebase.


Mackenzie said...

My understanding is that it has been completely removed in upstream X. Ubuntu patched the feature back in for Ubuntu's version, but they've disabled it by default to stay in-line with upstream.

I wouldn't be surprised if it had a bit to do with age of hardware as well. I have issues with VT switching on my 6-month-old laptop, but I think the 2-year-old is fine.

Don't know for sure yet that Compiz is at fault for the KDE issues. Whether it is or not, the only way out of it (I can't imagine having Compiz enabled in GNOME and then also installing KDE is uncommon) is Ctrl+Alt+Backspace.

That requires that VT switching actually work. When your ttys are normally blank (no login prompt, just blackness), that's not helpful in the least.

Please be respectful. Some people are lucky enough to have good experiences with X. Some of us are really annoyed at X on a regular basis.

pooster said...

Reference for this understanding?

Mackenzie said...

You win. Just went and asked an X dev. Between their (long) mailing list discussion and what was being said at UDS (I wasn't there, just listened in on the sessions), it sounded to me like Ubuntu developers were deviating from upstream by having it as an option.

0iKcmaEnnZETSwYUX09J19lOHgH_vA-- said...

It is not uncommon for Compiz to be enabled under GNOME.

It is not common for *a Fusion tray icon desktop entry to be present in ~/.config/autostart/.* That is the distinction that is not clear upon initial reading of your blog entry.

agrabauskas said...

I wrote a much longer and more detailed post on this, but it got lost in the ether it seems. I don't feel like retyping all that, but the Cliff's notes are:

Check your power supply. It may be inadequate. Cheap, flaky or borderline powered ps's give all *SORTS* of weird symptoms you're likely to attribute to something else.

450w on the box doesn't really mean 450w every time. It's somewhat involved, but trust me on this. Your ps matters.

albucasis said...

I strongly disagree with disabling the crtl+alt+backspace sequence, zapping or whatever that has been lurking on my GNU/Linux since the antediluvian era. It is a good feature to escape from some horrid situations when you just can't do anything on your desktop; it happens from time to time and sometimes it is just because some programs are messy... not just X. I think Mark is pushing this too far this time, too patronizing... GNU/Linux users should be empowered users. Please tell Mark to leave users alone, please.

pooster said...


Honestly wasn't particularly trying to be a schmuck. Was more so looking to make sure that we were all on the same page on the issue.

Maarten Fonville said...

Really, I am using Kubuntu Intrepid with KDE 4.2 and a lot of experimental repositories. But X didn't crash for me since a long time...
I can not really imagine that you have so much problems with X, and that if you are knowledgeable that the problem is within X (and thinking that Ctrl+Alt+Bcksp will fix your problem) you are not smart enough to press Ctrl+Alt+F1 and give /etc/init.d/kdm restart

Please save those people who are not 'hackers' from losing their work by pressing Ctrl+Alt+Bcksp because some 'funny' guy told them to. They will be cursing their OS forever for losing their work because of such an stupid 'feature'...

Travis said...

You can still use alt-sysrq-k to accomplish the same thing which is much harder to press by accident and more likely to actually kill X if it is really stuck.

Really, I'm surprised at all the attention this is getting. A keypress that laptop users can hit without meaning to is being removed but a keypress that is impossible to hit by accident and works better has been there the whole time anyway.

Johannes said...

I am with Travis on this one.
The only thing I am wondering about why the Alt+SysRq+K option is not more advertised. I think this discussion wouldn't happen if people knew about this option.

agrabauskas said...

>>>The only thing I am wondering about why the Alt+SysRq+K option is not more advertised. I think this discussion wouldn't happen if people knew about this option.<<<

some keyboards dont have sysrq - like the logitech ex-110 i'm using right now.

unles of course it has some key combination i don't know about. but i can say for sure there's no sysrq marked on the keyboard itself.

Stephen said...

I've personally never been able to get the magic SysRq combos to work. I have a regular keyboard, nothing special, running a standard 8.10 install. I believe I tried this on Gutsy too when I first read about it. My netbook also doesn't work. I just get a ton of screenshot dialogs on either machine. Very frustrating. If anyone has an answer to this I'd love to hear it, but I know I'm not the only one who's complained (I've googled a bit) and now that it may be the only way to restart X (at least by default), it's more concerning.

Chris Jones said...

Zap must die. Don't train novice users to use something so horrific. Drop to a console and ctrl-alt-del. Chances are these days that an X wedge will need a reboot anyway because the X drivers won't be able to bring the chip back to life, or will have done something bad to memory contents.

File X bugs, don't insist that we keep nasty keyboard shortcuts which *do* harm innocent users. If you think nobody presses it by mistake you are very, very, very wrong.

Also consider that anyone can walk up to your locked workstation and maliciously destroy your session.

I am boggling at seeing people vehemently defend this ridiculous feature!

Chris Jones said...

Bah, too early in the morning. I mean accidentaly, not maliciously. Sorry.

Miles Prower said...

Disabling CTRL+ALT+Backspace is actually a good thing in my opinion. I've always wanted to do this on my 8.04 box.

The actual problem is that you can "zap" X while the computer is idle (locked screensaver). This means that if you work with graphic applications (OpenOffice.org, Blender, etc) and want to take a pause, you take the risk that a co-worker zap X while you are not around just for kicks. It's only a few keys, and you will loose all your unsaved work.

Moreover, if autologin is enabled, everyone can just zap the locked session to gain access to the computer again.

Of course, the same stuff can be achieved by shutting down the computer, but it's just not as "convenient" as a prank.

Roger Light said...

I thought this was already fixed...

openSUSE got round it a while back in 11.0 by keeping the zap functionality, but requiring two presses in quick succession:


Seems to be a good way to deal with it.

nocturn said...

Until they manage to get X 99.9999999999999999999999999% stable, which is far from the current situation, the option to kill it is a vital part of my desktop.

I will be quite annoyed if they take that away.

hugoheden said...

Non-expert here. I am one of those who accidentaly press Ctrl-Alt-Backspace sometimes. Not often, but it happens, say a couple of times a year. I use the keyboard instead of the mouse for everything. Pressing Ctrl-Alt is common, and backspace is common. And the combination thereof happens.

However, we still need a way to unlock a hung X, right? I know I do. And Ctrl-Alt-Backspace has always been the method to do that.

If technichally possible, I would like the default behaviour of Ctrl-Alt-Backspace to temporarily get me out of X, showing some GRUB-like-menu asking what I want to do -- "did you really mean to log-out and restart the graphics, losing any unsaved work?" -- so that I have the option.

DOzZdORu3tLfs7t7nETE3sgiz1li3eE- said...

I wonder... if we remove the A-C-B thing, what happens if my X11 locks?

OK, sometimes happens... and A-C-B is a good rescue tool because I just restart X and I can go on with my work without a restart.

Mackenzie said...

SysRq used to work right for me. As of Jaunty...yeah, I get that printscreen thing sometimes too. It's weird.

SuSE requires hitting it twice, but when this was suggested on xorg's mailing list, it was ignored.

Seeing these comments, one of my friends tried Alt+SysRq+K yesterday just to see what would happen. It didn't restart X. It just made X hang.

yungchin said...

Question: if the system is not so badly jammed that Ctrl+Alt+Backspace doesn't work anymore, then doesn't that mean that Ctrl+Alt+F1 still works too?

Personally, I haven't had many X lock-ups, but then you are using development versions...

Maybe the effect of this is that people will now get so annoyed with X-hanging bugs that require them to completely reboot, that they're more compelled to fix those bugs quickly :P

Mackenzie said...

As I said above, that assumes VT switching works on all video cards. Most of the time I can't use Ctrl+Alt+F1 even when X is running fine.

meta said...

I haven't had an X crash in years. Maybe it's because I'm running KDE too?

Given that Alt-SysReq-K solves the same problem, and so does Alt-F1 (then login and type a command), I don't see that the third option is needed.

Mackenzie said...

As mentioned many times you assume a few things which are not always the case:
1. That the keyboard even has a SysRq key
2. That the SysRq is properly recognized
3. That VT switching works

I have a SysRq key, but it is not being properly recognized, and VT switching does not always work with Intel's graphics drivers. My mom does not have a SysRq key, and she's using Intel's graphics drivers too. For both of us, Ctrl+Alt+Backspace really is the only option.

pansz said...

for the design philosophy of GNOME, options which confuses new users should be hidden. non-expert users should be happy enough simply rebooting the computer.

for users who want all options in GUI, simply use KDE. (yes I want all options, so I use KDE)

pansz said...

> Who ever heard of a modern operating system that had a secret key sequence that would crash your desktop and make you lose all of your work?

If killing X loses all of your work. Then you should seriously consider your selection of application.

A decent X application should be aware of the situation when X killed and save it's own state so that nothing is lost. If it cannot, I think it needs further development.

Dorian said...

X is a steaming pile of fail at the moment. The technology needs serious rework and that wouldn't happen anytime soon. Even if all the graphics hardware vendors combined serious and sustained effort, it will take tons of time to rejuvenate X. And I can't really blame any of the engineers involved with any of the X projects, since the codebase has been evolving for what seems the past 20 years. I am hoping that the some alternatives like the Wayfarer project makes some headway. But until then...

... CTRL+ALT+Backspace really needs to stay as a default. Or an easily "checkable" option. Rebooting your machine everytime X locks up just doesn't cut it.

eddy said...
This comment has been removed by the author.
Eddy said...

Mackenzie, I understand you concern, but actually, I also dint have a crash of the X in many years, I been using Ubuntu (GNOME) at home and SUSE (KDE) at work, I work in theoretical physics, we have a cluster with 2320 processors, and believe me, I rarely need to restart my machine or X server (I cant remember the last time). I think it is time to remove such option. Actually it is beter, the X people will work harder to correct bugs.... ;)

Sorry, for the last deleted post, I just was testing... :P

daniels said...

I'm sure that, given you've taken the time out to write this blog post, that all your bugs (e.g. VT switching broken) have been fully reported to upstream so we can actually fix them. (Unless they're in the nvidia binary driver, in which case you should really be directing your anger at them.)

Mackenzie said...

At the time that I wrote this, I'd been working on debugging it with a friend that works on i965 support in -intel. Need to get info before you can report a bug, right? Well, it seems to be fixed in head, so within days of posting this it started to work in Ubuntu too. So yay!

davydm said...

Everyone who is opposed to zapping obviously has never had a misbehaved application... Sometimes, there's a gui app consuming all of your CPU or is just blocking regular X operations, and a zap is preferable to a sysrq restart, imo... I've used this to recover from Diablo in WINE, Doom3 and Quake, when nvidia drivers have been less than amazing. I've also used this when I don't see any other way to get around a buggy app which is consuming system resources in the X environment -- once again, rather a zap than a restart.

The dontzap package just inserts the line:

Options "DontZap" "false"

into your ServerFlags section in xorg.conf. It's a line which will be staying in my xorg.conf.

I've hit ctrl-alt-backspace by mistake before... ONCE. I learned from it and didn't do it again. It's not a key sequence one is likely to hit in normal operations -- my mistake was that I forgot it zapped ;p

NotZed said...

Grr, what complete idiot thought of removing this.

This is how I normally log out - if an application can't deal with that I just don't use it.

It's a lot easier and faster than mucking about 'shutting down login' what sort of nonsense is that.

This, pulse audio and network manager, you'd think someone was intentionally trying to windozeize and hence mess up gnu/linux.