19

I connected a pair of AirPods to everything I could. Android, OSX, Linux Mint, Arch LInux. It sounds great on all of them, but when connected under Arch, I can get get less than half the volume even if I max all volumes I can find. It's strange that Mint gets the volume right. I switched to Linux Mint for a while for this exact reason. But I prefer Arch. It's smoother and faster. Pacman is another easy to use tool. However, I searched for all and any solutions to bluetooth volume, but none worked. Volume on wired headphones and laptop's speakers is loud and clear. Problem only exists in bluetooth device that relies on source to set volume. If the device has own volume buttons, then I can pump up the volume all the way.

From Gnome Sound Settings I tried going over 100%, but the sound is distorted.

I tried alsamixer and pavucontrol. All volumes are maxed, but I only get Intel card and PulseAudio. should I also have a bluetooth volume?

I also found PulseAudio/Troubleshooting - Volume adjustment does not work properly which mentioned the volume cap of 65536. Since sound is clear, I believe this volume limit is the source of my problem. But even if I try to increase the volume as mentioned there, I cannot get past the upper limit of 65536.

$ amixer set Master 12345+
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 65536 [100%] [on]
  Front Right: Playback 65536 [100%] [on]

Debugging Bad dB Information of ALSA Drivers describes the same problem, but I could not get any information using this tool.

I believe there should be a way to set a config per bluetooth device and set the lower and upper limits. Alternative, maybe setting the volume to dB instead of absolute value might help, but disabling flat-volumes in /etc/pulse/daemon.conf did nothing.

The only comparison I was able to make against LinuxMint is that Mint sets dB instead of absolute value. (I have a live USB so I can boot any time in Mint)

Any suggestion is welcome.

6 Answers 6

22

VMG's answer is subtly wrong; it will technically work, but it will disable all other plugins than a2dp, meaning bluetooth keyboards/mice/gamepads/etc will stop working, when the only plugin causing issues seems to be one called avrcp.

Edit

/lib/systemd/system/bluetooth.service

and change

ExecStart=/usr/lib/bluetooth/bluetoothd

to

ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=avrcp

and run

sudo systemctl daemon-reload
sudo systemctl restart bluetooth
10
  • 2
    Wow, this is instant and very effective. This means there is a need to configure bluetooth device.
    – excalibur
    May 3, 2019 at 11:46
  • 6
    Neither mort or VMG answer worked for me. Sound with an up-to-date archlinux and a Sony WH-1000XM3 is still quite low, even at the maximum volume the system proposes.
    – azmeuk
    Jun 8, 2019 at 11:00
  • I've never been so happy about being completely deafened by this working! This 100% will solve your bluetooth headphone low-volume problems, so prepare yourself! haha
    – tester
    Jul 15, 2019 at 3:21
  • 8
    Didn't work for me Nov 26, 2019 at 22:26
  • 1
    For those that tried mort's answer with no success, I personally had to unpair and repair my aptx audio device. Dec 15, 2019 at 16:07
12

Removing AVRCP did not work for me with my WF-1000XM3. What worked was in fact the opposite. I used AVRCP to send volume up commands directly. I used D-Bus to interact with BlueZ following this answer.

In my case the full command was:

dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_<mac_address_of_headphones> org.bluez.MediaControl1.VolumeUp
4
  • Hi, Thank for sharing this. I have the same headphones but no /org/ folder. I'm not sure where to look for, find / -name bluez didn't bring anything relevant. Any suggestion? Nov 26, 2019 at 22:35
  • The path is not a file path but a D-Bus path. There is a Gnome debugging app called D-Feet that lets you inspect D-Bus interfaces. You should be able find the right object path. There is a good chance that it will match the one I found so you could just replace the mac address as a first try. Replace ":" with "_", for example: "dev_01_AB_23_CD_45_EF"
    – beetix
    Nov 28, 2019 at 8:53
  • This worked for me, thanks! Any chance it can also be made to work for the bluetooth microphone (over the HSP profile)? I looked over the available methods with D-Feet but there doesn't appear to be one.
    – Marc.2377
    Dec 5, 2019 at 2:58
  • This worked for me as well, though it took quite a few tries to get it right! Running the command just once only increased the volume a tiny bit, I had to run it many times to get the volume really high. I think you really need d-feet to figure out if the last part is 'Control.VolumeUp' or 'MediaControl.VolumeUp' or something else, and d-feet will also tell you what other commands are available. The command that worked for me is: dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_4C_87_5D_CE_82_6A org.bluez.MediaControl1.VolumeUp Jan 14, 2021 at 20:39
10

I figured it out a fix for the Sony WF-1000XM3 that might potentially work with other devices: The Sony WF-1000XM3 have an internal volume setting. Windows, Android, and iOS are all apparently smart enough to manipulate this automagically. Not the case with Manjaro/Arch and apparently other Linux distros.

The workaround is simple: Connect your headphones to your phone and launch the official Sony Headphones Connect App for it, then move the volume slider all the way to the right to max it out. Then reconnect them your linux PC. Be careful not to deafen yourself, turn system volume down a bit.

YMMV, but this could likely work with other headphones as well, so it is definitely worth sharing.

edit: I found an even better workaround. Same idea, but you can change the internal volume of the Sonys by remapping the touch functions on the headphones themselves (as opposed to aformentioned workaround, which requires grabbing your phone and unpairing and repairing). The ability to control volume via touching the headphones was a feature enabled at some point after the headphones first debuted. See here for instructions: https://www.sony.com/electronics/support/wireless-headphones-bluetooth-headphones/wf-1000xm3/articles/00230635

Another user reported: Also, the same is working for AirPods Pro connected to an Ubuntu distro AND Windows. For some reason, AirPods connected to ubuntu have low volume. I tried to apply suggestion for Sony but connected the AirPods on a Windows and increased volume to a maximum. Then I switched to ubuntu, remove and pair AirPods and checked volume. It was fixed, loud and clear! Linux Mint 20.

7
  • Had the same issue with my WH-CH510, alsamixer showed volume at max but sound was too low on the headphones. While with the volume at 100% tried to increase the volume in the headphones physical buttons and it worked. in my case this was all it needed to solve the issue.
    – BANJOSA
    Dec 27, 2020 at 18:34
  • 1
    I have sony WH-1000XM3 your answer fixed my problem thanks bro Jan 8, 2021 at 1:28
  • Wow, that worked! :) I have WH-1000XM2 and used touch panel to increase the volume. Thanks @BassGod!
    – Konrad
    Jan 12, 2021 at 13:47
  • I keep forgetting this. Thanks for the reminder
    – pfac
    Jan 19, 2021 at 14:48
  • worked with my wh-100xm3 headphones on manjaro. i wonder if there's a way to adjust the volume without using the android phone and sony connect app. Feb 18, 2021 at 7:07
6

My fix on kubuntu:

sudo nano /lib/systemd/system/bluetooth.service

Change

ExecStart=/usr/lib/bluetooth/bluetoothd

to

ExecStart=/usr/lib/bluetooth/bluetoothd --plugin=a2dp

then

sudo systemctl daemon-reload
sudo systemctl restart bluetooth

The effect should be immediate!

1
  • 1
    Note that it is preferable to use sudo systemctl edit bluetooth as opposed to editing the unit file directly.
    – Marc.2377
    Dec 5, 2019 at 2:23
2

For me on Ubuntu 18.04, neither --noplugin=avrcp nor --plugin=a2dp worked to get my AirPods working at full volume. I found that there was a DBus property at /org/bluez/hci0/dev_<MAC here>/fd0 that allowed setting the volume via AVRCP, but it doesn't work by default for whatever reason. I changed the source code within bluez as shown below to get it to work:

profiles/audio/transport.c

static gboolean volume_exists(const GDBusPropertyTable *property, void *data)
{
    struct media_transport *transport = data;
    struct a2dp_transport *a2dp = transport->data;

    return TRUE; // <-- Always return true to allow Volume to be set
}

After rebuilding and installing bluez and reinstalling pulseaudio-module-bluetooth, you should be able to connect to your AirPods or any other AVRCP-controllable device and issue the following command to set the volume.

dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_<mac address>/fd0 org.freedesktop.DBus.Properties.Set string:org.bluez.MediaTransport1 string:Volume variant:uint16:###

### should be replaced by a volume from 0 to 127

2
  • For those who don't want to compile the whole thing, the hex code of that method (in Ubuntu 20.04) is 48 8b 46 70 66 83 78 0a 7f and if you replace the 7f with ff, that method basically always returns TRUE. Just hexedit your /var/lib/bluetooth/bluetoothd and restart bluetooth.
    – mbirth
    Jun 13, 2020 at 23:03
  • I've reported this issue on: github.com/bluez/bluez/issues/17
    – mbirth
    Jun 13, 2020 at 23:11
0

For many users, the issue is simply that Bluetooth audio devices have a software and hardware volume. Turning up the software volume makes the sound quality worse. Linux doesn't support changing Bluetooth hardware volume*.

Workarounds

As @BassGod and others also mentioned there are two workarounds to this:

  • Have a physical method for adjusting the hardware volume on your Bluetooth audio device.
  • Adjust the hardware volume while the device is connected to Android/iOS/Windows/macOS. Then connect the device to your Linux.

Solutions

Just update

The best option is probably to update your OS (or more specifically pulseaudio), since according to some people this issue got resolved in pulseaudio version 15.

Control it via dbus

(Modified from @LiamDennehy and @Sean Normandy)

  1. Find the DBus object that allows control of the headset's internal volume:
$ dbus-send --system --print-reply --dest=org.bluez / org.freedesktop.DBus.ObjectManager.GetManagedObjects | less
  1. While it is piped to less, search for the interface org.bluez.MediaTransport1 (press slash /, type MediaControl1, press Enter) and record the value of the object path of the parent of the search result:
dict entry(
   object path "/org/bluez/hci0/dev_C8_B2_58_35_64_6F"
   array [
      dict entry(
         string "org.freedesktop.DBus.Introspectable"
         array [
         ]
      )
  1. Send volume up or volume down requests to it with these commands:
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_C8_B2_58_35_64_6F org.bluez.Control.VolumeUp
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_C8_B2_58_35_64_6F org.bluez.Control.VolumeDown
  1. Now you can map these commands to hotkeys via your desktop environment or make them accessible some other way.

Use some script

(Modified from @Sam Mason)

It works for any connected Bluetooth audio device - you don't need to manually find the mac address like in the previous example.

#!/usr/bin/python3

from pulsectl import Pulse
import subprocess
import sys

# Prerequisite tasks on ubuntu machine:
# sudo apt install python3-pip
# pip install pulsectl

method = 'org.bluez.MediaControl1.Volume{}'.format(
  'Down' if sys.argv[1] == 'down' else 'Up')

with Pulse() as pulse:
  for sink in pulse.sink_list():
    bluez_path = sink.proplist.get('bluez.path')
    if bluez_path:
        args = [
            'dbus-send', '--system', '--print-reply',
            '--dest=org.bluez', bluez_path, method,
        ]
        subprocess.run(args, check=True)

Then I made the file executable and mapped some hotkeys to run this script:

/home/me/scripts/bt_volume.py up
/home/me/scripts/bt_volume.py down

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