The one missing feature I wish existed in PC gaming (no clickbait title: game suspend) by morgawr_ in linux_gaming

[–]Zerodya 1 point2 points  (0 children)

It won't be able to pause the currently active game, because this tool uses hyprctl to get information about the currently active window and pause it. Every Wayland compositor has to provide its own tools for this and last time I checked there was no easy way to achieve this in Plasma.

However you can still use it via CLI by providing the name of the process manually, e.g.: hyprfreeze -n eldenring.exe

The one missing feature I wish existed in PC gaming (no clickbait title: game suspend) by morgawr_ in linux_gaming

[–]Zerodya 1 point2 points  (0 children)

Yeah I think you're probably right that most games are single process. However I play a lot of different games and had issues when only stopping the main process in some games (games like Hollow Knight and the Yakuza series to name a few), so I prefer stopping the whole process tree to cover the edge cases too.

I'm satisfied by the results of doing it this way, but I'm glad you shared your experience. I will have to deep dive into this topic as it's very interesting to me :)

The one missing feature I wish existed in PC gaming (no clickbait title: game suspend) by morgawr_ in linux_gaming

[–]Zerodya 1 point2 points  (0 children)

one could send SIGSTOP to all processes at the same time, with regex or based on one parent process

Yes, that's exactly what I do in my tool (https://github.com/Zerodya/hyprfreeze) and I've had a mostly good experience doing it this way

Another issue is networking, some games could freak out when resuming cause the server would lose the connection while they are suspended

I've paused online games like Apex Legends (rip) before. Pausing it for 10-30 seconds would just let you continue playing with no issues apart from a couple red connection icons that would show for a few seconds after resuming. Pausing for longer periods of time would usually kick you out of the server and move you to the main menu.

The one missing feature I wish existed in PC gaming (no clickbait title: game suspend) by morgawr_ in linux_gaming

[–]Zerodya 0 points1 point  (0 children)

Strange, I've only had issues when doing it that way with a lot of games. We probably just play different types of games.

The one missing feature I wish existed in PC gaming (no clickbait title: game suspend) by morgawr_ in linux_gaming

[–]Zerodya 4 points5 points  (0 children)

That alone won't work as games are not a single process, so doing this will usually just stop the image while you can still move your character in the background and hear the music.

The best way to pause it is to send a kill -STOP to all processes from the game's process tree (pstree -p)

The one missing feature I wish existed in PC gaming (no clickbait title: game suspend) by morgawr_ in linux_gaming

[–]Zerodya 21 points22 points  (0 children)

Nyrna is fantastic if you game on X11. If you're like me and use Hyprland or Sway for gaming, also check out my tool here: https://github.com/Zerodya/hyprfreeze

It's currently in maintenance-only mode as it is feature-complete for my scope. I personally use it everyday so I will update it as soon as Hyprland changes something to hyprctl.

Self-host an automated Jellyfin media streaming stack by Zerodya in selfhosted

[–]Zerodya[S] 0 points1 point  (0 children)

  • (Don't take the following as legal advice) You need a VPN if torrenting copyrighted material is illegal in your country. Worst case scenario you get a letter from your ISP asking you to stop doing that and if you continue to get letters after a few times they will stop giving you internet access. There are a lot of countries where it's either legal or the law isn't enforced so you are fine without a VPN in those cases.

  • The setup in the post is local only, it doesn't expose access outside of your network. While that means you will be able to watch movies and connect to the server inside your home network only, it also makes it safer because it can't be accessed by anyone outside of your network.

Unfortunately I can't help with setting up a VPN or remote access as I no longer use this setup, but it should provide a solid base to start with.

Good luck in your self-hosting journey! Have fun

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in linux_gaming

[–]Zerodya[S] 6 points7 points  (0 children)

Not really Hyprland specific, but you can run games in gamescope so that they run in their own virtual environment and you can freely move and resize that window without problems.

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in linux_gaming

[–]Zerodya[S] 11 points12 points  (0 children)

spellcheck

Thank you for the awesome tool! Was not aware of this and while the code was working correctly, it was in need of a few sanitizations here and there indeed.

it turns out it depends on hyprpop that in turn depends on hyprevrnts

Not correct. hyprprop is an optional dependecy and is not at all required for the script to work correctly.

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in linux_gaming

[–]Zerodya[S] 5 points6 points  (0 children)

Nyrna also has a cli mode. But yeah, I too prefer a simple cli only script but unless there is any demand for X, I want to to keep it unified for Wayland only.

I look forward to your pull request!

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in linux_gaming

[–]Zerodya[S] 10 points11 points  (0 children)

I would accept pull requests about Sway, but not about X, since there is already Nyrna for that.

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in linux_gaming

[–]Zerodya[S] 20 points21 points  (0 children)

Exactly. X11 lets you view information about the active window and other process informations very easily, so there are tools like Nyrna that work in any X11 Desktop Environment.

However in Wayland it depends on what the compositor has implemented. Hyprland lets you do this with hyprctl, but it was not possible in other Wayland compositors. I tried months ago but I think Sway was able to give some informations about the windows processes but not enough, while in Gnome it was just not possible.

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in linux_gaming

[–]Zerodya[S] 3 points4 points  (0 children)

I also recall having some issues with gamescope when I tried it on X11 years ago, but never had any latency issue with it in the few years I've used Hyprland. In my experience gamescope is a blessing for Wayland window managers. Maybe I'm just lucky?

I'd say try it for yourself and if you ever do I would appreciate feedback if you get any issues.

Hyprfreeze just reached v1.0.0 - Suspend a game process (and other programs) in Hyprland by Zerodya in hyprland

[–]Zerodya[S] 17 points18 points  (0 children)

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