• Thorry@feddit.org
        link
        fedilink
        arrow-up
        21
        ·
        1 month ago

        Well you say that, but I’ve seen the countdown go past and then reset to a higher number often.

        • TwilightKiddy@scribe.disroot.org
          link
          fedilink
          English
          arrow-up
          15
          ·
          edit-2
          1 month ago

          I entrust you with this horror, go figure out what to blame.

          shutdown-analyze.sh
          #! /usr/bin/env bash
          shutdown_start=$(journalctl -b -1 -u systemd-logind --grep="System is (powering down|rebooting)" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP)
          shutdown_start=$((shutdown_start / 1000000))
          units=$(journalctl -b -1 --since=@$shutdown_start --output=cat --no-pager --output-fields=UNIT JOB_TYPE=stop CODE_FUNC=job_emit_start_message)
          
          for u in $units; do
              stopping_start=$(journalctl -b -1 --since=@$shutdown_start -u "$u" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP JOB_TYPE=stop CODE_FUNC=job_emit_start_message _SYSTEMD_UNIT=init.scope)
              stopping_end=$(journalctl -b -1 --since=@$shutdown_start -u "$u" --output=cat --no-pager --output-fields=_SOURCE_REALTIME_TIMESTAMP JOB_TYPE=stop CODE_FUNC=job_emit_done_message _SYSTEMD_UNIT=init.scope)
              duration_human=$(systemd-analyze timespan $((stopping_end - stopping_start))us | tail -1 | sed 's/.*: //')
              printf "%s\t%10s %s\n" $((stopping_end - stopping_start)) "$duration_human" "$u"
          done | sort -rn | cut -f 2
          
          • Thorry@feddit.org
            link
            fedilink
            arrow-up
            4
            ·
            1 month ago

            Thanks, I usually know what it is tho. Most often it’s VMs I was using for testing stuff, which I forgot to shutdown. It takes a while for them to cleanly shutdown, which is what the wait is for. I have a shortcut on my desktop to a script that checks for any running VMs still and shuts them down. But I forget to click it sometimes and then I have to wait. No big deal, except I like to switch off the power bar that powers the computer and everything attached to it. An old habit from when such a thing mattered, these days standby power is probably nothing to worry about. But still I wait patiently for the computer to shut down till I switch off the power strip.

            • TwilightKiddy@scribe.disroot.org
              link
              fedilink
              English
              arrow-up
              6
              ·
              1 month ago

              If your script somehow shuts them down faster than plain old SIGTERM, putting it under /usr/lib/systemd/system-shutdown/ might be a good idea. Check man 8 systemd-shutdown for more info on that.

      • realitaetsverlust@piefed.zip
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 month ago

        I think that depends on the setting, I had situations where one of my docker containers took ages to shutdown and it would just say 00/02 00s but when it reached that limit, it would just go up.

        • TwilightKiddy@scribe.disroot.org
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 month ago

          Individual services can override the default 90 seconds timeout. But then you can override their override if you think you are smarter, of course.

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      15
      ·
      1 month ago

      (X time / 1:30) but the second time will be extended indefinitely for some fucking reason.

    • anon5621@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      1 month ago

      Yes but no, u can in config file of systemd change timeout to 5,10 second or other number of seconds which u wish before it will kill it

    • RustyNova@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      1 month ago

      My always plugged in HDD with bees on it does that. 1 minute to shutdown at least because there’s always some kind of extend read or dedupe that need a sync.

      … I brought this upon myself so I don’t have to complain.

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      6
      ·
      30 days ago

      It is weird isn’t it.

      Why do they make it so bad?

      I imagine half of linux users could make better automated update rules in their cron.

      So many better ways.

      So why are they making it intentionally bad?

      … Sabotage from Microsoft employees who hate Microsoft?

      … Part of a larger Embrace Extent Extinguish tactic, where they’ve already embraced the Linux Foundation etc enough, they’re ready to extinguish Windows, already having sufficient monopolistic total-control hooks in Linux???

      What are they up to? There has to be a reason it’s so bad. There has to be a reason they go out of their way to make it so bad.

      It surely can’t just be the effects of The Corporation, the hierarchies and compartmentalisations and bureaucracy of the structure where they don’t understand (or even perhaps do understand [and maybe have seen Kevlin Henney’s excellent talk on clean code vs enterprise programming] but) can’t do anything about it, can it?

      What are they building in there? We don’t get to see, we don’t get to know, just trust them, they know best when and how, and so you are not allowed to change it.

      We are not doing that any more.

      • Rothe@piefed.social
        link
        fedilink
        English
        arrow-up
        4
        ·
        30 days ago

        Having a monopoly makes you arrogant. That is probably the only reason why they do it.

      • bufalo1973@piefed.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        29 days ago

        Windows has had always a problem: unlike Unix, where files are referenced by an inode where the name points to, Windows has the names directly linked to the files. When Windows needs to update a system file that is in use it has to stop being used. And for some system files there only one way to do it: reboot. On Unix, the name of the file can change the inode where it points to and the system goes on. The old file exists until every process stops using it and then is erased while new processes access the new file. So no reboot is needed.

        That leads to not having to update everything on reboot. Only the kernel and little more.

      • Samsy@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        30 days ago

        Maybe train you into avoiding shutdowns, never shutdown, stay on Microsoft windows for ever, forget about other things like sleep or eating.

  • Holla@feddit.org
    link
    fedilink
    arrow-up
    55
    ·
    1 month ago

    [**    ] A stop job is running for Session c1 of User gdm (49s / 1min 30s)

  • pelya@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    1 month ago

    Just poweroff is fine. Why lose extra 2.5 seconds typing two words when one word will suffice?

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      3
      ·
      30 days ago

      Reminds of a couple [(brilliantly delivered, poignant)] lines from the movie Sphere.

      “I hope it doesn’t have any feelings.”

      “What happens when he gets upset?”

      • Digit@lemmy.wtf
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        30 days ago

        [Thanks LLM on a websearch for helping remember it was from the Sphere, not 2001, lol… different similar(ish) lines in that. ~ Wait, why am I thanking the LLM? … Does this speak to how gratitude’s good… Or in expressing this gratitude, does it suggest I suspect, on some level, perhaps subconsciously, that the LLM has feelings!?!! Oh well at least we’re not putting LLMs into our local computers that we shutdown. …]

  • Noobnarski@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    30 days ago

    It’s even worse, when I tell my work Windows 11 computer to shut down and I have to choose update and shutdown because it decided to do updates, sometimes it reboots a few times but then it doesn’t turn off afterwards.

    I’m never going to install Windows 11 on any of my devices, it’s so bad.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      30 days ago

      Or my old windows 10 machine would wake itself up in the middle of the night to run updates that the group policy wouldn’t even allow it to download without my permission and then just sit there. If I hadn’t fallen asleep yet, I’d notice the monitor light up the next room and get up swearing at Microsoft until I tracked down where the wakeup timer was set and disabled it. Only to find it re-enabled after some updates.

      Fuck Microsoft.

      • GamingChairModel@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        29 days ago

        It’s fun when your laptop decides to do this kind of nonsense from inside your laptop bag, smothering itself in its own heat.

        • Buddahriffic@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          29 days ago

          Makes me wonder how many laptops seemed to randomly get bricked because it tried to update but then ran out of battery in the middle of it but the user just sees that their laptop had no battery left and then won’t boot properly after that, never realizing it decided to update itself.

      • muusemuuse@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        28 days ago

        I have a solution for this inside on my work computer. I put it on a Shelly plug. I tell homeassistant to power that on before my shift starts. When I shut down the computer at the end of my shift, the plug sees the drop in current draw and powers off that outlet.

        The windows pc doesn’t even get power unless I want it to. It can starve.

  • Rhaedas@fedia.io
    link
    fedilink
    arrow-up
    11
    ·
    1 month ago

    Five seconds? What’s hogging that system? Mine is about two, at most, from the WM shutdown selection.

  • HM King Charles III DG FD@feddit.uk
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 month ago

    Everyone arguing about the amount of keypresses to type a shutdown command and time it takes to shutdown… I just power it off at the wall. One button press, shutdown is near instantaneous

  • Honytawk@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    8
    ·
    30 days ago

    Are you guys really using a command to shut down a computer?

    Because you can do the same with Windows, but nobody uses it because it is just not convenient to use commands for that.

    shutdown /s

    • LePoisson@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      30 days ago

      Yeah, you can even throw a /f in there to force close all apps so it will kill everything and go nighty night. I used to use it with /t command if I wanted to download something while I was out but not have the PC run all day.

      That’s not the best way to turn your PC off but hell half the time I just murder mine by holding down the power button anyways. As long as you’re not being crazy shutting her down in the middle of some data operations you’ll be fine.

  • Siegfried@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    29 days ago

    Powers on

    Immediately starts shut down

    Refuses to close because the following programs are still running

    The list is empty

  • titanicx@lemmy.zip
    link
    fedilink
    arrow-up
    5
    ·
    1 month ago

    You know I’m okay with Windows running updates I shut down or anything else like that. It’s incredibly annoying when people don’t run updates and then wonder why their system gets fucked up. It’s just like on Linux when people just absolutely refuse to acknowledge the fact that they need to run updates. And many times I need to run the updates manually through the command line. There are quite a few gooey applications and things like that that will allow you to run updates but many times you still have to run them manually. And then something breaks and people wonder why I broke when they didn’t run any updates. So in the end really who gives a fuck if it’s running updates on shutdown you hit the button says run updates you tell it to run updates and you either close the lid on your laptop and walk away or you carry it till it shuts down within a few minutes and then you shut it down. Or you just let your desktop run until it’s done. It’s really not that big of a deal that people here seem to make it out to be and seem to make 10 different memes a day about the shutdown process on whatever OS they want to shut down.

    • KmlSlmk64@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      1 month ago

      For most people, especially work computer/laptop users, making the update happen by default on restart or during sleep hours does a lot to keep the pc updated, because they would otherwise never do it themselves. There is a somewhat large minority of users who complain about such behaviour, but these are mostly people into computers anyways and can update their stuff anyways.

      But the biggest gripe is the horrid implementation of the start menu power buttons in windows:

      • update and restart: mostly works as you would expect - updates and boots the pc
      • update and shutdown: updates the pc, and instead of leaving the pc in shutdown state, many times it just boots the pc again, working like update and restart
      • restart/shutdown without updating: non-insignificant chance of it doing the update anyways
      • lobut@lemmy.ca
        link
        fedilink
        arrow-up
        4
        ·
        30 days ago

        Thank you for mentioning the horrible implementation of the power button options.

        Update and shutdown? Nah, I don’t feel like it. I’m gonna restart five times also and then I’m boot into Windows.

    • absentbird@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 month ago

      But you don’t need to restart Linux for updates most of the time, basically just kernel updates, and those aren’t often done more than once a month or so, less for fixed point release distros

      • Digit@lemmy.wtf
        link
        fedilink
        English
        arrow-up
        2
        ·
        30 days ago

        And even then, there’s the hot patching potential for a running kernel to upgrade without reboot.

      • titanicx@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        30 days ago

        And you don’t necessarily need to reboot Windows for all of their updates either if you keep it updated. But there’s quite a few updates I’ve run on Linux especially servers that have been neglected when I’ve gone into companies because people are like herder I don’t need to patch or update anything on linux that do require reboots.

    • Wispy2891@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      30 days ago

      The problem is how they install the fucking updates.

      “OMG IT’S PATCH TUESDAY!!!11111!! NEEED TO REBOOT IMMEDIATELY RIGHT NOW I MUST FORCE CLOSE ALL THE OPEN APPLICATIONS WITHOUT SAVING ANY WORK, THE USER GONNA APPRECIATE THAT”

      • titanicx@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        30 days ago

        I mean it’s not really horrible it’s actually a pretty good idea for people that either a are not computer savvy or b wouldn’t normally update without being reminded to do stuff like that. Which unfortunately for people like you and I is the vast majority of people in you know the world. Actual computer users who understand and can do it on their own are very few and far between. Think about an average company of say 5,000 people and that’s a small fish company. There’s an it department of what maybe 10 to 15 if that. And in that case you may be have another 20 users maybe 30 users total that have any knowledge of computers at all. That’s a huge amount of people right there in a huge amount of computers that would never have any updates for patches and become vulnerable to everything from crashing to getting hacked. Without those automatic upd

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      1
      ·
      30 days ago

      It’s nice to have the choice.

      One of my systems [that is actually in use], I’ve not run an update for near as long again as how long it’s been since I rebooted it, and have not even hot-patched it, nor upgraded anything, … uptime says: “08:07:28 up 2687 days, 29 min, 1 user, load average: 0.00, 0.00, 0.00”

      (And it’s a gentoo… And I love upgrading long neglected gentoos… … though that’s maybe an order too far, that long. A couple years, fine, fun, but less than a year away from 3000 days (plus another grand or two). LOL. But still, the freedom to choose to do that… is nice.)

      … Just before clicking Reply, I hear Richard Stallman’s [paraphrased(?)] words echoing around in my mind… Either the user controls the software, or the software controls the user at the behest of someone else.

  • HugeNerd@lemmy.ca
    link
    fedilink
    arrow-up
    5
    ·
    30 days ago

    “shutdown” is a noun. I was on vacation because the company was in shutdown.

    “shut down” is the compound verb you wanted.