Mute/unmute mic doesnt work in Wayland

Hello,

I use GNOME with Wayland, and I have set keyboard shortcut in Gnome settings for mute / unmute microphone and I set Pause keyboard button for it, in my X11 session it works as intended, if I press it it will unmute, if I press it it will mute it, and so on, but problem is that in Wayland it do nothing, it will just show GNOME microphone popup but it will not change a state it remains muted or unmuted, by the way I use pipewire.

I use pipewire btw, and here is screencast of it https://www.youtube.com/watch?v=5WfaewkADog even when Im clicking on mute button in gnome settings: https://www.youtube.com/watch?v=5WfaewkADog

but under X11 no issues

uploaded another video showing amixer: https://www.youtube.com/watch?v=TPMooCkuKC4

as you can see issue is that it sometimes toggles, but it is not reliable, most of times it keeps value not changed

Try using either of these commands to toggle mute state of microphone input

pactl set-source-mute @DEFAULT_SOURCE@ toggle
amixer -qD default sset 'Capture' toggle

still same issue / behavior

youtube. com/watch?v=BXTw94fZXXk

Check if the Pause button works on Wayland:

libinput list-devices
libinput debug-events --device=/dev/input/event[N]

which event?

libinput list-devices
Device:           Power Button
Kernel:           /dev/input/event1
Group:            1
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Video Bus
Kernel:           /dev/input/event2
Group:            2
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Power Button
Kernel:           /dev/input/event0
Group:            3
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Creative Technology Ltd Sound Blaster Play! 2 Consumer Control
Kernel:           /dev/input/event4
Group:            4
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Creative Technology Ltd Sound Blaster Play! 2
Kernel:           /dev/input/event5
Group:            4
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Razer Razer Lancehead Tournament Edition
Kernel:           /dev/input/event7
Group:            5
Seat:             seat0, default
Capabilities:     pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         0.0

Device:           Razer Razer Lancehead Tournament Edition
Kernel:           /dev/input/event9
Group:            5
Seat:             seat0, default
Capabilities:     keyboard pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Razer Razer Lancehead Tournament Edition
Kernel:           /dev/input/event8
Group:            5
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Razer Razer BlackWidow Chroma V2
Kernel:           /dev/input/event10
Group:            6
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Razer Razer BlackWidow Chroma V2
Kernel:           /dev/input/event27
Group:            6
Seat:             seat0, default
Capabilities:     keyboard pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Razer Razer BlackWidow Chroma V2
Kernel:           /dev/input/event28
Group:            6
Seat:             seat0, default
Capabilities:     keyboard pointer
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         0.0

Device:           USB AUDIO DEVICE
Kernel:           /dev/input/event3
Group:            7
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

Device:           Eee PC WMI hotkeys
Kernel:           /dev/input/event21
Group:            8
Seat:             seat0, default
Capabilities:     keyboard
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0.0

I mean I was testing other buttons too, its same for every button. because it doesnt work even when I use cli command as you can see on the video

No idea what keyboard you have. Try one of the keyboards.

I tried it myself here. Works as intended on the newest Gnome ISO live session: https://0x0.st/Xxl-.webm I used real hardware, no VM and Wayland.

as I said problem cannot be in keypresses or buttons if there is issue that even cli command doesnt work as you could see on the video, but I found out new thing, I tried to change DE in GDM during login to “Weston” I launched terminal and spammed few times “amixer set Capture toggle” and it works just fine under Weston, and as far as I know Weston is Wayland compositor, so:

GNOME on X11 works
GNOME on Wayland doesnt work
Weston works

It’s difficult to understand if you can’t reproduce it. Please try the current Manjaro Gnome ISO with your computer and try to reproduce it. That way we can exclude that this behavior is a result of some kind of tinkering on your side.

so I tried fresh Manjaro LIVE USB still same

here is video:
youtube. com/watch?v=qVvgbT7BvDM

  • I wonder why links are not allowed, it would be helpful to send direct YT link

Really no idea what it could be. I even tried a USB sound card (Logitech G PRO Gaming Headset) just like yours, but it still works, even with your command. Cannot reproduce it. It seems to me that the problem is related to the device or the driver, which must be the general driver snd-usb-audio. Probably it needs a quirk, so that ALSA can mute it?

Does it mute the mic on GUI, so the Gnome Settings?

Please share:

lsusb -vt

Links and pictures are not allowed as long as you stay at Trust level 0. You need to reach TL1. See Discourse Trust Levels

lsusb -vt
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/10p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 007: Dev 002, If 0, Class=Vendor Specific Class, Driver=btusb, 12M
        ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth
    |__ Port 007: Dev 002, If 1, Class=Vendor Specific Class, Driver=btusb, 12M
        ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth
    |__ Port 007: Dev 002, If 2, Class=Vendor Specific Class, Driver=btusb, 12M
        ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth
    |__ Port 007: Dev 002, If 3, Class=Application Specific Interface, Driver=[none], 12M
        ID 0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth
    |__ Port 008: Dev 003, If 0, Class=Chip/SmartCard, Driver=[none], 12M
        ID 08e6:3437 Gemalto (was Gemplus) GemPC Twin SmartCard Reader
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
        |__ Port 003: Dev 004, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            ID 041e:323d Creative Technology, Ltd
        |__ Port 003: Dev 004, If 1, Class=Audio, Driver=snd-usb-audio, 12M
            ID 041e:323d Creative Technology, Ltd
        |__ Port 003: Dev 004, If 2, Class=Audio, Driver=snd-usb-audio, 12M
            ID 041e:323d Creative Technology, Ltd
        |__ Port 003: Dev 004, If 3, Class=Human Interface Device, Driver=usbhid, 12M
            ID 041e:323d Creative Technology, Ltd
        |__ Port 004: Dev 010, If 0, Class=Vendor Specific Class, Driver=[none], 480M
            ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)
    |__ Port 002: Dev 003, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 05e3:0610 Genesys Logic, Inc. Hub
        |__ Port 001: Dev 005, If 0, Class=Hub, Driver=hub/4p, 480M
            ID 1a40:0101 Terminus Technology Inc. Hub
            |__ Port 003: Dev 007, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                ID 20bc:502e ShenZhen ShanWan Technology Co., Ltd.
        |__ Port 003: Dev 006, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1532:0060 Razer USA, Ltd RZ01-0213 Gaming Mouse [Lancehead Tournament Edition]
        |__ Port 003: Dev 006, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1532:0060 Razer USA, Ltd RZ01-0213 Gaming Mouse [Lancehead Tournament Edition]
        |__ Port 003: Dev 006, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1532:0060 Razer USA, Ltd RZ01-0213 Gaming Mouse [Lancehead Tournament Edition]
        |__ Port 004: Dev 008, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1532:0221 Razer USA, Ltd RZ03-0203 Gaming Keyboard [BlackWidow Chroma V2]
        |__ Port 004: Dev 008, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1532:0221 Razer USA, Ltd RZ03-0203 Gaming Keyboard [BlackWidow Chroma V2]
        |__ Port 004: Dev 008, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            ID 1532:0221 Razer USA, Ltd RZ03-0203 Gaming Keyboard [BlackWidow Chroma V2]
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 0bda:0411 Realtek Semiconductor Corp. Hub
    |__ Port 002: Dev 003, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 05e3:0626 Genesys Logic, Inc. Hub
/:  Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 002: Dev 002, If 0, Class=Audio, Driver=snd-usb-audio, 12M
        ID 0c76:1711 JMTek, LLC.
    |__ Port 002: Dev 002, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        ID 0c76:1711 JMTek, LLC.
    |__ Port 002: Dev 002, If 2, Class=Audio, Driver=snd-usb-audio, 12M
        ID 0c76:1711 JMTek, LLC.
    |__ Port 002: Dev 002, If 3, Class=Human Interface Device, Driver=usbhid, 12M
        ID 0c76:1711 JMTek, LLC.
/:  Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub

As sound card I use external USB sound card Sound Blaster Play! 2, now I tried regular internal sound card on motherboard and it works just fine, problem is with that combo GNOME + Wayland + Soundblaster, but I want to use that external sound card, because it has much better noise cancellation out of box + better quality.

After some research I might have an idea. Here are some quirks defined:

Probably QUIRK_FLAG_GENERIC_IMPLICIT_FB looks promising for older devices.

You can set it like that:

File: /etc/modprobe.d/usb-audio.conf

options snd-usb-audio vid=0x041e pid=0x323d quirk_flags=QUIRK_FLAG_GENERIC_IMPLICIT_FB

Or try older kernel versions and check if there isn’t such a problem. Then one can investigate what the difference would be.

When I did it, I couldnt see my USB soundblaster anymore.