6

I have multiple headsets connected to my Ubuntu desktop and I want to name them something worthwhile so that I can see them in Gnome Control Center and choose among them. Currently they are named things like this.

named things like this.

Things I have tried already:

Changing the device properties with pactl - This shows the new name in pavucontrol but not in Gnome Control Center. I've changed every damned property of everything without anything changing in Gnome CC.

The picture displays the output devices named:

  1. Digital Output (S/PDIF) - Corsair VOID PRO Wireless Gaming Headset

  2. Analog Output - Corsair VOID PRO Wireless Gaming Headset

  3. Digital Output (S/PDIF) - Corsair VOID PRO Wireless Gaming Headset

  4. Analog Output - Corsair VOID PRO Wireless Gaming Headset

  5. Digital Output (S/PDIF) - Built-in Audio

I want the first and third to look different since they are two different physical devices and likewise for the second and fourth.

Ubuntu Version: 20.04

3
  • Any question should always include the version of Ubuntu you are using. Please edit the question or add a flag. What version is it? It is possible the version affects the answer. Text should always be included in the question not a photo.
    – David
    Feb 3, 2021 at 11:06
  • Thanks for the advice. Added now!
    – Roshan
    Feb 3, 2021 at 18:36
  • I have the exact same question. I hope this gets answered
    – stratus
    Feb 11, 2021 at 22:58

2 Answers 2

3

I found a solution instaling pavucontrol and enabling the module-device-manager.

Install pavucontrol:

sudo apt install pavucontrol

then enable module-device-manager:

pactl load-module module-device-manager

open pavucontrol:

pavucontrol

right-click on the "port" drop menu that you want to change name and rename it: example

rename it: rename

that should work.

2
  • 1
    to make @Wagner answer to survive on restarts, apply this one, Ive tested this approach on ubuntu 21.10 and it works. Nov 19, 2021 at 14:57
  • Thank you so much, @icyber-ghost and Wagner!
    – Ryan
    Jan 5 at 15:46
3

The device name in Gnome Control center (and pavucontrol too) can be changed with udev rules. There is an undocumented udev device attribute SOUND_DESCRIPTION which can be set to change the name.

That attribute is read in PulseAudio. PulseAudio stores its value to card's device.description property (as seen by pacmd list-cards). This property is also the value that Gnome's control center reads when displaying audio devices.

Now, assuming that those headsets are USB devices then first we need to find vendor and product IDs of the two headsets with command:

lsusb

Each device has id values in form of vendor-id:product-id.

Then create a new udev rule file:

sudoedit /lib/udev/rules.d/my-pulseaudio.rules

And add content:

ATTRS{idVendor}=="vendor-id-of-1st-device", ATTRS{idProduct}=="product-id-of-1st-device", ENV{SOUND_DESCRIPTION}="Foo Headset"
ATTRS{idVendor}=="vendor-id-of-2nd-device", ATTRS{idProduct}=="product-id-of-2nd-device", ENV{SOUND_DESCRIPTION}="Bar Headset"

Then reload udev rules and restart PulseAudio:

sudo udevadm control --reload-rules
sudo udevadm trigger -ssound
systemctl --user restart pulseaudio

Now the names should have changed in Gnome's control center.

Note, if the two headsets had same vendor and product IDs then we may end up just renaming both devices with same name. In that case the rules would need 3rd ATTRS{?}=="?" check to further differentiate them from each other. To find what other attributes the devices have use command:

udevadm info /dev/snd/by-id/*

Try to find an attribute that has a different value between the two headsets, e.g. serial number.

1
  • what about PipeWire? Is the procedure the same?
    – mnj
    Jul 18 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.