Ways to 'escape' or get to a terminal from a frozen system?

This is probably a question I should be able to answer through Google, but what I’ve found so far just isn’t working…

Over the past couple days I’ve had some occasions on which games froze up on me (once in Mass Effect Legendary Edition - that one’s for me! - and once in playing Roblox with my daughter). The system wasn’t completely ‘dead’ - there were still background sounds playing in the games, the Caps Lock light was toggling when I pressed the key, etc. - but it was non-responsive to:

  • Alt-Tab
  • Super-Tab
  • Ctrl-Alt-Del
  • Ctrl-Alt-any function key
  • Quick-pressing my laptop’s power button

I really wanted to try some more graceful way, but couldn’t figure it out and ended up having to hold down the power button to “hard shutdown”. I hate to do that, so my question is, does anyone know of a way to either get to a terminal from a really frozen interface, or to at least try to trigger a more graceful shutdown in that case?

Thanks for any ideas!

My inxi -Fzxx if helpful:

System:
  Kernel: 6.1.6-200.fc37.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.38-25.fc37 Desktop: GNOME v: 43.2 tk: GTK v: 3.24.36 wm: gnome-shell
    dm: GDM Distro: Fedora release 37 (Thirty Seven)
Machine:
  Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-ec2xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 88DD v: 96.33 serial: <superuser required> UEFI: AMI
    v: F.22 date: 08/10/2022
Battery:
  ID-1: BAT0 charge: 46.9 Wh (99.8%) condition: 47.0/47.0 Wh (100.0%)
    volts: 12.8 min: 11.6 model: HP Primary serial: <filter>
    status: not charging
CPU:
  Info: 6-core model: AMD Ryzen 5 5600H with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 16 MiB
  Speed (MHz): avg: 1724 high: 3300 min/max: 1200/4280 boost: enabled cores:
    1: 1200 2: 1200 3: 3300 4: 1200 5: 1200 6: 3300 7: 1200 8: 1198 9: 1200
    10: 1200 11: 3300 12: 1200 bogomips: 79057
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA TU117M vendor: Hewlett-Packard driver: nvidia v: 525.78.01
    arch: Turing pcie: speed: 2.5 GT/s lanes: 8 ports: active: none
    empty: HDMI-A-1 bus-ID: 01:00.0 chip-ID: 10de:1f99
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: Hewlett-Packard driver: amdgpu v: kernel arch: GCN-5.1 pcie:
    speed: 8 GT/s lanes: 16 ports: active: eDP-1 empty: none bus-ID: 05:00.0
    chip-ID: 1002:1638 temp: 48.0 C
  Device-3: Luxvisions Innotech HP TrueVision HD Camera type: USB
    driver: uvcvideo bus-ID: 3-3:3 chip-ID: 30c9:0035
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 22.1.7
    compositor: gnome-shell driver: X: loaded: amdgpu,nvidia
    unloaded: fbdev,modesetting,nouveau,vesa alternate: nv dri: radeonsi
    gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 model: BOE Display 0x094d res: 1920x1080 dpi: 142
    diag: 395mm (15.5")
  API: OpenGL v: 4.6 Mesa 22.3.3 renderer: AMD Radeon Graphics (renoir LLVM
    15.0.6 DRM 3.49 6.1.6-200.fc37.x86_64) direct render: Yes
Audio:
  Device-1: NVIDIA vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:10fa
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Hewlett-Packard
    driver: N/A pcie: speed: 8 GT/s lanes: 16 bus-ID: 05:00.5 chip-ID: 1022:15e2
  Device-3: AMD Family 17h/19h HD Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
    bus-ID: 05:00.6 chip-ID: 1022:15e3
  Sound API: ALSA v: k6.1.6-200.fc37.x86_64 running: yes
  Sound Server-1: PulseAudio v: 16.1 running: no
  Sound Server-2: PipeWire v: 0.3.64 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8168
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtw89_8852ae v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: d000 bus-ID: 03:00.0 chip-ID: 10ec:8852
  IF: wlo1 state: up mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8
    bus-ID: 1-4:2 chip-ID: 0bda:2852
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 476.94 GiB used: 190.37 GiB (39.9%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLQ512HALU-000H1
    size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 32.9 C
Partition:
  ID-1: / size: 475.35 GiB used: 190.04 GiB (40.0%) fs: btrfs
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 973.4 MiB used: 320.5 MiB (32.9%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 17.4 MiB (2.9%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 475.35 GiB used: 190.04 GiB (40.0%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 60.2 C mobo: N/A gpu: amdgpu temp: 49.0 C
  Fan Speeds (RPM): fan-1: 0 fan-2: 0
Info:
  Processes: 378 Uptime: 2h 48m Memory: 14.97 GiB used: 4.01 GiB (26.8%)
  Init: systemd v: 251 target: graphical (5) default: graphical Compilers:
  gcc: 12.2.1 Packages: pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 30
  Shell: Bash v: 5.2.15 running-in: gnome-terminal inxi: 3.3.24

There is a command if your keyboard supports it. I have an old school linux keyboard with the Print Screen/SysRq key.

Restart: Alt + Printscreen + REISUB
Shutdown: Alt + Printscreen + REISUO
Logout: Alt + Printscreen + K

1 Like

Full Magic SysRq is not enabled by default on Fedora, IIRC. See QA/Sysrq - Fedora Project Wiki for more details.

If I run:

$ cat /proc/sys/kernel/sysrq
16

which means only the sync command (S) is enabled.

You would need to run one the enabling commands in the above link to allow for the full REISUB set.

1 Like

Thank you, I’m ashamed I didn’t find that page on my own but really appreciate the help!

Apparently you did not try the following.

alt f2 may open a box, where you can type a command.

control alt F3 goes to console and control alt f2 resumes.

I write the rescue commands on a sheet of paper that I keep with the computer. In simple issues, it can avoid the hard shutdown.