8.0: Unable to create inotify instance

I upgraded from 7.11 to 8.0 on Fedora 39. Now when starting or opening a project, KiCad pops up a dialog that says:

Unable to create inotify instance (error 24: Too many open files)

I can just click OK and ignore it. It doesn’t seem to affect functionality.

But to get the message to go away, I have to increase max number of inotify user instances in the system. Default seems to be 128 in my system:

$ cat /proc/sys/fs/inotify/max_user_instances
128

To change the number to e.g. 256:

$ echo 256 | sudo tee /proc/sys/fs/inotify/max_user_instances

If you want to change this permanently (over reboots), you have to set e.g. fs.inotify.max_user_instances=256 in /etc/sysctl.conf or in a file in /etc/sysctl.conf.d.

But I’m a bit curious why KiCad 8 requires more inotify instances.

It’s using inotify to watch files on disk, for example to notice if a library is changed externally. I don’t remember off the top of my head if more features like this were added in KiCad 8 but it seems likely.

It pops up the notification even for a small or empty project (created from scratch). And as far as I can see there’s no extra libraries that it tries to load or anything. I didn’t import settings from v7 (don’t know if it matters). I’m setting the user instances to 256 for now in my system to get rid of it.

For some reason v8 is also very slow opening any external file dialog (in Gnome), such as when creating a new project or saving a project to a new place (Save As). The system even popped up a notification, asking me to wait or terminate the application.

It seems to be solved after rebooting my computer (both the inotify issue and the slow file dialog).

So it could have been due to some other updates also in the system.

Sorry for the noise. But maybe someone else runs into the same error. Try to reboot first!

2 Likes