This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Audio Volume hotkeys stopped working

Tags: None
(comma "," separated)
kjetil
Registered Member
Posts
6
Karma
0

Audio Volume hotkeys stopped working

Mon May 18, 2020 10:51 pm
The keyboard shortcuts for adjusting volume and mute stopped working on upgrade from Kubuntu 19.10 to 20.04.
It was working fine on Kubuntu 19.10 with Plasma 15.18 from Kubuntu backports.

Findings so far:
  • The laptop volume keys are still registered by the system. This was verified by assigning the Application menu to the hotkey "Volume Down".
    • (Although only every 2nd keypress is actually registered)
  • When assigning Global Shortcuts -> Audio Volume -> Decrease Volume to a different key combo (Ctrl+Shift+L) it still does not work
  • When invoking the shortcut from the command line via `qdbus` it works. The system volume is lowered and the on-screen-display shows the volume bar going down.
    Code: Select all
     qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.invokeShortcut 'decrease_volume'

  • All off the above also applies to Mute and Volume up, Microphone Mute, Microphone Volume Up, Microphone Volume down.
  • All other global hotkeys work fine.

So it seems kglobalaccel for some reason is not triggering the kmix "Audio Volume" hotkeys. Any further help in troubleshooting this would be greatly appreciated :)

More details:
System: Kubuntu 20.04, Plasma 5.18.5, Frameworks 5.68.0, Qt 5.12.8, kernel 5.4.0-29
qdbus experimentation - kmix
Code: Select all
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.shortcutNames
increase_microphone_volume
decrease_microphone_volume
increase_volume
mic_mute
mute
decrease_volume
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.invokeShortcut 'decrease_volume'
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.invokeShortcut 'increase_volume'
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.invokeShortcut 'mute'
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.invokeShortcut 'microphone_mute'

these all work fine.

Media controls
Global shortcuts -> Media Controller works for controlling Application volume (firefox, music player, etc)
Tested and working OK by assigning keyboard shortcuts to Global shortcuts -> Media Controller -> Volume Up & Volume Down
Also tested by qdbus commands
(It does not adjust volume of Spotify, but that's a separate issue)
Code: Select all
$ qdbus org.kde.kglobalaccel /component/mediacontrol org.kde.kglobalaccel.Component.shortcutNames
playpausemedia
stopmedia
previousmedia
mediavolumedown
mediavolumeup
nextmedia
$ qdbus org.kde.kglobalaccel /component/mediacontrol org.kde.kglobalaccel.Component.invokeShortcut 'mediavolumedown'
$ qdbus org.kde.kglobalaccel /component/mediacontrol org.kde.kglobalaccel.Component.invokeShortcut 'mediavolumeup'



global shortcut config file

`$HOME/.config/kglobalshortcutsrc` kmix section is updated when changing shortcuts in Global Shortcuts -> Audio Volume
Code: Select all
[kmix]
_k_friendly_name=Audio Volume
decrease_microphone_volume=Microphone Volume Down,Microphone Volume Down,Decrease Microphone Volume
decrease_volume=Volume Down,Volume Down,Decrease Volume
increase_microphone_volume=Microphone Volume Up,Microphone Volume Up,Increase Microphone Volume
increase_volume=Volume Up,Volume Up,Increase Volume
mic_mute=Microphone Mute,Microphone Mute,Mute Microphone
mute=Volume Mute,Volume Mute,Mute
mjm
Registered Member
Posts
1
Karma
0
Hey there, I had same issue as you with exact same configs. It turned out that I don't even have kmix installed, although it was listed as a component in kglobalaccel. After installing and turning it on my volume shortcuts work correctly and my global shortcut config file look like this:

`$HOME/.config/kglobalshortcutsrc`
Code: Select all
[kmix]
_k_friendly_name=KMix
decrease_volume=Volume Down,Volume Down,Decrease Volume
increase_volume=Volume Up,Volume Up,Increase Volume
mute=Volume Mute,Volume Mute,Mute


I'm running Manjaro Linux, Plasma 5.18.5, Frameworks 5.70.0, Qt 5.14.2, kernel 5.6.12-1.
If that's not the case in your scenario, check out output of this command:
Code: Select all
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.isActive
true

I noticed that when my shortcuts were broken. the output of this was false. Perhaps if you could somehow activate it, it could help you.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
How can you not have KMix installed in a Plasma installation? This is a normal component and should be in by default, did you remove it at some point? If not, you should report this to your distribution, clearly something is wrong with the packaging, then.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
kjetil
Registered Member
Posts
6
Karma
0
Thanks for the replies mjm and Mamarok
After being away a few weeks I came back and installed all pending updates, and now Volume hotkeys work! :)
System: Kubuntu 20.04, Plasma 5.18.5, Frameworks 5.68.0, Qt 5.12.8, Kernel 5.4.0-31
I'm not sure which package fixed the issue since there were about 40 KDE packages that got updated.

In case anybody else stumbles upon this issue, i'll just leave this here:

Code: Select all
$ qdbus org.kde.kglobalaccel /component/kmix org.kde.kglobalaccel.Component.isActive
true

returns true just like for mjm. Unfortunately I didn't run this command before installing the updates, so don't know if it was disabled.


The kmix package is not installed on my system either, but the Volume Plasmoid and "Audio - System Settings Module" works just fine
Code: Select all
$ dpkg -l  | grep -i kmix
$


It seems kmix package was removed from Kubuntu around 18.04. From the old apt upgrade logs:
Code: Select all
$ grep -i kmix ubuntu-upgrade-*/dist-upgrade-log/*
ubuntu-upgrade-1804/dist-upgrade-log/main.log:2018-07-16 18:11:50,885 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-1810/dist-upgrade-log/main.log:2018-11-17 20:59:04,659 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-1810/dist-upgrade-log/main.log:2018-11-17 21:14:07,500 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-1904/dist-upgrade-log/main.log:2019-07-15 20:22:21,500 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-1904/dist-upgrade-log/main.log:2019-07-15 20:37:05,749 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-1910/dist-upgrade-log/main.log:2020-02-02 22:58:04,661 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-1910/dist-upgrade-log/main.log:2020-02-02 23:12:45,137 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-2004/dist-upgrade-log/main.log:2020-05-09 20:48:30,327 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
ubuntu-upgrade-2004/dist-upgrade-log/main.log:2020-05-09 20:57:46,132 DEBUG Removing 'kmix' (kubuntu-desktop PostUpgradeRemove rule)
rektal
Registered Member
Posts
4
Karma
0
Hi
I have the same problem on openSUSE Tumbleweed.
I reported this as a Bug 117936.
https://bugs.kde.org/show_bug.cgi?id=430115
rektal
Registered Member
Posts
4
Karma
0
It was an update of KDE Connect app in Playstore, ver. 1.16.0.
And now it works again!
All sound commands are working again.

Problem solved.
I hope so it will never appear again
silvestre
Registered Member
Posts
1
Karma
0
The problem has not been fixed yet. After a fresh install of Kubuntu today, Kmix was not preinstalled. Had to manually install Kmix and assign hot keys in System Settings.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
You don't need KMix, you can do all of this through Pulseaudio and the system settings. Have a look at the Pulseaudio system tray application if you want it in the Systray


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
gear
Registered Member
Posts
1
Karma
0
Mamarok wrote:How can you not have KMix installed in a Plasma installation? This is a normal component and should be in by default, did you remove it at some point? If not, you should report this to your distribution, clearly something is wrong with the packaging, then.

Thank you. I removed kmix at some point an wondering...=) Fixed.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]