Skip to content

Instantly share code, notes, and snippets.

@squeuei
Last active July 29, 2023 16:00
Show Gist options
  • Save squeuei/693a1b523b1407748631f1f8ef106f1b to your computer and use it in GitHub Desktop.
Save squeuei/693a1b523b1407748631f1f8ef106f1b to your computer and use it in GitHub Desktop.
Stop buggy behaviors about audio on Debian 12 (Bookworm) / Xfce 4.18

Stop buggy behaviors about audio on Debian 12 (Bookworm) / Xfce 4.18

I encountered some strange behaviors on HP Elitebook 830 G8 (CPU: TigerLake) upon installing Debian Bookworm with Xfce desktop environment. Such as:

  • Audio volume is set to 100% after suspend / monitor sleep.
  • The output doesn't automatically switch when a new device is connected.

To find the cause of the problems, I checked journalctl and I found:

Jul 28 21:32:10 xxx xdg-desktop-portal[2381]: pw.conf: can't load config client.conf: No such file or directory
Jul 28 21:32:10 xxx xdg-desktop-portal[2381]: pw.conf: can't load default config client.conf: No such file or directory
Jul 28 21:32:10 xxx xdg-desktop-por[2381]: Failed connect to PipeWire: Couldn't create PipeWire context

It seems to be a problem of pipewire not being installed. Thus, I installed pipewire by following the instructions on the Debian Wiki.

 apt install wireplumber pipewire-media-session-

After a reboot, the problem with suspend was solved. However, the hotplug issue remained. To solve this, uncomment the line below in the pipewire-pulse.conf file.

{ cmd = "load-module" args = "module-switch-on-connect" }

As noted in the Debian Wiki, you should be aware that the configuration directory has been moved from /etc/pipewire/ to /usr/share/pipewire/.

reference

Way to make pulseaudio to switch to the device connected.

Test if `module-switch-on-connect` works or not. You can try it by the command below.
pactl load-module module-switch-on-connect

If it goes well, then add the line below to /etc/pulse/default.pa.

 load-module module-switch-on-connect

Reference

Automatically change Sound Input Output device - Ask Ubuntu

Debian 12 (bookworm) / Xfce 4.18でオーディオ出力の変な挙動を止める

Xfceデスクトップ環境を搭載したDebian BookwormをHP Elitebook 830 G8 (CPU: TigerLake)にインストールした際、いくつかの異常な挙動が見られた。

  • サスペンド / モニタースリープ後に音量が100%になる
  • 新しいデバイスが接続されても出力が自動的に切り替わらない

journalctlの出力を確認したところ、以下のようなエラーが見られた。

Jul 28 21:32:10 xxx xdg-desktop-portal[2381]: pw.conf: can't load config client.conf: No such file or directory
Jul 28 21:32:10 xxx xdg-desktop-portal[2381]: pw.conf: can't load default config client.conf: No such file or directory
Jul 28 21:32:10 xxx xdg-desktop-por[2381]: Failed connect to PipeWire: Couldn't create PipeWire context

pipewireがインストールされていないことが問題かと考え、Debian Wikiの指示に従ってpipewireをインストールした。

 apt install wireplumber pipewire-media-session-

再起動後、サスペンドに関する問題は解決した。しかし、ホットプラグの問題は未解決のままだった。 これを解決するために、pipewire-pulse.confファイル内の以下の行についてコメントアウトを解除した。

{ cmd = "load-module" args = "module-switch-on-connect" }

Debian Wikiに記載されている通り、設定ディレクトリは/etc/pipewire/から/usr/share/pipewire/に移動されているので、Arch Wikiの記載と異なることに注意する。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment