this post was submitted on 23 May 2025
622 points (98.3% liked)

linuxmemes

25051 readers
2001 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] [email protected] 24 points 14 hours ago
    [–] [email protected] 12 points 13 hours ago

    Hah! This might be the best use of this meme template I've seen. And this template has a lot of good ones.

    [–] [email protected] 73 points 1 day ago (3 children)

    I feel like I should understand this, but I don't.

    [–] [email protected] 8 points 3 hours ago

    Think of it like breaking news for your processor

    "WE INTERRUPT THE CURRENTLY RUNNING APPLICATION TO BRING YOU THIS MESSAGE: e"

    [–] [email protected] 179 points 23 hours ago* (last edited 23 hours ago) (6 children)

    This is x86 assembler. (Actually, looking at the register names, it's probably x86_64. On old school x86, they were named something like al, ah (8 bit), ax (16 bit), or eax (32 bit).) Back in the old days, when you pressed a key on the keyboard, the keyboard controller would generate a hardware interrupt, which, unless masked, would immediately make the CPU jump to a registered interrupt handler, interrupting whatever else it was doing at the point. That interrupt handler would then usually save all registers on the stack, communicate with the keyboard controller to figure out what exactly happened, react to that, restore the old registers again and then jump back to where the CPU was before.

    In modern times, USB keyboards are periodically actively polled instead.

    [–] [email protected] 8 points 4 hours ago (1 children)

    Right, PS/2 cable. I remember having to reboot, if you accidentally unplugged it.

    [–] [email protected] 4 points 3 hours ago

    Oh, you're right! I completely forgot that was a thing. But I do remember the "keyboard not found, press f1" message.

    [–] starman2112 52 points 14 hours ago* (last edited 14 hours ago)

    The virgin USB: hey, uh, when you get a chance, uh, if it's not too much trouble, could you, uh, put an 'e' there? Whenever you get the chance is fine

    The chad PS/2: THE USER SAID E.

    [–] [email protected] 4 points 9 hours ago* (last edited 9 hours ago)

    Thanks for the explanation. Ironically this was the bit I didn't know:

    In modern times, USB keyboards are periodically actively polled instead.

    I was thinking the implication was that some computer had faulty interrupt handling that would smash the status register or something.

    Honestly I think I'm just too old to understand memes.

    [–] WhyJiffie 24 points 21 hours ago (2 children)

    does that mean though that if I connect a PS/2 keyboard or mouse to my relatively modern computer (a "gamer" motherboard made ~6 years ago) 's PS/2 port, that it'll still trigger such an interrupt?

    [–] atomicbocks 21 points 19 hours ago (1 children)

    The other commenter is on the right track but the chip controls both USB and PS/2 as well as others;

    In the 90s and 2000s, for x86 machines, slower I/O was handled by a chip called the Southbridge which worked in conjunction with a chip called the Northbridge that handled faster I/O like IDE and PCI. Later these were integrated into a single chip and, as of recent processor generations, into the processor itself.

    AFAIK ghosting and key rollover are issues when using PS/2 but it can offer some milliseconds off latency when used in high cpu games.

    [–] [email protected] 6 points 18 hours ago* (last edited 18 hours ago) (2 children)

    AFAIK ghosting and key rollover are issues when using PS/2

    I think it's more of an issue for USB keyboards than PS/2 keyboards.

    [–] [email protected] 9 points 17 hours ago

    They are wholly independent from the protocol or interface. Ghosting is an electrical issue that is a result of keyboards being a bunch of switches arranged in a matrix. It makes the keyboard's controller register an extra keypress in certain conditions. Nothing to do with how the thing communicates with the host computer.

    Key rollover issues can be related to ghosting. The limit for it is once again the keyboard's design at the circuit level, not its communication protocol.

    Really they're both related to how cheaply built the keyboard is. That's the only thing.

    [–] [email protected] 7 points 17 hours ago

    Ghosting entirely depends on the wiring of the keyboard pcb. Key rollover can depend on the wiring of the keyboard pcb, but usually is limited by the usb HID protocol.

    Generally speaking, usb can carry up to 6 keys of information in a single packet (I don’t remember off the top of my head if modifiers are included). It is possible to use extended packets and encode more info (and thus allow for more than 6 keys rollover) but it requires negotiation with the os so most vendors don’t bother as generally you don’t need to be able to press more than 6 keys at the same time for most applications.

    [–] [email protected] 11 points 21 hours ago (1 children)

    I think there's a USB device inside the mobo to handle dumb peripherals. So it would still trigger an interrupt, but it wouldn't make it to the CPU. The USB keyboard controller would handle it and cache the strokes locally until polled by the CPU.

    [–] [email protected] 6 points 20 hours ago (2 children)

    I would expect that any motherboard that went to the trouble of including a PS/2 port would handle it with a real hardware interrupt, because the whole point of still having those things is to avoid the latency overhead of USB.

    [–] [email protected] 1 points 3 hours ago* (last edited 3 hours ago)

    there are loads of things in the gamer space that are just branding BS… i could definitely see dodgy (or honestly even reputable) motherboard manufacturers adding PS/2 ports that are just basically a USB dongle built into the board and adding $40 for the dubious privilege

    [–] kopasz7 9 points 19 hours ago (1 children)

    Largely an urban legend. The internal electronics of the keyboard/mouse matter more than the protocol for end to end latency.

    There are USB keyboards that beat a PS/2 one, at just 125 Hz polling. 1000 Hz polling pulls ahead even more.

    https://www.youtube.com/watch?v=eEswl6kZq5k&t=650

    [–] [email protected] 1 points 4 hours ago* (last edited 4 hours ago)

    But honestly, 1000 Hz polling is just for bigger numbers game. Even 300 ms are barely noticeable by humans, not to mention 10 ms of 100 Hz.

    [–] [email protected] 7 points 17 hours ago* (last edited 17 hours ago)

    You're right, but rax is amd64.

    I think there were a few early amd64 systems with genuine ps2, and I think you can still get one, but it wasn't common, and honestly it's probably usb->ps/2.

    To be a pedantic asshole: mov eax, ecx? Unless you're commenting on the insanity of interrupt driven i/O in the modern age of high performance, deep-pipelined superscalar OOO cores.

    [–] [email protected] 11 points 22 hours ago

    I had to write a mini os and it handled keyboard interrupts. Certainly made it make a lot more since after writing it for my uni course

    [–] [email protected] 32 points 1 day ago

    The small bird is a CPU executing its instructions. The big bird is a keyboard sending an interrupt for the CPU to process immediately.

    [–] [email protected] 47 points 1 day ago

    And their interrupt routine has an error that leads to changed memory and you don’t know why your Programm calculates β€ž2+6=Eβ€œ and that only sometimes on every other run.

    [–] [email protected] 22 points 1 day ago (2 children)
    [–] [email protected] 8 points 18 hours ago

    Raising Elephants Is So Utterly Boring

    [–] [email protected] 7 points 22 hours ago* (last edited 22 hours ago) (2 children)

    !!! I just learned about this recently because my PC has an Nvidia GPU and it sometimes wakes up from sleeping to a blank screen with just the mouse cursor showing.

    I try that REISUB first but if that doesn't do anything, I have to go to Ctrl-Alt-F3 and do "sudo reboot".

    Linux is fun except for when it's not.

    [–] [email protected] 2 points 9 hours ago

    You probably have to enable it in sysctl

    [–] [email protected] 5 points 22 hours ago (1 children)

    I’m confused. Why would you REISUB/O if you can use the reboot command?

    REISUB is a last resort before hitting the physical power button

    [–] [email protected] 1 points 21 hours ago (2 children)

    Haha, because I'm lazy and going with the fastest, safe way to reboot when I get stuck.

    [–] [email protected] 8 points 20 hours ago

    reisub is not "safe". it is the "safest" way when your system has reached an otherwise broken state, but you're still interrupting things that may be saving state or changing configurations. if your system is working behind the scenes you may very well break it more.

    [–] [email protected] 7 points 20 hours ago (1 children)

    You should really use the reboot command first because you don’t have to control the order and timing. REISU(B/O) requires pauses between letters for the specific action to run. It also requires those letters to be in that particular order - you can’t sync the file system if you put it into read only. If REISUB is sometimes not working but you can go elsewhere and reboot, you’re likely not doing it right and you should err on the side of caution and use the reboot command

    [–] [email protected] 3 points 19 hours ago

    Gotcha, thanks;

    [–] [email protected] 11 points 23 hours ago (18 children)
    [–] [email protected] 7 points 23 hours ago

    Don't forget the xt/at port

    load more comments (17 replies)
    [–] [email protected] 2 points 23 hours ago
    load more comments
    view more: next β€Ί