linuxmint / cinnamon-spices-applets

Applets for the Cinnamon desktop
http://cinnamon-spices.linuxmint.com
590 stars 504 forks source link

[Cinnamenu@json] Too many open files #3759

Closed sphh closed 3 years ago

sphh commented 3 years ago
 * Applet version/Build date: 4.13.11 (2021-04-21 08:32:25)
 * Cinnamon version: 4.8.6
 * Distribution: Linux Mint 20.1
 * Snippet or attachment of ~/.xsession-errors

Notify author of applet @fredcw

Issue Sometimes when I open the menu, I get a lot of these entries in .xsession-error and then cinnamon restarts:

Cjs-Message: 20:48:53.199: JS LOG: [LookingGlass/warning] Cinnamenu file search:Error opening directory '/home/xxx/Software/github/cinnamon-spices-applets/azan@fahri.nurul.id': Too many open files

Steps to reproduce Difficult to say. Use the system for a long time.

Expected behaviour Cinnamon should not restart.

`cinnamenu.json` ``` { "layout": { "type": "layout", "pages": [ "layout", "behaviour", "appearance" ], "layout": { "type": "page", "title": "Layout and Content", "sections": [ "menu-layout", "menu-content" ] }, "behaviour": { "type": "page", "title": "Behavior", "sections": [ "panel-behave", "menu-behave" ] }, "appearance": { "type": "page", "title": "Appearance", "sections": [ "panel-appear", "menu-icons" ] }, "menu-layout": { "type": "section", "title": "Layout", "keys": [ "applications-view-mode", "sidebar-placement", "add-favorites", "description-placement", "info-box" ] }, "menu-content": { "type": "section", "title": "Content", "keys": [ "show-places-category", "show-web-bookmarks-category", "show-favorite-apps-category", "show-home-folder-category", "menu-editor-button" ] }, "panel-behave": { "type": "section", "title": "Panel", "keys": [ "overlay-key", "activate-on-hover", "hover-delay", "enable-animation" ] }, "menu-behave": { "type": "section", "title": "Menu", "keys": [ "category-click", "open-on-category", "enable-autoscroll", "enable-emoji-search", "web-search-option", "search-home-folder", "show-hidden-files" ] }, "panel-appear": { "type": "section", "title": "Panel", "keys": [ "menu-icon-custom", "menu-icon", "menu-icon-size-custom", "menu-icon-size", "menu-label" ] }, "menu-icons": { "type": "section", "title": "Menu", "keys": [ "category-icon-size", "apps-list-icon-size", "apps-grid-icon-size", "sidebar-icon-size", "use-box-style", "use-tile-style" ] } }, "categories": { "type": "generic", "default": [], "value": [ "favorites", "favorite_apps", "recents", "all", "Accessories", "Graphics", "Internet", "Office", "Development", "Multimedia", "Administration", "Preferences", "places", "recent", "Education", "Other", "Universal Access" ] }, "custom-menu-width": { "type": "generic", "default": 800, "value": 1503 }, "custom-menu-height": { "type": "generic", "default": 530, "value": 1390 }, "recent-apps": { "type": "generic", "default": [], "value": [ "gucharmap.desktop", "webapp-Mopidy4817.desktop", "blueberry.desktop" ] }, "applications-view-mode": { "type": "combobox", "default": 1, "description": "Applications view mode", "options": { "List": 0, "Grid": 1 }, "tooltip": "View applications as list or grid", "value": 1 }, "description-placement": { "type": "combobox", "default": 1, "description": "Application description placement", "options": { "Tooltips": 1, "Under titles": 2, "None": 3 }, "tooltip": "Choose where to show application descriptions", "value": 2 }, "sidebar-placement": { "type": "combobox", "default": 1, "description": "Session buttons location", "options": { "Top": 0, "Bottom": 1, "Left": 2, "Right": 3 }, "tooltip": "Choose where to show the session buttons (quit, logout, etc.)", "value": 1 }, "info-box": { "type": "label", "description": "\nInfo/tip: Drag on the menu edge to change the menu size.\n" }, "add-favorites": { "type": "switch", "default": true, "description": "Add favorites to session buttons", "tooltip": "Show your favorite app icons next to the session buttons", "value": false }, "show-places-category": { "type": "switch", "default": true, "description": "Show bookmarks and places", "tooltip": "Show bookmarks and places category in the menu", "value": true }, "show-web-bookmarks-category": { "type": "checkbox", "default": false, "description": "Show web bookmarks", "tooltip": "Show your browser's web bookmarks in the menu.\nNote: Install package gir1.2-gda-5.0 to read firefox bookmarks.", "value": false }, "show-favorite-apps-category": { "type": "switch", "default": false, "description": "Show favorite apps category", "tooltip": "Show your favorite apps category in the menu", "value": true }, "show-home-folder-category": { "type": "checkbox", "default": true, "description": "Show home folder", "tooltip": "Show home folder category in the menu", "value": false }, "menu-editor-button": { "type": "button", "description": "Open the menu editor", "callback": "launchEditor" }, "overlay-key": { "type": "keybinding", "description": "Keyboard shortcut to open and close the menu", "default": "Super_L::Super_R", "value": "Super_L::Super_R" }, "activate-on-hover": { "type": "checkbox", "default": false, "description": "Open menu on hover", "tooltip": "Open the menu when I move my mouse over the panel icon", "value": false }, "hover-delay": { "dependency": "activate-on-hover", "type": "spinbutton", "default": 50, "min": 0, "max": 1000, "step": 50, "units": "milliseconds", "description": "Menu hover delay", "value": 50 }, "enable-animation": { "type": "checkbox", "default": false, "description": "Use menu animations", "tooltip": "Animate the menu on open and close", "value": true }, "category-click": { "type": "checkbox", "default": true, "description": "Activate categories on click", "tooltip": "Activate categories on click instead of on hover", "value": false }, "open-on-category": { "type": "combobox", "default": 0, "description": "Open menu on category:", "tooltip": "Always open the menu with this category selected", "options": { "Last used category": 0, "Favorite apps": 1, "Recent": 2, "Places": 3, "All applications": 4, "Home folder": 5 }, "value": 1 }, "enable-autoscroll": { "type": "checkbox", "default": true, "description": "Enable autoscrolling", "tooltip": "Autoscroll the application list on mouse hover", "value": true }, "enable-emoji-search": { "type": "checkbox", "default": true, "description": "Enable emoji search", "tooltip": "Show emojis in search results", "value": true }, "web-search-option": { "type": "combobox", "default": 0, "description": "Web search option", "options": { "Google": 0, "Bing": 1, "Yahoo": 2, "DuckDuckGo": 3, "None": 4 }, "tooltip": "Show an internet search option in search results", "value": 4 }, "search-home-folder": { "type": "checkbox", "default": true, "description": "Search home folder", "tooltip": "When searching, also search home folder for files", "value": true }, "show-hidden-files": { "type": "checkbox", "default": false, "description": "Show hidden files", "tooltip": "Show hidden files in folder view", "value": false }, "menu-icon-custom": { "type": "checkbox", "default": false, "description": "Use a custom icon", "tooltip": "Use a custom icon in the panel", "value": false }, "menu-icon": { "type": "iconfilechooser", "default": "cinnamon-symbolic", "description": "Panel icon", "dependency": "menu-icon-custom", "tooltip": "Panel icon", "value": "/usr/share/cinnamon/theme/menu-symbolic.svg" }, "menu-icon-size-custom": { "type": "checkbox", "default": false, "description": "Use a custom icon size", "tooltip": "Use a custom size for the panel icon", "value": false }, "menu-icon-size": { "type": "spinbutton", "default": 24, "min": 0, "max": 60, "step": 1, "units": "pixels", "description": "Panel icon size", "dependency": "menu-icon-size-custom", "tooltip": "Choose a custom size for the panel icon", "value": 24 }, "menu-label": { "type": "entry", "default": "Menu", "description": "Panel text", "tooltip": "Text to show beside the panel icon", "value": "" }, "category-icon-size": { "type": "spinbutton", "default": 24, "min": 0, "max": 256, "step": 1, "units": "pixels", "description": "Category icon size", "tooltip": "Category icon size", "value": 24 }, "apps-list-icon-size": { "type": "spinbutton", "default": 24, "min": 0, "max": 256, "step": 1, "units": "pixels", "description": "Applications list icon size", "tooltip": "Applications list icon size", "value": 24 }, "apps-grid-icon-size": { "type": "spinbutton", "default": 64, "min": 0, "max": 256, "step": 1, "units": "pixels", "description": "Applications grid icon size", "tooltip": "Applications grid icon size", "value": 64 }, "sidebar-icon-size": { "type": "spinbutton", "default": 32, "min": 6, "max": 64, "step": 1, "units": "pixels", "description": "Session buttons icon size", "tooltip": "Session buttons icon size", "value": 32 }, "use-box-style": { "type": "checkbox", "default": false, "description": "Use session buttons box style", "tooltip": "Use session buttons box style", "value": false }, "use-tile-style": { "type": "checkbox", "default": false, "description": "Use tile style", "tooltip": "Use a tile style for the application buttons (Note: may not work on some themes)", "value": false }, "__md5__": "dea4a13b5d996974a35a74b3fc8b7953" } ```
fredcw commented 3 years ago

Thanks, I've found the problem. The temporary solution for the time being is to turn off the "Search home folder" option. This bug happens when you have a very large number of folders in your home folder. I need to change the search algorithm so that it uses less resources.

sphh commented 3 years ago

Ah, thanks for the solution. I switched it off, and now the menu reacts again swiftly. Before turning it off, when I pressed a key for the first time (to start the search), I got an immediate response, but after pressing the second key, there was a rather long delay before the menu got updated. Now I got the crisp behaviour back!! (And I also noticed that I never have used to search my home directory …)

fredcw commented 3 years ago

Is your home folder stored on a mechanical hard drive or an SSD? This may help me fix the delay problem,

sphh commented 3 years ago

It's on a SSD with a f2fs file system mounted with these options: rw,relatime,lazytime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix