r/linuxmint • • 9d ago

SOLVED how do i kill an app when everything is completely frozen?

pretty much every time i try to run a video game it crashes my laptop, and every time this happens i cant get system monitor to kill the program thats causing the issue because everything is completely unresponsive. even trying to open the terminal wont work. whats the protocol for this? other than just holding the power button, i really dont want to have to do this every time. ive heard people talk about using a virtual console to end the program causing the issue that way, but i dont know what commands to use after opening it(?) and dont want to just make things worse. so what is the suggested way to proceed in this situation?

16 Upvotes

14 comments sorted by

•

u/AutoModerator 9d ago

Please Re-Flair your post if a solution is found. How to Flair a post? This allows other users to search for common issues with the SOLVED flair as a filter, leading to those issues being resolved very fast.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

17

u/Jeremi360 9d ago

You can press `F(2-7) + alt + ctrl`, to switch/login to full screen terminal session, after you login to it you can use command `htop` to see all processes, and after you find this game process you can type `killall game_process`, you can then press `F8 + alt + ctrl` to go back to normal session.

4

u/bluejayhaze 9d ago

thank you, ill try this next time

4

u/ohho_aurelio 8d ago

Ctrl+alt+backspace is another option that forces a user logoff, including killing the game. Sometimes I do this if my game crashes during a ranked match and I have to reconnect as fast as possible.

6

u/thatdirtyoldman MINT 22.3 - Cinnamon 9d ago

I had to use crtl+alt+F7 to get back.

8

u/LPedraz 9d ago

CTRL + ALT + F2 will open a terminal-only mode. In most cases, what is frozen will be in your desktop environment, and that will still work.

You can then check all open processes with htop

Any process can be ended with kill processname

6

u/computer-machine 9d ago

Thermite 

3

u/DavidJohnMcCann 8d ago

Why doesn't any mention the SysRq key? If that doesn't work on your system you need to set /proc/sys/kernel/sysrq to 1.

2

u/_Lost-In-The-Weeds_ LMDE7 Cinnamon 7d ago

As others have stated try accessing the TTY. 

If that does not work try REISUB

I had one machine with subtly broken RAM, it would on occasion lock up hard, usually when I had a lot of tabs open in a web browser (heavy memory pressure) it passed memtest86 overnight so it took me years to figure out it was bad memory causing it. None of the above worked in that case. Replacing the ram on a hunch finally fixed the issue. 

1

u/AdventurousItem4635 9d ago

When it's RAM filling up like userrr3 says, the TTY switch often hangs too, the machine is too busy swapping to draw anything. Alt+SysRq+F still gets through then. It makes the kernel kill whatever is using the most memory, which will be the game. On a laptop SysRq is usually the PrtSc key, sometimes with Fn.

Mint has that combo switched off by default though, it only lets the sync and reboot keys through. Turn it on once with echo kernel.sysrq=1 | sudo tee /etc/sysctl.d/99-sysrq.conf and then sudo sysctl --system, and it stays on after reboots.

1

u/Jnaythus 9d ago

I use monitor scaling (under "Display"). I'm at 150% because, well I'm older, and my monitor is a 4K ultrawide, so it's uncomfortable even when wearing my readers. Something about using that causes issues with games running, so before starting a game, I have to set it back to 100%, and then I have no more lockups from games (for the most part).

1

u/WolvenSpectre2 9d ago

Control Center or Stacer (on top of the dropping to TTY and running htop or similar programs). You will have to install them though. Then you get a Windows Task Manager in the GUI.

1

u/LarsHEriksen 8d ago

It could be faulty RAM. Run a memory test from the boot menu to check.

1

u/userrr3 9d ago

The solution is to solve the underlying problem. To me it sounds like your RAM fills up completely (been there), could that be the case? Won't blame you for not buying extra RAM in this day and age but a swap file or partition (if you don't already have one) might not be fast enough to solve that problem, worth a shot though.