I haven’t been able to find one. Using Zorin OS which is GNOME.

  • woelkchen
    arrow-up
    58
    arrow-down
    2
    ·
    7 months ago
    link
    fedilink

    Windows has fully user space graphics drivers since Vista. Linux still utilizes kernel modules and I’m not aware of plans to move everything to user space. It’s honestly pretty cool that entire graphics driver can crash under Windows and all that happens is a bit of flickering.

    • cai
      arrow-up
      19
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      Are you sure? It seems like WDDM has a user-mode “User-mode display driver” - which looks to me like the HW-specific part of Mesa: it’s invoked by the D3D runtime - and a “Display miniport driver”, which is in the kernel.

      See https://learn.microsoft.com/en-us/windows-hardware/drivers/display/windows-vista-and-later-display-driver-model-operation-flow

      That said, no doubt Linux’s ability to reset drivers is way, way behind We’re coming up on 20 years since Windows could recover from a graphics driver reset reliably without losing the desktop, and only partial hacks exist on Linux today.

      I really need to get around to building a sample HTML page to show how unsafe having WebGL enabled on Linux browsers is. One long shader, and your desktop is a goner.

      • woelkchen
        arrow-up
        7
        arrow-down
        1
        ·
        7 months ago
        link
        fedilink

        Are you sure?

        I’m not a Windows system architect but I see the Radeon driver on my iGPU under Windows crash all the time in reproducible scenarios.

      • Possibly linuxEnglish
        arrow-up
        5
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        The only time the system can recover is when the display compositor crashes (Wayland)

  • Deckweiss
    arrow-up
    32
    arrow-down
    2
    ·
    7 months ago
    edit-2
    7 months ago
    link
    fedilink

    It doesn’t matter much what Linux you use. Rather what is your desktop environment? (KDE Plasma, Gnome, sway etc.)

    On KDE for example there is a shortcut to restart the compositor, which might fix your issue.


    But in general you might have luck “restarting” it by switching the tty. You do that by pressing CTRL + ALT + some function key between F1 and F8 (the standard gui tty number depends on the distro). Try to switch to a non gui tty and then back.

    For example, on my distro I would do:

    1. CTRL + ALT + F1
    2. CTRL + ALT + F2

    but on yours it might be F7 or some other.

    • Arthur BesseMEnglish
      arrow-up
      4
      arrow-down
      0
      ·
      7 months ago
      edit-2
      7 months ago
      link
      fedilink

      +1 to ctrl-alt-fsomething (start at f1 and go up to move through the different virtual terminals). once in a while there are graphics problems which this will fix.

      If you’re using GNOME Shell on X you can reload the shell (and all of its extensions) with alt-f2 and then in the “Run a command” dialog that appears type r and hit enter. Unfortunately this doesn’t work in GNOME on Wayland.

    • AkipEnglish
      arrow-up
      3
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      I agree with Ctrl+Alt+F1/F2 but would add

      init 3 init 5

      but I learned for my case its better to reboot if my GPU is acting up the instability would eventually come back

      • EddyBot
        arrow-up
        3
        arrow-down
        0
        ·
        7 months ago
        edit-2
        7 months ago
        link
        fedilink

        the init command probably only works in Debian nowadays givin it’s a thing from the sysvinit era

    • JediwanOP
      arrow-up
      3
      arrow-down
      0
      ·
      7 months ago
      edit-2
      7 months ago
      link
      fedilink

      Thanks Zorin OS uses GNOME with Wayland

    • Atemu
      arrow-up
      2
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      While these can help on other issues, these will do nothing if the driver has an unrecoverable issue.

      • rotopenguinEnglish
        arrow-up
        2
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        And the driver is stuffed if the hardware decides to have an unrecoverable issue.

        (I’m looking at you, Intel GuC. You dumb little bastard.)

      • Possibly linuxEnglish
        arrow-up
        2
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        If the kernel runs into a oops it can recover and you won’t notice anything except a nasty looking error in dmesg. If it runs into a panic you need to hard reboot the system as it can’t continue to run.

  • Atemu
    arrow-up
    29
    arrow-down
    0
    ·
    7 months ago
    link
    fedilink

    amdgpu has a recovery mechanism built in that can be triggered using sudo cat /sys/kernel/debug/dri/N/amdgpu_gpu_recover where N is the number of the DRI device in question. You could bind a shortcut to doing that I presume.

    • JediwanOP
      arrow-up
      2
      arrow-down
      1
      ·
      7 months ago
      link
      fedilink

      Hmm I have AMD but I’m getting No such file or directory

      • Atemu
        arrow-up
        5
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        Which part of the path does not exist?

        Is it the correct GPU number?

    • ExtremeDullard
      arrow-up
      1
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      I have an AMDGPU machine - a hateful HP laptop with a Vega 6 chipset - and the display regularly goes garbled when I switch VTs. I too am looking for a way to “reset the graphics card” and cat /sys/kernel/debug/dri/N/amdgpu_gpu_recover ain’t it: it resets it alright, but after that you get a frozen image and X is dead.

      Maybe Wayland survives that but Xorg definitely doesn’t.

      The only reliable graphics card reset solution I’ve every found was to close then reopen the laptop to force the machine to go to sleep, then wake up and go through the restart rigmarole cleanly. I wish there was a way to do that sleep-wakeup routing with a keyboard shortcut, but I haven’t found one.

      I think the real solution is to buy a decent replacement laptop though.

      • Atemu
        arrow-up
        2
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        Yeah, Xorg (and the apps) will likely die. There is a wayland protocol in the works to be able to gracefully handle driver resets but I’m not sure on its implementation status.

  • brax
    arrow-up
    19
    arrow-down
    2
    ·
    7 months ago
    link
    fedilink

    Is that function a niche thing? I’ve never needed it and don’t know anybody who has What are some situations where it might need to be used?

    • some_random_nick
      arrow-up
      7
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      I have a case. My PC at work is a HP Celeron PC. For some reason the Intel HD drivers go nuts in Office and the whole ribbon just turns black. That spreads to all other applications and makes every signel menu bar just a black rectangle. The only solution to this is to restart the driver. No driver or windows update could fix it.

      • bigmclargehuge
        arrow-up
        4
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        If no drivers or windows update could fix it, are you sure it’s not a hardware issue? What you describe sounds similar to bad VRAM symptoms.

        • some_random_nick
          arrow-up
          3
          arrow-down
          0
          ·
          7 months ago
          link
          fedilink

          Happens only in Office. No other program has ever triggered it. So it’s either Intel or HP or Windows, but since it is the lowest offering of hardware and software, probably a combination of all 3.

      • Dave.
        arrow-up
        5
        arrow-down
        2
        ·
        7 months ago
        link
        fedilink

        I think the question is, is it needed in your favourite Linux distro?

        • some_random_nick
          arrow-up
          4
          arrow-down
          0
          ·
          7 months ago
          link
          fedilink

          I guess not, since you would need GPU drivers in the first place /s

          • GolfNovemberUniform
            arrow-up
            1
            arrow-down
            0
            ·
            7 months ago
            link
            fedilink

            Linux has different drivers so the issue may be fixed. Oh and avoid using Wayland on that GPU. In case it fails all unsaved data will be lost

    • auth
      arrow-up
      4
      arrow-down
      0
      ·
      7 months ago
      edit-2
      7 months ago
      link
      fedilink

      exactly my thought

  • Possibly linuxEnglish
    arrow-up
    15
    arrow-down
    0
    ·
    7 months ago
    edit-2
    7 months ago
    link
    fedilink

    Maybe sudo systemctl restart gdm? That’s not quite the same as it restarts gnome display manager.

    When your computer freezes and you can’t get to a tty with Ctrl+alt+F4 then it likely encountered a kernel panic. A panic is not recoverable. In some senerios I’ve seen the amdgpu module run into a kernel oops which is recoverable. It doesn’t really effect the desktop other than a studder as the kernel reinitializes in the background.

    If your system is freezing start by checking RAM and then try a different GPU. Its likely a hardware issue

  • ceiphas
    arrow-up
    11
    arrow-down
    1
    ·
    7 months ago
    link
    fedilink

    There used to exist a hotkey CTRL-ALT-BKSP for restarting your current X-Session, don’t know if this still exists

    • baru
      arrow-up
      9
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      That’s specific to X11. It also wasn’t always enabled for security reasons (breaking out of a locked screen). Now with Wayland there’s no standard.

      • delirious_owl
        arrow-up
        1
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        How is it a security risk to break out of a lock screen only to end up at a login screen?

        • Eufalconimorph
          arrow-up
          1
          arrow-down
          0
          ·
          7 months ago
          link
          fedilink

          You wouldn’t end up at a login screen, you’d end up in the last logged in user’s session.

    • The DoctorEnglish
      arrow-up
      5
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      It’s turned off by default in a lot of distros these days but it can be turned back on. It used to be that editing /etc/X11/xorg.conf was recommended but because file inclusions are a thing these days, it makes more sense to create a new file /etc/X11/xorg.conf.d/enable-killing-xserver.conf:

      Section "ServerFlags"
              Option "DontZap" "false"
      EndSection
      
      Section "InputClass"
              Identifier                       "Keyboard Defaults"
              MatchIsKeyboard        "yes"
              Option                           "XkbOptions" "terminate:ctrl_alt_bksp"
      EndSection
      

      Then restart the X server (which, these days, is pretty much a reboot). Or, going through the x.org documentation archives, it looks like you could dispense with the config files and run setxkbmap -option "terminate:ctrl_alt_bksp" in a terminal session and that’ll do the same thing.

    • Deckweiss
      arrow-up
      4
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      Additionally, it terminated all gui processes. Which the windows shortcut mentioned in the question doesn’t.

      • rotopenguinEnglish
        arrow-up
        6
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        There is a proposal to consider making a Wayland extension where programs can sit around and re-attach to a fresh, non-deaded display server. KDE is much closer to having a working version.

    • ReversalHatchery
      arrow-up
      2
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      That is not an equivalent.

      On Linux, if a graphical app does not crash from this, that is a rare exception.
      On windows, if a graphical app crashes from that, that is an exception.

    • AnUnusualRelic
      arrow-up
      2
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      That doesn’t restart anything. That kills the X11 server.

      It may or may not restart depending on system settings.

    • Possibly linuxEnglish
      arrow-up
      2
      arrow-down
      0
      ·
      7 months ago
      edit-2
      7 months ago
      link
      fedilink

      That doesn’t work for Wayland and I’m unsure which one Zorin uses

    • taladar
      arrow-up
      1
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      That is just the key to kill the X server. It does not restart anything.

    • HubertManne
      arrow-up
      1
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      I was thinking of that when I read this and was like. windows has something like this???

    • ChojinDSL
      arrow-up
      5
      arrow-down
      0
      ·
      7 months ago
      link
      fedilink

      I think on some distros this is disabled by default. I have forgotten how you can re-enable it.

  • Pantherina
    arrow-up
    9
    arrow-down
    6
    ·
    7 months ago
    link
    fedilink

    Please explain why you need that in the post.

    • MangoPenguinEnglish
      arrow-up
      13
      arrow-down
      5
      ·
      7 months ago
      link
      fedilink

      Average linux help post, someone comes along saying “why do you need that” instead of being helpful lol

      • JediwanOP
        arrow-up
        1
        arrow-down
        0
        ·
        7 months ago
        link
        fedilink

        And you know if I had actually given an answer he would have just told me why his way of doing things is better.

    • mindbleach
      arrow-up
      4
      arrow-down
      3
      ·
      7 months ago
      link
      fedilink

      Stop fucking asking people to justify their use case, when they want something that clearly exists elsewhere.

      • Pantherina
        arrow-up
        7
        arrow-down
        1
        ·
        7 months ago
        link
        fedilink

        It matters because Linux is different in everything, how drivers are loaded, what components can be restarted etc.

        It may not be needed or it may, and people are throwing in random solutions while the problem is not clear

        • mindbleach
          arrow-up
          2
          arrow-down
          1
          ·
          7 months ago
          link
          fedilink

          It’s a horrible kludge of a feature that fixes weird problems. That’s gonna be true regardless of OS, and regardless of which exact problems OP has.

          • billgamesh
            arrow-up
            4
            arrow-down
            0
            ·
            7 months ago
            link
            fedilink

            I’m not sure that’s true in a lot of linux use cases. Linux and windows handle drivers very differently. There are a lot of graphics problems which have nothing to do with the driver, and when they do it’s usually wrong driver instead of driver acting up

            • mindbleach
              arrow-up
              1
              arrow-down
              4
              ·
              7 months ago
              link
              fedilink

              Then OP will find out this isn’t something they need.

              You should still answer the question, instead of questioning the question.

              It is infuriating how every technical question has to be justified, as if ‘why do you want that?’ is always a relevant and wise question. Even though it’s omnipresent, effortless, and adds literally nothing by itself.

              • Pantherina
                arrow-up
                4
                arrow-down
                1
                ·
                7 months ago
                edit-2
                7 months ago
                link
                fedilink

                “I want to get rid of my hair, how do I shave my hair on Linux”

                “Why do you want to get rid of your hair?

                'Because when I didnt have sissors before on Windows, I always shaved it to have it not annoy me"

                “But now that you have sissors, why not just cut it”?

                • mindbleach
                  arrow-up
                  1
                  arrow-down
                  4
                  ·
                  7 months ago
                  link
                  fedilink

                  Making up a stupid analogy totally excuses the million derailed threads where someone genuinely just needs something you don’t.

                  Stop letting your ignorance prevent them from solving their ignorance. Answer the goddamn question, first. Feel free to snit at them - after.