Bug#1082920: gnome-shell on Wayland has different soft limit for open file descriptors than in X11
Binay Devkota
devunderscorebinay at gmail.com
Sat Sep 28 10:47:50 BST 2024
Package: gnome-shell
Version: 46.4-1
Severity: important
Using debian unstable with linux version 6.10.11 and both sessions have
same default settings. I do not have any custom settings set, I have
checked these files:
/etc/security/limits.conf
/etc/security/limits.d/*.conf
/etc/sysctl.conf
/etc/sysctl.d/*.conf
/etc/systemd/system.conf
/etc/systemd/user.conf
There are no systemd overrides for following services.
Here is how it looks like:
user at home:~$ echo $XDG_SESSION_TYPE
wayland
user at home:~$ systemctl show gnome-shell.service | grep NOFILE
LimitNOFILE=1073741816
LimitNOFILESoft=1073741816
user at home:~$ systemctl show gnome-shell-wayland.service | grep NOFILE
LimitNOFILE=1073741816
LimitNOFILESoft=1073741816
user at home:~$ systemctl show user at 1000.service | grep NOFILE
LimitNOFILE=524288
LimitNOFILESoft=1024
user at home:~$ systemctl show gnome-shell-wayland.service | grep NOFILE
LimitNOFILE=1073741816
LimitNOFILESoft=1073741816
user at home:~$ systemctl show gdm.service | grep NOFILE
LimitNOFILE=524288
LimitNOFILESoft=1024
user at home:~$ cat /proc/$(pgrep gnome-shell$)/limits
Limit Soft Limit Hard Limit
Units
Max cpu time unlimited unlimited
seconds
Max file size unlimited unlimited
bytes
Max data size unlimited unlimited
bytes
Max stack size 8388608 unlimited
bytes
Max core file size 0 unlimited
bytes
Max resident set unlimited unlimited
bytes
Max processes 127437 127437
processes
Max open files 1073741816 1073741816
files
Max locked memory 4196806656 4196806656
bytes
Max address space unlimited unlimited
bytes
Max file locks unlimited unlimited
locks
Max pending signals 127437 127437
signals
Max msgqueue size 819200 819200
bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout 200000 200000 us
====
Then on X11
user at home:~$ echo $XDG_SESSION_TYPE
x11
user at home:~$ systemctl show gnome-shell.service | grep NOFILE
LimitNOFILE=1073741816
LimitNOFILESoft=1073741816
user at home:~$ systemctl show gnome-shell-wayland.service | grep NOFILE
LimitNOFILE=1073741816
LimitNOFILESoft=1073741816
user at home:~$ systemctl show user at 1000.service | grep NOFILE
LimitNOFILE=524288
LimitNOFILESoft=1024
user at home:~$ systemctl show gnome-shell-wayland.service | grep NOFILE
LimitNOFILE=1073741816
LimitNOFILESoft=1073741816
user at home:~$ systemctl show gdm.service | grep NOFILE
LimitNOFILE=524288
LimitNOFILESoft=1024
user at home:~$ cat /proc/$(pgrep gnome-shell$)/limits
Limit Soft Limit Hard Limit
Units
Max cpu time unlimited unlimited
seconds
Max file size unlimited unlimited
bytes
Max data size unlimited unlimited
bytes
Max stack size 8388608 unlimited
bytes
Max core file size 0 unlimited
bytes
Max resident set unlimited unlimited
bytes
Max processes 127437 127437
processes
Max open files 1024 1073741816
files
Max locked memory 4196806656 4196806656
bytes
Max address space unlimited unlimited
bytes
Max file locks unlimited unlimited
locks
Max pending signals 127437 127437
signals
Max msgqueue size 819200 819200
bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout 200000 200000 us
===
As you can see "Max open files" is 1024 on X11 and 1073741816 in
Wayland.
Because of this I am running into an issue while launching flatpak apps
through ArcMenu extension or actually any xdg-open request which is
handled by flatpak application through a gnome extension. As brwap
tries to close all the open file descriptors before launching the app,
the 1073741816 limit causes very slow start of the app.
More information about the pkg-gnome-maintainers
mailing list