Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plasma 6: Application Menu Does not Refresh List when Applications added/removed #292632

Open
Lyndeno opened this issue Mar 1, 2024 · 20 comments
Labels

Comments

@Lyndeno
Copy link
Contributor

Lyndeno commented Mar 1, 2024

Describe the bug

When applications are added or removed, the menu stays with the current list from when I originally installed Plasma. Reboots or restarts does not refresh it.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Plasma
  2. Add or remove applications (in my case within nixos config)
  3. Menu keeps old list

Expected behavior

Application menu refreshed with current available applications


Add a 👍 reaction to issues you find important.

@Lyndeno Lyndeno added the 0.kind: bug Something is broken label Mar 1, 2024
@Naxdy
Copy link
Contributor

Naxdy commented Mar 1, 2024

The problem seems to be that when a new ksycoca6_..... file is created in the ~/.cache, plasma just completely ignores it and happily continues to use whichever one it has been using. A workaround (for now) is to manually run rm ~/.cache/ksycoca* (or add it to your activation scripts, lol) after every nixos-rebuild, and this should take care of things.

Still, it'd be nice to know if this is a NixOS issue, or an upstream issue. Feels like it could be either?

@Lyndeno Lyndeno mentioned this issue Mar 1, 2024
13 tasks
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/enable-plasma-6/40541/7

@reasonings
Copy link

A workaround (for now) is to manually run rm ~/.cache/ksycoca* (or add it to your activation scripts, lol) after every nixos-rebuild, and this should take care of things.

When I add it to my activation scripts, it does remove it, but it never comes back. All icons go blank and the only way to get them back is to reboot.

@pbek
Copy link
Contributor

pbek commented Mar 2, 2024

Does a plasmashell replace help?

@K900
Copy link
Contributor

K900 commented Mar 2, 2024

So there are actually multiple issues here. Most KDE applications pull their knowledge of currently available apps from a shared cache called sycoca (for SYstem COnfiguration CAche), which is maintained by KService. Unfortunately, it does not work correctly on NixOS for multiple reasons:

  1. The cache can be rebuilt in-process, by each application, but the name and contents of the cache depend on XDG_DATA_DIRS, which is different for many processes due to wrappers, so we end up with multiple unrelated copies of the cache, each maintained by a different application, with a different view of things. This isn't necessarily an issue when the cache is updated correctly, except wasting a whole bunch of cycles.
  2. The cache is updated by checking the mtimes on the target files, which for us are always 0, so the cache is effectively never refreshed unless nuked entirely. The solution to that is probably to make KService actually walk up the path until it finds a symlink to the store, and then check the mtime of that, but that's an extremely invasive change.

#292748 should unblock us for now by restoring the nuke-all-sycoca activation script from Plasma 5, but we'll definitely want to look into some kind of a better solution going forward, and probably get upstream involved.

@K900
Copy link
Contributor

K900 commented Mar 2, 2024

Can people affected by this please test #292748 ?

@JonathanBrouwer
Copy link

For me running xdg-desktop-menu forceupdate fixes the problem as well, so as a workaround I added that to my rebuild script

@ShalokShalom
Copy link

I had the same issue with NeoChat and was informed, that this fix corrects the issue and indeed, after an update and reboot, it showed up.

@NovaViper
Copy link
Contributor

NovaViper commented Mar 12, 2024

Can people affected by this please test #292748 ?

I'm still plagued by this issue, neither installing kcmutils nor the nuke script functions on my system (My lock file has nixpkgs at 73d699a). Anytime I rebuild my system with nixos-rebuild switch or nixos-rebuild test, it refreshes the list but I can't click on any of the icons and no apps open until either I restart the system or log out. Even the icons pinned to my task manager disappear aswell

My flake: https://github.com/NovaViper/NixConfig

@sdellysse
Copy link
Contributor

I'm still seeing this issue. I run nixos-rebuild switch and now when I click on apps in my KDE "Start Menu", nothing happens. Running latest nixos-stable, updated and rebuilt this morning

@pbek
Copy link
Contributor

pbek commented May 15, 2024

Do you have this issue in the "Favorites" part of the menu? (because I even have that issue under Plasma 5)

@Shawn8901
Copy link
Contributor

I can confirm for the Favorites. Normal menu items do work for me in the meantime totally fine.

@pbek
Copy link
Contributor

pbek commented May 15, 2024

Ok, I guess then that's a general Plasma5/6 issue on NixOS. 😅
Is this worth a new issue, @K900?

@K900
Copy link
Contributor

K900 commented May 16, 2024

I have not observed this issue on 6, at least.

@pbek
Copy link
Contributor

pbek commented May 16, 2024

Strange... I just tested it after a QOwnNotes update in the morning on a Plasma 6 Laptop. 🤔
I can search for it or use the normal menu entry from the different categories, but the favorite entry can't be clicked.
And it's the same on Plasma 5 for me.

I can't even right-click and "Edit application..." those entries that got an update.
If I remove the favorite and add it again, I can click it again too.

@micmalti
Copy link

I've noticed the same issue in KRunner when doing an app search. Currently on Plasma 6.0.5.

@K900
Copy link
Contributor

K900 commented Aug 26, 2024

It has been mostly fixed on nixos-unstable, a proper fix would require some major changes to the internals of kservice.

@tazihad
Copy link

tazihad commented Sep 30, 2024

Fedora 41 KDE plasma has this issue. Although restoring it brings the icons. So, I guess nix need to refresh KDE plasma start menu.
Screenshot_20240930_181306

@Red-M
Copy link

Red-M commented Nov 13, 2024

I've got this issue and I installed my NixOS within the last week.
Using stable and I get the same issues, the favourites section of plasma doesn't launch anything and I also can't edit them after a nixos-rebuild if the packages get changed.

@K900
Copy link
Contributor

K900 commented Nov 13, 2024

This should be mostly worked around in 24.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests