Page MenuHomeSolus

Raise NOFILE limit - Esync compatibility out of the box
Closed, ResolvedPublic


I have a suggestion to raise NOFILE limit. Right now every user that wants to use Esync has to manually edit 3 files, like in this guide. Most other distros got this limit raised automaticially with update to Systemd 240 and now don't require any work from the user.
I think this feature is very important, it raised my FPS in The Witcher 3 by 1/3 and doubled in Assassin's Creed: Oddyssey, getting it almost to Windows levels. And it isn't niche either Proton uses it, so all the people playing windows games from Steam are using it. And last I checked it is enabled by default, so people who haven't edited it manually might get game crashes.
If it wouldn't cause any problems, it would be nice if you raised NOFILE limit from 1000 to 524288.

Event Timeline

Jacek created this task.Jan 12 2020, 8:56 PM
Jacek updated the task description. (Show Details)Jan 12 2020, 9:48 PM
serebit added a subscriber: serebit.
JoshStrobl triaged this task as Normal priority.
JoshStrobl edited projects, added Software, Platform Integration; removed Lacks Project.
JoshStrobl added a subscriber: JoshStrobl.

Currently working on this. Raising the PAM limits isn't enough, requires me to set the default NOFILE limits in systemd. As a result of our use of an older systemd and newer kernel, there is some unnecessarily defined statx definitions and syscalls in headers that I need to patch out, basing the work on changes in newer systemd releases.

I obviously agree that this should "just work" out-of-the-box. I actually set this stuff up on my laptop when I was working with Lutris, Proton, and Elder Scrolls Online. Needing to tinker with Esync configuration obviously isn't something we *want* users to have to do just to play their games.

JoshStrobl changed the task status from Open to In Progress.Jan 13 2020, 10:45 AM
JoshStrobl moved this task from Backlog to System and Configuration Fixes on the Software board.
Lorien added a subscriber: Lorien.Jan 13 2020, 1:14 PM
Jacalz added a subscriber: Jacalz.

Update, just pushed a new systemd that seems to respect our PAM limits. So my PAM package change should be sufficient, would like others that are on unstable to validate. Please read this post first though, I can't stress it enough!

rjurga added a subscriber: rjurga.Jan 13 2020, 3:16 PM
Jacek added a comment.Jan 13 2020, 9:42 PM

@JoshStrobl After deleting all lines I added to those files and updating Systemd the limit is still 10000. I have no idea why

In T8601#163249, @Jacek wrote:

@JoshStrobl After deleting all lines I added to those files and updating Systemd the limit is still 10000. I have no idea why

Because it gets set via pam not in systemd itself, run via console ulimit -Hn to check it, should be 524288

@Girtablulu That's exactly what I did, the output is

jacek@portege ~> ulimit -Hn

@Jacek The 10k limit is set by PAM and is what the previous PAM version's limits.conf was set to. What is the version of pam you have installed? You need to make sure you have a full system upgrade, on unstable, and have rebooted to have applied the new limits.

Jacek added a comment.EditedJan 14 2020, 7:38 AM

I did a full upgrade, reinstalling pam or doing eopkg check does nothing. Only clue I have is to how the end of /etc/security/limits.conf looks like.:

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

*                hard    core            0
*                soft    nofile          10000
*                hard    nofile          10000
# End of file

I didn't add those lines, but they are probably enforcing the limits.

That is not the file contents any more. You are on unstable, right?

Jacek added a comment.Jan 14 2020, 8:13 AM

I am, with newest systemd and pam. But I I had jacek hard nofile 524288 at the end of that file, and I only deleted that line after the update. Is that why the file didn't get patched?

Probably. I'd delete the file entirely and reinstall pam.

Jacek added a comment.Jan 14 2020, 8:36 AM

Thanks Josh, deleting that file caused eopkg to throw errors (something with pam), and after reboot I couldn't log in.
After booting with LiveISO i found limits.conf.newconfig with the patched contents. After renaming it everything works now, and the limits are increased.
So thank you very much, I hope it'll go smoothly for others.
Solus 4.0.9999 (or whatever you call it) should get good gaming revievs!

Ah yea, completely forgot that it'll have a .newconfig if the existing one has been modified. Thanks for testing!