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

  • Atemu ( Atemu@lemmy.ml ) 
    link
    fedilink
    arrow-up
    21
    ·
    3 years ago

    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.

    • 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 ( Atemu@lemmy.ml ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        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.

  • Possibly linux ( possiblylinux127@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    3 years ago

    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

    • The Doctor ( drwho@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 years ago

      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.