“Failed to change profile to a2dp_sink”の対策方法 for PulseAudio

Linux IT Tips

英語リソースでごちゃごちゃ色んな方法が出てるけど、最適解はこうよ。

・/etc/bluetooth/input.conf を作成

# sudo vim /etc/bluetooth/input.conf
# Configuration file for the input service

# This section contains options which are not specific to any
# particular interface
[General]
Disable=Headset
# Set idle timeout (in minutes) before the connection will
# be disconnect (defaults to 0 for no timeout)
IdleTimeout=0

# Enable HID protocol handling in userspace input profile
# Defaults to false (HIDP handled in HIDP kernel module)
#UserspaceHID=true

# Limit HID connections to bonded devices
# The HID Profile does not specify that devices must be bonded, however some
# platforms may want to make sure that input connections only come from bonded
# device connections. Several older mice have been known for not supporting
# pairing/encryption.
# Defaults to false to maximize device compatibility.
#ClassicBondedOnly=true

# LE upgrade security
# Enables upgrades of security automatically if required.
# Defaults to true to maximize device compatibility.
#LEAutoSecurity=true

・既存の各コンフィグを書き換える

# sudo vim /etc/bluetooth/main.conf
# [Policy]の一番下に下記を追加
Disable=Socket

# sudo vim /etc/pulse/default.pa
下記コンフィグの該当箇所を書き換え

# load-module module-bluetooth-policy
load-module module-bluetooth-policy auto_switch=false

# pulseaudioはユーザレベルでデーモン化させておいたほうが楽かもね。
# PipewireとかWireplumberの都合を考えて。
# sudo systemctl restart bluetooth
# systemctl --user --now restart pulseaudio

# 下記コマンドでBluetoothデバイスのMACアドレスを探す
# また、使用可能なプロファイルを確認
# pactl list cards

# 初期プロファイルをセット
pactl set-card-profile <PROFILE_OF_YOUR_BT_DEVICE> a2dp_sink

コメント

タイトルとURLをコピーしました