reupload because i mixed up sigterm and sigkill like a dumb fuck

        • RustyNova@lemmy.world
          link
          fedilink
          arrow-up
          14
          ·
          edit-2
          5 months ago

          In those cases there’s an easy solution.

          Step 1: sigh

          Step 2: press the power button 5 or 10 seconds while contemplating why you decided to do a quick restart instead of keeping the session and do something actually productive

          • KubeRoot@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 months ago

            I recommend starting with SysRq+E before that, there’s a chance it gets whatever the shutdown was waiting for. And if that fails… REISUB my beloved.

              • KubeRoot@discuss.tchncs.de
                link
                fedilink
                English
                arrow-up
                4
                ·
                5 months ago

                I might be missing something, but the order I know and have always seen recommended is REISUB. Terminating processes might write data to disk, so it seems to me like you should sync after, not before. Though this is also generally unimportant with modern filesystems and storage media.

      • RustyNova@lemmy.world
        link
        fedilink
        arrow-up
        12
        ·
        5 months ago

        That’s because it first send sigterm, then sigkill. Then it gives up and let the kernel handle it…

        Happens on my BTRFS disk’s unmount. If the kernel is currently busy handling some heavy btrfs command (like a 4tb scrub), systemd cannot stop it with sigkill.

        So when it eventually gives up, you also need to wait for the kernel to finally stop the operation and actually disconnect the disk.

  • empireOfLove2@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    46
    ·
    edit-2
    5 months ago

    also yes i know shutdown typically uses sigterm and waits nicely, but it doesn’t take 45 seconds for no damn reason like windows

    also sigkill is funnier

    • Sanguine@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      10
      ·
      5 months ago

      Maybe something I don’t know, but I send kill commands through btop all the time on a systemd based machine.

      • Ooops@feddit.org
        link
        fedilink
        arrow-up
        12
        ·
        5 months ago

        The point here is that SystemD’s natural behavior is to send SIGTERM then wait an eternity.

        Those “service XY is shutting down (5sec/2min)” messages you sometimes get on shutdown are coming from SystemD not waiting for 3 seconds like the meme suggests, but waiting for minutes before giving up and switching over to SIGKILL instead.

          • Ooops@feddit.org
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            5 months ago

            There is the option to explicitly set DefaultTimeoutStartSec and DefaultTimeoutStopSec per systemd service.

            If you don’t specify it in a service file, the default values from /etc/systemd/system.conf (both set to 90s) will be used, so you can change those values to 30s, too, to affect all services (that don’t have their limit set explicitly) globally.

  • Wispy2891@lemmy.world
    link
    fedilink
    arrow-up
    40
    ·
    5 months ago

    Reverse meme when it’s time to install the updates.

    Windows in that case is “I MUST REBOOT IMMEDIATELY PREPARE TO LOSE ALL UNSAVED DATA IN 3. 2. 1…”

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      21
      ·
      5 months ago

      When I switched to win 10, I actually gave them more money to get the pro version for access to the group policy editor so I could control updates and never have to deal with my PC telling me it’s time to restart on its own. Because I was stupid.

      When it came time to switch to Win 11, I did the much more sensible thing and installed Fedora instead. I started with cinnamon and even though I ended up disliking it also, it was still way better than the windows experience.

    • Trail@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      5 months ago

      Not quite. I will RESUME FROM THIS FUCKING “MODERN SLEEP” shit, even though you the user want to turn this shit right off, do it without any warning watsoever, close all your fucking windows and good luck if you have lost work or not.

    • Sylvartas@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      14
      ·
      5 months ago

      I’ve had it yell at me because it couldn’t close some dialog window that explorer opened because I was trying to shut it down

      • punkfungus@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        5
        ·
        5 months ago

        The number of times I’ve told my work laptop to shut down on Friday, and found it still running on Monday is too damn high. And it’s usually because I had two instances of VSCode running, and when they got closed they both tried to run an update, and the setup processes interfered with each other. The resulting dialog window prevents shutdown.

        Every workday using Windows is just further validation for running Linux on my own hardware.

    • tc4m@lemmy.world
      link
      fedilink
      arrow-up
      14
      ·
      5 months ago

      Had the pleasure of installing some HPE proprietary crap on RHEL the other day.

      After the cli installer ran it printed: rebooting now.

      It then killed PID 1 to force the reboot …

      We were flabbergasted. Why would the first and only method of asking the system to reboot be to shoot the system in the head?

      • Billegh@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        I was installing something decades ago that set the default runlevel to 6 and inserted itself as a runlevel 6 service. It would reboot until it had finished the changes it wanted to make and then set the runlevel back. Weirdest trash software. The service stayed to “apply updates on reboot”

        I’m glad I don’t have to work there anymore.

      • addie@feddit.uk
        link
        fedilink
        arrow-up
        7
        ·
        5 months ago

        Just bind update/shutdown to a key you don’t press often, like keypad insert.

        yay --noconfirm ; sudo shutdown now
        

        Any problems with update, computer is put straight out of its misery. Bang.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      Just hold on to your butt and cut the main power.

      But then don’t forget to switch back to main power before the auxiliary power runs out of fuel or things will get really bad.

      Unless it’s the movie and they cut out the whole auxiliary power and just set it up such that all power goes out and no one thought of being at the power station to get the main generator back up and running asap before cutting the park’s power.

  • Get_Off_My_WLAN@fedia.io
    link
    fedilink
    arrow-up
    13
    ·
    5 months ago

    I had to update a Windows 11 work laptop after not touching it for nearly a year. I click ‘shut down’ from the start menu and nothing happens. What? Try it again. Nothing again.

    I have to hold down the power button before the screen shows a “slide to shut down” screen now. How did Microslop fuck up the ‘shut down’ so badly.

    • chiliedogg@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      5 months ago

      I love how the design is so bad now we’re missing the days when shutting down the computer required the “Start” button.

    • hexagonwin@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      the alt f4 shutdown window present since win95/nt4 tends to work better than the latest slop menu they made

  • jason@discuss.online
    link
    fedilink
    English
    arrow-up
    12
    ·
    5 months ago

    The first time I shutdown a Linux computer, I thought I broke something it happened so fast.

      • highball@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 months ago

        Same. I still feel like I should be parking the heads on my 10mb hard drive. Honestly at this point, I’m too embarased to ask if there is a proper way to send my servers for a reboot, and I cross my fingers I can log back in.

      • jason@discuss.online
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        1
        ·
        5 months ago

        I think that reaction comes from messing with computers too much. When you fuck up in a computer, that sudden shutdown is what you get. Gives me flashbacks.

  • CosmoNova@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    5 months ago

    Ironic. Because a bug on CachyOS KDE made the shut down button in the quick menu disappear. Nobody in their community could help me or explain why. Generally I would say support is rather spotty with CachyOS in general. Of course you can shut it down in many other ways but that was my preferred one. So I just lived with it and instead used ctrl+alt+delete for a while until the button magically returned one day.

    • lyralycan@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      If you use Emby Desktop, when it’s full screen it interrupts all shutdown commands. Only GUI option is ‘cancel’, running shutdown remotely fails… Just need to exit full screen but who the hell decided an Electron app was more important than my choices

  • Aniki@feddit.org
    link
    fedilink
    arrow-up
    10
    ·
    5 months ago

    also true for boot (not from suspended state), in my experience.

    windows: wait, let me display the windows logo for 10 seconds, then show a spinny circle, then show the lock screen, then when you try to enter your password, it loads your user profile for another 5 minutes before it shows your desktop icons

    linux: click the power button -> 1.5 seconds later i see the lock screen. enter password and it’s just there.

    • punkfungus@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      5 months ago

      I’ve found it to be very dependent on the distro and the hardware it’s running on. Back when I was playing around with distros I definitely tried some that felt like you snapped your fingers and had a desktop. But I settled on Fedora and that takes longer to boot for me than Windows. Not that I mind, 30 seconds once a week or so just isn’t important to me.

      • BlueKey@fedia.io
        link
        fedilink
        arrow-up
        2
        ·
        5 months ago

        Are you perhaps on Wifi? I noticed that Fedora is has configured Systemd to wait for online network before continuing starting the login services.

        • punkfungus@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 months ago

          No, this is on a wired machine. I have another one on wireless also running Fedora and I’d say that one is slower to boot, however it’s also on a Ryzen 3600 where my main PC is a 5700X so that’s kinda expected anyway.

    • myotheraccount@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      Back when i still had windows as a second boot option, it was soooo annoyingly slow to boot (like 3 minutes or so). I thought it’s because I installed it on a HDD, not SSD (and that was indeed part of the reason). One day when my internet broke though, I realized it was actually super fast to boot suddenly. It just spent half the time downloading stuff from the internet before, during boot. From then on I just pulled the ethernet cable before booting windows. Fucking joke of an operating system

  • iocase@lemmy.zip
    link
    fedilink
    arrow-up
    9
    ·
    5 months ago

    Xkill is my favorite. I prefer aiming the gun and pulling the trigger myself

  • cybervegan@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    5 months ago

    Nah man. “kill” doesn’t shut the system down quickly. This is the “instant death” way - the kernel reset gun - no shutdown scripts, no disk sync, just reset to BIOS boot sequence, instantly:

    As root:

    echo 1 > /proc/sys/kernel/sysrq

    echo b > /proc/sysrq-trigger

    If you change out the “b” in the second command for “o” it will just halt the kernel instead of rebooting. Still switched on, but the system is doing absolutely nothing.

    I used to use this trick all the time to test high availability server clusters.

    • filcuk@lemmy.zip
      link
      fedilink
      arrow-up
      3
      ·
      5 months ago

      Pardon my ignorance, how does halting the kernel help? We’re you seeing if other instances jump in for the halted one?

      • cybervegan@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        5 months ago

        You mean in the context of high availability?

        tl;dr: It’s to test if the cluster fail-over configuration is working properly.

        So this was before things like Kubernetes or Terraform were a thing, so had to be done by the operating system itself. The simplest HA cluster is made of two nodes, one in “active node”, the other “passive”. The active node does all the work, and the passive node just keeps its data synchronised with the active node. I used to use DRBD for this, which is a system for copying writes to the active node over a network link to the passive node. That only gives you a “second, up-to-date copy” which is not that useful on its own - you also need a way to automatically switch over to using the passive node if the active one “dies”, and for that I used to use “heartbeat”, which simply passes packets back and forth between the two cluster members - ping-pong style - and if the passive node notices that the active node hasn’t sent its scheduled packet for, say, 10 seconds, it cuts it off the current active node (kills it), and promotes itself to the active role, thus preserving the service. Killing the “other node” is necessary to stop data corruption or user requests going to a node that can’t actually service them, and is called STONITH - Shoot The Other Node In The Head. STONITH can involve an electronically controlled switch, which literally cuts off power to the “other” node, or can isolate it on the network, by shutting down its network ports on the switch, or in a VM setup, sending a notification to the hypervisor to kill the VM.

        The reason you need to be able to kill the kernel on the active node, is that when you manually shut down the active node, it automatically informs the passive node that it’s going down, known as an “orderly fail-over”, and you’re not actually testing if the heartbeat fail-over works, you’re just testing an orderly fail-over. Killing the active node’s kernel tests that the passive node is properly configured to take over during a catastrophic failure of the active node. You can watch the heartbeat status go from “up” to “down”, and then see the passive node decide to take over, promote itself and bring up its services, and begin processing requests.

        To make sure it’s all working, you need to test orderly fail-overs first, from both nodes, then test disorderly fail-overs both ways, by using the kernel gun on the active node.

        Things moved on from Heartbeat-based HA clusters to multimode clusters managed by Corosync and other software, enabling other strategies to be employed. This was eventually supplanted by “orchestration” systems like Kubernetes, and proprietary Virtual Cloud systems that move this functionality to the platform rather than the operating system.

        • filcuk@lemmy.zip
          link
          fedilink
          arrow-up
          2
          ·
          5 months ago

          I see! That’s fascinating stuff. I only do simple home hosting, so I never get into deployments like this, or how things used to be done, but love to hear the intricacies of it.

  • Evotech@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    5 months ago

    Reboot

    Windows: save all your woooork. What apps you had open? How would I know?

    Linux: it’s all saved in ram, don’t worry. It’ll be like you never rebooted