protonscr

Increase the open files limits values to prevent games craches?

steamclosed
ValveSoftware/steam-for-linux#6021 · opened 2019-01-14 by julienbenjamin · updated 2019-03-07 · 4 comments · github
Jjulienbenjamin 2019-01-14 github

Feature Request

I confirm:

  • [X] that I haven't found another request for this feature.
  • [X] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

Since some games require a number of files open per process higher than the default values, it would be a good idea to have it increased without having to troubleshoot and modify it yourself.

Default values can be found with the following commands in a terminal:

ulimit -Sn # soft limit; can be raised up to the hard limit
ulimit -Hn # hard limit

By default, these values are respectively 1024 and 4096.

For certain games, it results in a bug that you can find in the standard output or the log(s):

eventfd: Too many open files

Justification

The modifications of the defaults limits values is necessary to play some games or it results in a crash of the game.

Risks

If set values are too high, could lower the security against fork bombs.

Kkisak-valve maintainer 2019-01-14 github

Hello @julienbenjamin, this is a priviledged operation and needs to be done by the user as root or the default needs to be adjusted by the distro if it's too low.

Jjulienbenjamin 2019-01-14 github

Hello @julienbenjamin, this is a priviledged operation and needs to be done by the user as root or the default needs to be adjusted by the distro if it's too low.

Yes, I know you need to have root privileges to do so. My point being, if games crash because of this, since the default values are the same among all the distros I could try, this issue cannot be resolve. Unless the developers of a game find a workaround.

It might be a naive approach but I cannot see why it could not be done, when installing the Steam client for example (with root privileges then), since these values are by default very low (mostly) for historical reasons.

Kkisak-valve maintainer 2019-01-14 github

That doesn't change the fact that the super user access puts this request out-of-scope for the Steam client and Proton. There's a feature request to detect this scenario and give a warning at https://github.com/ValveSoftware/Proton/issues/1970.

Jjulienbenjamin 2019-03-07 github

@kisak-valve I would not be so sure since you need super user access to install necessary libs when installing the Steam Client. I am not so sure either my first proposal of increasing the file limits value is a good one, but this could be done when installing the client so it stays within its scope.

Upstream links