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

Plasmoid bugged in Plasma 6 #239

Open
1 of 6 tasks
OlegAckbar opened this issue Mar 14, 2024 · 24 comments
Open
1 of 6 tasks

Plasmoid bugged in Plasma 6 #239

OlegAckbar opened this issue Mar 14, 2024 · 24 comments

Comments

@OlegAckbar
Copy link

OlegAckbar commented Mar 14, 2024

Relevant components

  • Standalone tray application (based on Qt Widgets)
  • Plasmoid/applet for Plasma desktop
  • Dolphin integration
  • Command line tool (syncthingctl)
  • Integrated Syncthing instance (libsyncthing)
  • Backend libraries

Environment and versions

  • Versions of syncthingtray, qtutilities and c++utilities: syncthingtray-qt6 1.5.0-1, qtutilities-qt6 6.13.5-1, c++utilities 5.24.7-1
  • Qt version: 6.6.2
  • Operating system (name and version): Arch Linux

Bug description
Plasmoid bugged in Plasma 6. It shows 2 entries in tray settings: one of them has no name and its setting can't be changed, the other one has no icon and its setting doesn't do anything for actual the tray icon of plasmoid (for example I have "always hide" option but plasmoid still stays in tray, see screenshots)

Screenshots
Снимок экрана_20240314_233410
Снимок экрана_20240314_233703

@OlegAckbar OlegAckbar added the bug label Mar 14, 2024
@Martchus
Copy link
Owner

That's strange and something I haven't seen before. Not sure whether I can help here. It looks like some general setup problem. Maybe there's a helpful clue in stdout/stderr of the plasmashell process. You can open a terminal, kill and relaunch plasmashell from there and look for related log messages.

@Martchus
Copy link
Owner

Martchus commented Mar 14, 2024

But also check the README section about configuring the Plasmoid in general. It might help you understand where the tray icon you see actually comes from.

@gudvinr
Copy link

gudvinr commented Mar 15, 2024

I do have the same issue.

That could be caused by old (qt5) plasmoid not being pruned correctly on uninstall.

I see this entries in ~/.config:

.config/plasma-org.kde.plasma.desktop-appletsrc
602:plugin=martchus.syncthingplasmoid
646:extraItems=<...>,martchus.syncthingplasmoid-qt6
647:hiddenItems=<...>,martchus.syncthingplasmoid,<...>,martchus.syncthingplasmoid-qt6

.config/kservicemenurc
49:libsyncthingfileitemaction-qt6=true
77:syncthingfileitemaction=false

@Martchus
Copy link
Owner

I just had a look on my Tumbleweed system (where I haven't already migrated on a pre-release of KDE 6) and there it looks similar as in your screenshot (but not the same). So even after uninstalling the Qt 5 based version¹ the old entries stays in a disabled way. However, in my case the new entry looks fine (icon is displayed) and behaves like it should. So really only the leftover entry is the problem here.

If that's just a stale entry, allowing to delete it is possibly out of scope here. That's because the code in Plasma's system tray Plasmoid is responsible for managing these entries. However, I couldn't find were this stale entry would be configured so I'm not sure whether it is actually a stale entry. Maybe there's also something wrong with my metadata file causing this entry (in which case it wouldn't be a stale entry but a weird duplicate).


¹ On Arch Linux you could even keep the syncthingtray package installed; its current version no longer contains the Plasmoid anyway.

@gudvinr
Copy link

gudvinr commented Mar 15, 2024

I removed all entries related to both plasmoids from .config/plasma-org.kde.plasma.desktop-appletsrc and .config/kservicemenurc, deleted syncthingtray-qt6 package and restarted system. Now I have proper entry:
image

Now .config/plasma-org.kde.plasma.desktop-appletsrc has these:

620 hiddenItems=<...>,Syncthing Tray (Qt 6)

It's all weird AF. Now it stores name instead of ID (which is very questionable given that multiple applets might have same human-readable title)

@OlegAckbar
Copy link
Author

I've deleted .config/plasma-org.kde.plasma.desktop-appletsrc, cleared .config/kservicemenurc, reinstalled syncthingtray-qt6 and restarted PC but the issue still persists

@Martchus
Copy link
Owner

Both cases are quite weird. I'll try to see how it behaves in my case later.

@OlegAckbar Is the Plasmoid generally working for you (so this is just about the entry like in @gudvinr's case)? And have you tried what I suggested in my first replies?

@OlegAckbar
Copy link
Author

@Martchus Yes, plasmoid works just fine, no problem with that. Only I can't hide it in tray.
изображение

@OlegAckbar
Copy link
Author

@Martchus I've tried launching plasmashell from terminal but I didn't see any weird warnings or errors mentioning syncthingtray (only those mentioning that my locale is not supported).

@OlegAckbar
Copy link
Author

systemlog.txt
here's journalctl log filtering plasmashell. Maybe you'll find something interesting

@OlegAckbar
Copy link
Author

I've built syncthingtray-qt6 on my Arch VM with testing repositories enabled and have exact same issue.

@Martchus
Copy link
Owner

Martchus commented Mar 15, 2024

I also couldn't find anything useful in those logs after a brief look.


I did a few more tests on my system and things are even weirder: First of all I should note that I have multiple screens and thus multiple panels and thus also multiple system tray plasmoids. Plasmoid instances are configured separately and the system tray plasmoid is no exception. So I had two relevant sections in ~/.config/plasma-org.kde.plasma.desktop-appletsrc. I don't think any of the sections (and also not any file in the whole ~/.config and ~/.local/share directories) contained any references to the old plasmoid, though.

So I stopped plasmashell, deleted all keys in the relevant sections of one of the system tray plasmoids and then in fact one Syncthing Tray icon was gone and the other one preserved. When trying to re-configure the gone Syncthing Tray icon via the system tray plasmoid settings I noticed that the weird entry was gone. Only the correct entry was shown and everything worked as expected. Then I opened the settings of the other system tray plasmoid and there was the weird dysfunctional entry again.

So I stopped plasmashell again and then deleted all keys in the relevant sections of all system tray plasmoids. Then all Syncthing Tray icons were gone. When configuring them back everything looked good at first but when opening the plasmoid settings another time the dysfunctional entry was back.

So this is not a stale entry of the old version of the plasmooid. It gets newly created for the current version of the plasmoid under some circumstances which might involve having more than one system tray plasmoid.

I must also note that plasmashell crashed when applying changes of one system tray plasmoid while having the settings window of another one open.

Somehow I think all of this has not much to do with Syncthing Tray but it is a thing of how the official system tray plasmoid handles its settings/entries. So maybe this is worth filing an upstream bug.

@gudvinr
Copy link

gudvinr commented Mar 21, 2024

Nope, apparently it isn't magically fixed and I am having same issue again

@Martchus
Copy link
Owner

Martchus commented Mar 21, 2024

Yes, as I said I could reproduce it. But it is complicated and fixing it probably requires collaboration with Plasma upstream. So far I haven't spent the effort considering I'm not really bothered by this additional invalid entry. (In my tests the real entry always worked so the Plasmoid is fully usable.)

By the way, anyone be welcome to start a discussion with upstream. It doesn't always have to be me asking for help on their channels.

@gudvinr
Copy link

gudvinr commented Mar 21, 2024

I have only one tray applet and only single plasmoid instance, FWIW

@LinAGKar
Copy link

LinAGKar commented Apr 4, 2024

I only have one entry in the list:

Screenshot_20240404_113159

and get no syncthing tray icon at all. If I try to add syncthing as a plasmoid it just vanishes again when I restart plasmashell. This being on Tumbleweed.

@Martchus
Copy link
Owner

Martchus commented Apr 4, 2024

If I try to add syncthing as a plasmoid it just vanishes again when I restart plasmashell. This being on Tumbleweed.

So it works as its own Plasmoid and only after restarting disappears again? And re-adding it as its own Plasmoid then makes it work again? Then only the persistency of the Plasma settings would be the problem. The Plasma settings are handled by Plasma so I'm not sure I can do anything about it. Note that I'm also using Tumbleweed but cannot reproduce this issue. Or is that a new issue for you but it worked previously? (I haven't updated my Tumbleweed machine since the 1.5.1 update so I'm still at 1.5.0.)

@LinAGKar
Copy link

LinAGKar commented Apr 4, 2024

It doesn't happen to any other plasmoids though, only Syncthing disappears. I'm also still on 1.5.0.

For the tray icon, apparently it does show up if I change the visibility to something else instead of the default "Enabled" (maybe that's a mistranslation). And then the duplicate row also shows up for me, and it won't go into the overflow menu even if I set it to always hidden.

@Martchus
Copy link
Owner

Martchus commented Apr 4, 2024

It doesn't happen to any other plasmoids though, only Syncthing disappears.

Maybe Syncthing Tray is special because it relies on native C++ code. I guess one would have to ask the Plasma developers to review my Plasmoid-specific code for errors because I'm out of ideas at this point and I also cannot reproduce the non-persistency.

For the tray icon, apparently it does show up if I change the visibility to something else instead of the default "Enabled" (maybe that's a mistranslation). And then the duplicate row also shows up for me, and it won't go into the overflow menu even if I set it to always hidden.

Ok, so let's just say that some option in the system tray plasmoid's settings allow you to show the Syncthing Tray Plasmoid within it. And then you run into the same cosmetic issue with the buggy entry like anyone else.


Note that I haven't made any progress on the issue about the buggy entry because it seems to be just cosmetic and also here I'd probably needed help from Plasma developers.

@gudvinr
Copy link

gudvinr commented Apr 5, 2024

Filed an issue in KDE bugtracker:
https://bugs.kde.org/show_bug.cgi?id=485072

Copy link

stale bot commented Jun 5, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 5, 2024
@gudvinr
Copy link

gudvinr commented Jun 5, 2024

Still the same for me

@stale stale bot removed the stale label Jun 5, 2024
@Martchus
Copy link
Owner

Martchus commented Jun 5, 2024

Still nothing that I think I can fix from my side. If this is important to you, you'd probably have to dig into the code yourself.

Copy link

stale bot commented Aug 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants