nix-community / plasma-manager

Manage KDE Plasma with Home Manager
https://nix-community.github.io/plasma-manager/
MIT License
658 stars 76 forks source link

Volume keys not working after switching config #119

Closed valeth closed 4 months ago

valeth commented 7 months ago

Some default shortcuts no longer function after switching to a new home manager configuration. They start working again after the plasma-plasmashell systemd user service is restarted.

This only seems to happen after a switch, just rebooting into the system normally works as intended.

I started noticing this problem in Plasma 6, but I also haven't used PM with Plasma 5 long enough to confirm that only that version is affected.

magnouvean commented 7 months ago

I also have seen this. Do you use overrideConfig by any chance? If so I would be inclined to believe it could have something to do with the deletion of some rc-files in ~/.config. It wasn't a problem in plasma 5 as far as I could tell.

valeth commented 7 months ago

Yes, I am using overrideConfig

magnouvean commented 7 months ago

Yeah I'm then quite confident it's related to that. A fix shouldn't be that hard though as it should just be to write the necessary lines which handles this functionality to some file instead of deleting the file completely as we do a.t.m.. Finding out which options causes this is a little worse though, but should be doable with a little digging.

DarkKronicle commented 7 months ago

I'm having the same issue, although mine won't work after I boot. I think I have an idea what causes it. Volume keys require a volume control applet to exist (this can also be contained within the systemtray). When plasma manager reconstructs the panels, it removes the old ones and creates new ones on top of it. I think this process results in the original volume applet having control over the keybinds, even though it no longer exists.

This is a known issue and it seems like it will be fixed soon (probably 6.1 release).

Temporarily this can be fixed by running:

var panel = panels()[0];
panel.addWidget("org.kde.plasma.volume");

or just adding the widget manually. I'll see if adding this to a script or something fixes this.

DarkKronicle commented 7 months ago

Here's an incredibly jank fix that I've gotten to work: On boot overwrite plasma-org.kde.plasma.desktop-appletsrc with a version that doesn't have a systemtray or volume control applet. Then when plasma manager creates the panels, there will be no issue with previous volume controls not existing.

valeth commented 6 months ago

Noticed another small glitch that is again fixed by restarting the plasmashell service.

Right after switching config and restarting (same as with the volume control issue) the system tray is "zero-sized", meaning it only shows up as a dot, probably because the widgets have borders. When clicking the tray drop down it just shows up as a dot. It cannot be resized or moved, or interacted with in any way.

After restarting the service it still shows up as a little dot, but now it can be resized and it continues to work properly after doing that.

I haven't noticed this bug in previous versions of Plasma 6, so might just be a regression on KDE's end.

magnouvean commented 6 months ago

Yeah it also occurs on my end. We'll probably just have to hope it gets fixed on the plasma-end as I can't see what plasma-manager is doing to cause this, as we're just interfacing plasma-scripts regarding panels.

VictorGamerLOL commented 5 months ago

Same here. What fixes it for me is that I right click to configure systray, go to entries, disable audio volume, apply, switch audio volume to when relevant again, apply again, now it works.

ccatterina commented 5 months ago

Noticed another small glitch that is again fixed by restarting the plasmashell service.

Right after switching config and restarting (same as with the volume control issue) the system tray is "zero-sized", meaning it only shows up as a dot, probably because the widgets have borders. When clicking the tray drop down it just shows up as a dot. It cannot be resized or moved, or interacted with in any way.

After restarting the service it still shows up as a little dot, but now it can be resized and it continues to work properly after doing that.

I haven't noticed this bug in previous versions of Plasma 6, so might just be a regression on KDE's end.

The issue about the "zero-sized" system tray has been fixed in plasma 6.0.5 that is already available in nixpkgs.

k3d3 commented 5 months ago

I'm running into this issue with plasma5 on the latest nixos unstable. I've also tried plasma6 and still get the same issue.

I'm also using impermanence, so everything in my ~/.config gets wiped out every reboot.

Thanks to this thread, I've found that by removing and re-adding the volume widget on the panel, the volume begins to work again.

I don't know if any of that helps.

magnouvean commented 5 months ago

For me it now works most of the time but it still sometimes bugs out. Since it doesn't happen when overrideConfig is disabled my guess is that it's some lines in the config-files which gets deleted, which causes this problem. Finding out which lines that are removed which causes this is harder. If we could find out we could just enable persistence for these keys by default (i.e. not delete those keys).

valeth commented 5 months ago

Plasma 6.1 might have fixed this problem. Still need to do further testing to say for sure.

magnouvean commented 4 months ago

I have the same impression. It hasn't been a problem since I switched to plasma 6.1. If no-one reports having this problem on plasma 6.1 within the next week or so I reckon I'll close the issue.

VictorGamerLOL commented 4 months ago

Here to say the issue dissapeared for me as well ever since 6.1.

magnouvean commented 4 months ago

I'm closing this now since it appears it's fixed. Feel free to reopen if it becomes a problem again (on plasma versions > 6.1)