Slashdot Mirror


Does Your PC Really Need a SysRq Button Anymore?

An anonymous reader writes "Ever wondered what the SysRq key on your keyboard does? Lenovo has decided it's so rarely used that it has started removing the key from some new Thinkpad Edge laptops. We already know that Lenovo are something of the fastidious scientists when it comes to keyboard design. Last time they fiddled with the age-old key layout, it was after painstaking research to count exactly how many times users press the Delete and Escape keys. Now it seems another relic of computer keyboards is starting to disappear."

51 of 806 comments (clear)

  1. I don't recall ever using it... by ls671 · · Score: 4, Interesting

    I don't recall ever using that key although I have coded my own "terminate and stay resident" (TSR) programs back then in order to achieve some level of multitasking in DOS.

    With TSR programs, you could intercept the timer interrupt and do some amount of computation in the background before returning to the running program. You could also intercept the keyboard interrupt in order to switch from one application to another on the fly but I have never actually intercepted the Sysrq key. I used some other hot key combination definition. Maybe back then I though that it wasn't a good idea to fool around with that key but this page says other TSR programmers were using it:

    http://en.wikipedia.org/wiki/System_request

    --
    Everything I write is lies, read between the lines.
    1. Re:I don't recall ever using it... by Alinabi · · Score: 4, Interesting

      I have a KVM switch which intercepts SysRq. Without it I could not switch between input sources. So needless to say, I use it all the time.

      --
      "You can't allow somebody to commit the crime before you detain them." [Condoleezza Rice]
    2. Re:I don't recall ever using it... by OnlineAlias · · Score: 4, Informative

      SysRq is the print screen button, and I use it all of the time too. It is cut and paste for me, alt-printscreen (or control-printscreen) then shift-printscreen. Fastest screen paste in the west....

    3. Re:I don't recall ever using it... by VertigoAce · · Score: 3, Informative

      Hold Alt, navigate through the menus with the keyboard, then press PrtSc.

  2. Debug key by sopssa · · Score: 5, Interesting

    Ever wondered what the SysRq key on your keyboard does?

    Introduced by IBM with the PC/AT, it was intended to be available as a special key to directly invoke low-level operating system functions with no possibility of conflicting with any existing software.

    In Linux, the kernel can be configured to provide functions for system debugging and crash recovery.[4] This use is known as the "Magic SysRq key".

    Microsoft has used SysRq for various OS- and application-level debuggers. In the CodeView debugger, it was sometimes used to break into the debugging during program execution.[5] For the Windows NT remote kernel debugger, it can be used to force the system into the debugger.[6]

    So it's a handy debugger key for those who need one, functioning in the same key as print screen, but you need to hold alt key. What's the harm having it there, since it already is? It's not like it's an extra button on your keyboard.

    1. Re:Debug key by Infiniti2000 · · Score: 5, Funny

      Lenovo doesn't need to do any debugging so the key is superfluous to them.

    2. Re:Debug key by houstonbofh · · Score: 3, Interesting

      In Linux, the kernel can be configured to provide functions for system debugging and crash recovery.[4] This use is known as the "Magic SysRq key".

      I guess there will be no more Raising Skinny Elephants on a Lenovo anymore. And while I have only used it a few times in the last year, I have used it.

    3. Re:Debug key by digitalhermit · · Score: 3, Informative

      Oh heck, I use the SysRq key on an almost daily basis whenever I screw up a kernel compile (and that's often). At least on my keyboards, it's on the same key as PrntScrn. Looking at my keyboard, there's nothing that I don't use on a fairly regular basis:Num Lk - *almost* always on when using a laptop. Almost always off when using a regular keyboard. Pause/Break I've mapped to bring up my task manager. I've also noticed that the paint is actually wearing off the hjkl keys on one keyboard (too much nethack...er vi).

    4. Re:Debug key by ais523 · · Score: 4, Informative

      This conflicts badly with Ubuntu's decision to make Alt-Sysrq+K the default way to kill X (as opposed to control-alt-backspace which is too easy to press by mistake), too.

      --
      (1)DOCOMEFROM!2~.2'~#1WHILE:1<-"'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1"
    5. Re:Debug key by grub · · Score: 5, Funny


      I use the SysRq key on an almost daily basis whenever I screw up a kernel compile

      Hey, how is Gentoo nowadays?

      .

      --
      Trolling is a art,
    6. Re:Debug key by Rogerborg · · Score: 5, Funny

      Hang on, he'll get back to you in 36 hours with an optimal rejoinder.

      --
      If you were blocking sigs, you wouldn't have to read this.
    7. Re:Debug key by Andrewkov · · Score: 5, Funny

      You'd be surprised, I pressed it twice just while typing this comment.

    8. Re:Debug key by thebasicsteve · · Score: 5, Informative

      Ubuntu didn't change the key. On any kernel with the "magic SysRq key" enabled (which Ubuntu has), Alt+SysRq+K kills all running processes on the current VT. Therefore, it kills X.
      Ubuntu's recent decision to disable Ctrl+Alt+Backspace by default is a separate issue.
      On older versions of Ubuntu, you will find that either key combo will kill X.

    9. Re:Debug key by TheRaven64 · · Score: 3, Funny

      If you are compiling kernels that often, then you are either a kernel developer or an idiot. If you are a kernel developer, then you can just make your kernel intercept some other key combination. If you are an idiot, then there's no reason for the rest of the world to cater to you.

      --
      I am TheRaven on Soylent News
    10. Re:Debug key by hson · · Score: 3, Informative

      Yeah, try that in Solaris and watch all processes die...

      killall is used by shutdown(1M) to kill all active processes not directly related to the shutdown procedure.

      Use pkill(1).

    11. Re:Debug key by colin_s_guthrie · · Score: 4, Informative

      I think you're confused. Alt+SysRq+K is one of the Linux "Magic Keys" http://en.wikipedia.org/wiki/Magic_SysRq_key it kills all processes on the current VT, not just X. Most modern X implementations will still work with Ctrl+Alt+BkSp but you now need to do it twice and the first time it makes a rather ominous "beeeeeeeeeep" at you to warn you that you maybe about to make a bad decision....

      So this is hardly an "Ubuntu decision" (like most distros they just package up what's already there, mix it up with a few good and a few bad ideas of their own and paint it nicely).

    12. Re:Debug key by digitalhermit · · Score: 4, Funny

      Haha, who's laughing now. I did it in six hours!!! And you mocked my -funroll-loops and -O16. Who's laughing now???

    13. Re:Debug key by bcmm · · Score: 3, Informative

      They are not actually the same. Ctrl-alt-backspace tells X to quit, which it will do if it's actually well enough to listen. Alt-SysRq-K is a key combo for the kernel, and tells it to kill everything running on the current virtual console (originally so that you could make sure you were typing your password into the getty instead of into a program another user had left running to phish login details).

      This has the advantage that it will always kill X, even if X has hung (and will always give you your display back unless the graphics driver has left the adaptor in a weird state), and can also kill whatever (graphical) program had made the system unresponsive, even if it's malfunctioned badly enough to continue eating resources after losing it's connection to the X server.

      --
      # cat /dev/mem | strings | grep -i llama
      Damn, my RAM is full of llamas.
  3. Terminals? by russotto · · Score: 3, Informative

    I'm pretty sure SysRq is a left over from the terminal days, though I don't recall which terminal (the VT100 doesn't have it). It was basically the equivalent of CTRL-ALT-DEL.

    Ahh, Wiki to the rescue; it was from the IBM 3270.

  4. Get rid of unnecessary one and zero keys by shoppa · · Score: 4, Funny

    When I learned to type we didn't have these extra "one" and "zero" keys. We used lower case "ell" and upper case "Oh" and we were happy, dang it!

    1. Re:Get rid of unnecessary one and zero keys by Dmala · · Score: 3, Informative

      I remember editing some documents for a woman who apparently learned this way. The problem is it looks OK in fonts like Courier and Times New Roman, but if you change the font they can stick out like a sore thumb.

    2. Re:Get rid of unnecessary one and zero keys by FromellaSlob · · Score: 4, Funny

      Pah. One and zero are the only keys that *are* essential.

  5. As it is just about never used... by TrisexualPuppy · · Score: 5, Insightful

    On my laptop, I use it to toggle VMs. It's perfect because on my machine, it does absolutely nothing. Double scroll lock is the next best bet for me, but my keyboard requires me to press the Fn key simultaneously.

    Is Lenovo leaving any "useless" keys? Some of us actually NEED keys that are otherwise never used and the OSes recognize by default.

    1. Re:As it is just about never used... by Blakey+Rat · · Score: 3, Interesting

      IMO, the perfect keyboard was the Mac Classic one, before they made it all PC-compatible.

      My favorite feature was that "Enter" and "Return" were two different keys, so you didn't have to do that retarded "use control-Enter to actually do return" crap that we do all the time now. ("Return" added a new line and "Enter" entered information.)

      "Home" and "End" worked in a reasonable fashion. And "Caps Lock" actually did what the key SAID it did, instead of caps reverse, which is what PCs have always done.

      If I ran the world, I'd get rid of every key that causes more tech support calls than it saves time. This includes "Scroll Lock" and "Pause", which basically work as a "my Excel is broken!" key. And ditto "Insert", except that one's more of a "my Word is broken!" key. Oh, and "Num Lock"... why would anybody ever want the keypad to *not* be a keypad? Definitely scrap that one too.

      And while we're at it, we need Microsoft to make up its mind whether the "Windows" key is a key or a modifier... right now it does both, which is insane.

    2. Re:As it is just about never used... by Blakey+Rat · · Score: 3, Interesting

      Troll? Seriously?

      I don't mind being down-modded, if the mod makes sense. Could someone please explain to me how anything in that post is considered "trolling."

  6. Has to be said a bit differently this time ... by tomhudson · · Score: 5, Funny

    "You can have my SysRq key when you pry it from my cold dead ThinkPad!"

  7. Linux, Specifically Ubuntu by Aldenissin · · Score: 4, Informative

    I use the "busier" backwards or "reisub" combination with the sysrq key in order to gently shutdown Ubuntu when it locks up. So yes, I use it, but that has only been in the last couple of years or so. Not sure what else it is used for...

    --
    Like a city whose walls are broken down is a man who lacks self-control.
  8. I've used it by jonbryce · · Score: 4, Informative

    If linux freezes, then Alt-SysRq-S+U+B will do an emergency sync of the disks, unmount them and reboot the system.

    1. Re:I've used it by mm_202 · · Score: 5, Funny

      Yep... just confirmed that it also works even if Linux isnt frozen...

    2. Re:I've used it by discord5 · · Score: 4, Funny

      If linux freezes, then Alt-SysRq-S+U+B will do an emergency sync of the disks, unmount them and reboot the system.

      Bah! That almost looks like an emacs keycombo. M-x-Ctrl-v-p-o-k-l-m-z-w and then press your spacebar with your nose, and it'll do the same thing by the way. It's really handy to have such a shortcut, but the odds of your cat walking over the keyboard and hitting that particular combo are pretty high.

    3. Re:I've used it by luder · · Score: 5, Informative

      I actually use Alt - SysRq - R + E + I + S + U + B:

              * R: Switch the keyboard from raw mode to XLATE mode
              * E: Send the SIGTERM signal to all processes except init
              * I: Send the SIGKILL signal to all processes except init
              * S: Sync all mounted filesystems
              * U: Remount all mounted filesystems in read-only mode
              * B: Immediately reboot the system, without unmounting partitions or syncing

      You don't need to hold the REISUB keys, so you can use your left hand to hold Alt, your right one to hold SysRq and use the free fingers to type REISUB.

    4. Re:I've used it by ais523 · · Score: 5, Informative

      You don't. You hold down alt and sysrq, but the other keys are pressed in sequence (and rather slowly). (Some laptop keyboards with sysrq requiring fn require you to let go of sysrq while you press the other keys, in which case you hold down alt but alternate between sysrq and the other characters.)

      Incidentally, for the grandparent: you probably want to write the whole sequence of 6 commands, R E I S U B, rather than just S U B. The R sets the keyboard to raw mode, sometimes allowing you to control-alt-f1 into a terminal and fix the crash without rebooting. E tells all the processes which are still running properly to terminate (many of them will save crash recovery or autosave data if you do that, so you can more easily get back to where you were); I kills all the processes that didn't shut down when you pressed E. This means that when you use S to synchronise the disks, it actually saves what you want to save, and nothing tries to queue up more data to save afterwards. Then U remounts filesystems readonly (or unmounts them; it comes to much the same thing), and B reboots the system instantly (the REISU do the rest of the shutdown process between them).

      A good mnemonic for this is that REISUB is "busier" spelt backwards. (Raising Elephants Is So Utterly Boring is another common mnemonic.)

      Sometimes I end up doing REISUO instead; unlike REISUB which is a manual reboot, RESIUO is a manual shutdown. It all rather depends on whether you want the system to stay down or come back up.

      --
      (1)DOCOMEFROM!2~.2'~#1WHILE:1<-"'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1"
    5. Re:I've used it by baKanale · · Score: 4, Insightful

      A good mnemonic for this is that REISUB is "busier" spelt backwards. (Raising Elephants Is So Utterly Boring is another common mnemonic.)

      I always liked Reboot Even If System Utterly Broken, since that's kinda what REISUB does. But hey, any mnemonic that helps you remember is a good mnemonic, right?

    6. Re:I've used it by Richy_T · · Score: 5, Funny

      Careful. I accidently typed Alt - SysRq - R + E + I + S + E + R and my wife disappeared.

  9. Print Screen by Lord+Lode · · Score: 5, Insightful

    That is the Print Screen key. Don't ever remove that key from the keyboard! I don't care that the word "SysRq" is written below "Print Screen" on that key. Feel free to remove that "SysRq" word from there, but do NOT remove the handy print screen key! Thanks.

  10. Re:Um, I use a Macbook Pro... by bsDaemon · · Score: 3, Insightful

    I don't know, but having different keys for backspace and delete on mine would be very nice...

  11. Re:Print Screen by jollyreaper · · Score: 4, Funny

    That is the Print Screen key. Don't ever remove that key from the keyboard! I don't care that the word "SysRq" is written below "Print Screen" on that key. Feel free to remove that "SysRq" word from there, but do NOT remove the handy print screen key! Thanks.

    But if we drop the sysrq key we'll finally have room for the any key.

    --
    Kwisatz Haderach
    Sell the spice to CHOAM
    This Mahdi took Shaddam's Throne
  12. Goodbye to the ThinkPad brand. by darthflo · · Score: 4, Insightful

    If this change is indicative of what'll happen to the "serious business" series (T, X, R), then the ThinkPad has, after some 18 years or so, finally jumped the shark.

    One of the main selling points of a ThinkPad was the keyboard. When all the other brands went completely nuts and placed the PrtSc/ScrLk/Pause/Insert/Delete/Home/End/PgUp and PgDn keys at a whim, on a ThinkPad you could blindly hit the spot where the key was supposed to be and actually hit it. They were quite proud of that, and nobody minded.
    Now, you get a chiclet keyboard with the F-keys disabled by default and six rows. Well, congrats Lenovo, you've just went from top-of-the-line in 2010 to consumer-grade-sony-vaio in 1999 or so.

    Another thing were the displays. Great, high-resolution, matte 4:3 screens one could work with. I own a 12" X61 with 1050 horizontal lines. Nowadays, it's WXGA with less than 800 lines in everything up to 14.1", and half of the models come in glare-type finish. Thanks to the shiny finish you can't see the screen contents anyways, so that slightly mitigates the lack of resolution.

    What's next, Lenovo? Get rid of the high-quality finish of the Notebooks and switch to cheap plastic? Fuck up the support infrastructure IBM built? Oh wait, already happened. I guess it's down to the nipple mouse as the last true hallmark of a ThinkPad. And that, I won't give up 'til you pry it from my cold, dead hands.

    1. Re:Goodbye to the ThinkPad brand. by Chalex · · Score: 4, Informative

      The laptops that are getting this change are the Thinkpad Edge models. They are the low-end consumer level Lenovo laptops, Thinkpads in name only. They are not the regular Thinkpad T or X or R series models. The R series is discontinued now anyway. The regular T and X series are staying as they were (with minor modifications). You can read more details here: http://lenovoblogs.com/insidethebox/?p=349

      I look forward to the Thinkpad T series being the solid black square tanks that they have always been.

  13. It's there to tell the OS by hey! · · Score: 5, Funny

    that the user is pressing the SysRq key.

    In fact, to *urgently* tell the OS that the SysRq. It's not supposed to be buffered or anything, it supposed to grab the OS by the collar and scream "THE USER JUST PRESSED THE DAMMNED SYSRQ KEY!!!!" at it.

    But what is that supposed to mean?

    It doesn't mean anything.

    That's the whole point.

    When they were designing the keyboard, they thought of all the things that you might want a keyboard to say ("STOP SCROLLING", "Show me that last page", "Get me the hell out of this input mode"). And after they'd mandated keys for everything anybody could think of, they had a stroke of genius. They mandated a key that did nothing anybody wanted to do.

    Why is that a stroke of genius?

    It is something rare in engineering, which thrives on bravado and feverishly inflated self-confidence. It is an admission of the limitation of human foresight, an acknowledgement that there are more things under Heaven and Earth than are dreamt of in our philosophies; a semiotic *memento mori*.

    This key is mandated to mean nothing, therefore it can mean anything, or indeed, everything.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  14. Re:Print Screen by Jaruzel · · Score: 3, Informative

    Ditto. Alt+PrtScn is your current-dialog-capturing-friend!

    Although, it still amazes me the amount of people who still install 'freeware' utilities to take screengrabs of dialogs, when Windows has had that functionality built in for many versions... ... and I kid you not, I did once have this conversation:

    User: I need Photoshop CS2 installed, here's my Cost-Code.
    Me: Why?
    User: I write documentation that needs screenshots.
    Me: You know you can screengrab via windows and paste directly into Word?
    User: I don't care, Bob has Photoshop, and I want a copy as well.
    Me: *sigh* Ok, I'll buy a copy and charge your dept...

    -Jar

    --
    Together, We Can Make Slashdot Better. I Do NOT Mod ACs. - Check Me Out
  15. Too many keys!!! by Primitive+Pete · · Score: 4, Funny

    Frankly, there are a lot of keys we could get rid of, because they just take up real estate and don't help with the way I use the keyboard. I rarely have rekwirements to use the Q key, and I'm kwite sure that others could get by without it, too. These key-friendly users just need to akwire new work habits. What's hard about that?

  16. What about CTRL and Fc by Tomahawk · · Score: 3, Insightful

    One major ilk I have about laptop keyboard is the positioning of the CTRL and Fn keys.

    I was in a shop recently that sold laptops of many different brands. All of them, except Lenovo, had the CTRL key as the first key in the row, with the Fn key to the right of it. This, IMHO, is the correct position for it - it's where my little finger automatically goes for CTRL, and where it is located on a 'normal' keyboard.

    Lenovo had the Fn key first, with the CTRL key to the right, meaning that when you go to hit CTRL-, I hit Fn instead. This, for me, is a major factor is choosing what laptop to buy - if the CTRL key is in the wrong place, it's marked off the list immediately.

    funny story:
    Several years ago, for work, I got a Compaq Evo N620c (which I still use for work). While the Fn and CTRL keys are in the wrong place, at least they have the forethought to allow you to swap them in the BIOS, which I naturally did.
    Now, the laptop was to be reburned, so the Service Desk took it in. When I went to pick it up the next day, they had a normal keyboard plugged into the PS/2 socket. I asked them why, and they told me that the CTRL key was broken and they couldn't use CTRL-ALT-DEL (yes, it's Windows. *sigh*)
    So firstly I explained to them that the CTRL and Fn keys were swapped in the BIOS, and then asked the question "Why didn't you just use the CTRL key on the other side of the keyboard?" (which, when tried, worked perfectly).
    *sigh*

    T.

  17. Re:PrintScreen by Nadaka · · Score: 4, Funny

    Print screen is tool for terrorists and pirates! You could copy all 15 hours of the extended edition of lord of the rings by using print screen on each frame of film and saving it all to uncompressed bitmaps.[/humor]

  18. Re:Print Screen by Linker3000 · · Score: 5, Funny

    You can use ALT-F4 instead - try it now.

    --
    AT&ROFLMAO
  19. Not very Linux friendly... by Omeganon · · Score: 3, Informative

    SysRQ can be extremely useful in figuring out why a machine has locked up or become unresponsive...

    http://www.kernel.org/doc/Documentation/sysrq.txt

    --
    Omeganon
  20. Comment removed by account_deleted · · Score: 5, Informative

    Comment removed based on user account deletion

  21. I don't care much about the SysRq key but... by Ralphus+Maximus · · Score: 3, Insightful

    For the love of $deity, but the CTRL key back where it frakkin' belongs, next to the frakkin' A key!

    Seriously. CTRL-key combo's are much easier to press, while touch typing, when the CTRL key is just to the left of the A key.

    Cheers,
    RM

    --
    Nobody's as dumb, as I appear to be
  22. Save WinKey, kill Insert by dallaylaen · · Score: 3, Interesting

    Winkey is very useful.

    I have a ton of tiny shell scripts invoked by Win + $key (via xbindkeys):

    "Grey+" / "Grey -" -- volume control
    G -- google current selection (see xclip (1))
    W -- search Wikipedia (or Russian wikipedia with shift)
    A -- open terminal
    K -- invoke xkill (1)
    L -- lock screen
    and some more

    On the other hand, the invenror of the Insert key deserves a mousetrap being put right under the light switch in their room.

    --
    WYSIWIG, but what you see might not be what you need
  23. Re:They're remapping something else by daniorerio · · Score: 5, Funny

    You're hired! - Steve Jobs

  24. Agree Sys Admins Answer by WED+Fan · · Score: 5, Interesting

    While hooked up to a time share in the mid 70's, I wanted to know what the key did. I kept pounding it. After a few minutes, my display responded with ****STOP RINGING THAT DAMN BELL*****. Seems a large clanging bell in the server room, miles away, was hooked up so the System Admin could respond to requests from the user.

    --
    Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.