this post was submitted on 11 Feb 2024
121 points (98.4% liked)

Linux Gaming

15494 readers
521 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 2 years ago
MODERATORS
 

Hello! You may be interested in Hyprfreeze if you game in Hyprland. It's a small script that lets you suspend games just like gaming consoles do.

I always find it annoying when I'm playing and I quickly need to leave my desk or talk to someone, only to die to some random enemy in Elden Ring or to miss (unpausable) cutscenes of a game.

I've built this script to prevent that from happening and over time it's reached a point where I find it robust enough and want to share it with others. Any feedback is always appreciated.

Github repo: https://github.com/Zerodya/hyprfreeze

top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 17 points 10 months ago* (last edited 10 months ago)

For anyone interested in this awesome concept, but isn't a Hyprland user, there's a great flatpak app called Nyrna, which basically does the same thing.

[–] [email protected] 12 points 10 months ago (1 children)

That is really great. I love the setup of the wrapper and how the dependences are listed with a "why".

Am I correct in understanding that the freeze mechanism is a "kill -STOP"? (If so, I feel I need to make more use of that command.)

[–] [email protected] 7 points 10 months ago (1 children)

Indeed. However it's necessary to use that command on both the main PID and all its child processes, otherwise you will run into issues like the game video stopping but the game logic still running in the background.

This is just a tool to automate finding the pid (via hyprctl or other ways) and correctly suspending it.

[–] [email protected] 1 points 10 months ago
[–] [email protected] 9 points 10 months ago (2 children)

Elden Ring does allow you to pause. You just have to open the menu explanations. But your point is still valid.

[–] [email protected] 3 points 10 months ago

Wait what

Ffs

[–] [email protected] 2 points 10 months ago

Wow, I wish I knew this workaround during my early gameplay lol.

[–] eodur 4 points 10 months ago

This is very cool. I didn't know about hyprland or game scope, so thanks for that too. My Linux gaming experience is about to get waaay better.

[–] fluckx 2 points 10 months ago

Learned something new. Very cool!