Hello everyone, first post here, loving Fedora
I might need some collective insight on the issue I’ve been having. Think I’m having troubles understanding open file limits (I’m a newbie in Linux in general). The original issue I’ve been having is intermittent Plasma crashes on F41 - either the panels freeze while the system overall (open apps and such) is working, or the whole system crashes. Been troubleshooting this and noticed this line in Journal:
user@1000.service The Wayland connection experienced a fatal error: Too many open files
So I did some reading on open file limits to see if it helps. My ulimit -a output is as follows:
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127304
max locked memory (kbytes, -l) 8192
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 127304
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
And my ulimit -Hn is 4096 (after some tweaking I did).
Now, whatever I do I cannot get the ulimit -n to increase from default 1024 to 4096 and actually stick. If I run ulimit -n 4096 it will apply the new limit but it won’t stick and gets returned to 1024 at some seemingly random point without even rebooting the system.
After reading some guides online I’ve applied some changes:
-
Edited /etc/security/limits.conf to include this:
(*) soft nofile 4096
root soft nofile 4096 -
Created a .conf file in /etc/security/limits.d/ with the same entry from above;
-
Created system.conf and user.conf files in /etc/systemd/, both with DefaultLimitNOFILE=4096
Yet the file limit keep returning to 1024 and Plasma still crashes from time to time. Now the questions I have:
- I suppose some of the above workarounds are not applicable, but what should I do instead?
- Is it even the right solution for these crashes/freezes I’ve been experiencing?
I’m somewhat new to Linux distros in general so don’t kick me please
As for other useful info: running Fedora 41 KDE spin, Nvidia 4070 GPU on 570 drivers. Kinda suspect that the GPU may be the culprit as it usually is with Nvidia’s lame drivers: Fd leak with explicit sync and kde plasma - #14 by shelter - Linux - NVIDIA Developer Forums
Edit: I’ve done some digging on the Nvidia leak above and it seems like this is indeed the culprit - I can reliably crash Plasma by repeatedly opening app launcher or switching desktops which spams sync files as checked with lsof -p $(pidof plasmashell). Now it means that increasing the limits won’t help it, only delay the crash, but still curious why I fail to change it persistently. Meanwhile gonna wait till Nvidia fix their stuff