Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
WirePlumberのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
WirePlumber
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:マルチメディア]] [[en:WirePlumber]] {{Related articles start}} {{Related|PipeWire}} {{Related articles end}} [https://pipewire.pages.freedesktop.org/wireplumber WirePlumber] は、[[PipeWire]] 用の強力なセッションおよびポリシーマネージャです。モジュール設計に基づき、管理機能を実装し、 Lua プラグインによって、高度な設定と拡張が可能です。 == インストール == {{Pkg|wireplumber}} パッケージを [[インストール]]してください。他の PipeWire セッションマネージャーと競合しますので、必ずアンインストールするようにしてください。 WirePlumber は [[systemd/ユーザー]] を使ってサーバーを管理し、ソケットを自動で起動します。 オプションとして、ドキュメントを確認するために {{Pkg|wireplumber-docs}} をインストールしてください。 == 設定 == === 設定ファイルのレイアウト === [https://pipewire.pages.freedesktop.org/wireplumber/configuration.html WirePlumber の設定] は、変更された {{ic|context}} や {{ic|alsa_monitor}} などのグローバル PipeWire 風味の JSON オブジェクトで設定されていますその行動を変えるために。設定ファイルは、{{ic|~/.config/wireplumber/}} (ユーザー構成)、{{ic|/etc/wireplumber/}} (グローバル構成)、そして {{ic|/usr/share/wireplumber/}} (ストック構成) から読み取られます。 WirePlumber は、[https://pipewire.pages.freedesktop.org/wireplumber/configuration/main.html メイン設定ファイル] を読み取ることから開始します。これは、PipeWire コンテキスト、[https://docs.pipewire.org/page_spa_plugins.html SPA プラグイン]、モジュール、およびコンポーネントを設定する JSON のようなファイルです。これらのコンポーネントの中には、グローバルオブジェクトを動的に変更するために使用される [[Wikipedia:ja:Lua|Lua]] スクリプトエンジンがあります。 パッケージに同梱されているさまざまな設定ファイルがあります。 * シングルインスタンス設定ファイル{{ic|/usr/share/wireplumber/wireplumber.conf}} これはデフォルトの設定であり、他のすべての設定の機能を1つのプロセス内に含んでいます。 ** すべてのメイン設定ファイルで使用されている "context" オブジェクトについては、[https://pipewire.pages.freedesktop.org/wireplumber/configuration/main.html ドキュメント] を参照。 * メイン設定ファイル {{ic|/usr/share/wireplumber/main.conf}} WirePlumber コアに必要なモジュールとコンポーネントをロードし、{{ic|''config-dir''/main.lua.d/}} から [https://pipewire.pages.freedesktop.org/wireplumber/configuration/config_lua.html Lua 設定ファイル] をロードします。[https://pipewire.pages.freedesktop.org/wireplumber/configuration/config_lua.html] を参照してください。 ** [https://pipewire.pages.freedesktop.org/wireplumber/configuration/alsa.html ALSAオブジェクト] と [https://pipewire.pages.freedesktop.org/wireplumber/configuration/access.html "アクセス" オブジェクト] のドキュメントを参照してください。 * [[Bluetooth]] 設定ファイル {{ic|/usr/share/wireplumber/bluetooth.conf}} コアプロセスの Bluetooth 接続を処理する WirePlumber プロセスに適しています。これは{{ic|''config-dir''/bluetooth.lua.d/}} から Lua ファイルをロードします。 ** [https://pipewire.pages.freedesktop.org/wireplumber/configuration/bluetooth.html Bluetooth オブジェクトのドキュメント] を参照してください。 * ''policy'' 設定ファイルは {{ic|/usr/share/wireplumber/policy.conf}} にあります。これは、WirePlumber がノードの移動や変更を判断するためのポリシー機能をカプセル化したものです。{{ic|''config-dir''/policy.lua.d/}} から Lua ファイルを読み込みます。 ** ポリシー関連オブジェクトについては、[https://pipewire.pages.freedesktop.org/wireplumber/configuration/policy.html ドキュメント] を参照してください。 {{ic|lua.d/}} ディレクトリ内の Lua 設定ファイルは、{{ic|''config-dir''/scripts/}} から Lua スクリプトも読み込みます。これらのスクリプトは Pipewire のロジック/機能の一部を実装しており、特定の状況下では変更する価値がある場合もあります。 === 設定の変更 === WirePlumber を設定する推奨方法は、{{ic|/etc/wireplumber/}} または {{ic|~/.config/wireplumber/ 内の適切な {{ic|lua.d/}} ディレクトリに Lua スクリプトを追加することです。}} 考慮すべき点は次のとおりです。 * 上書きしたい既存のスクリプトがある場合は、{{ic|/usr/share/wireplumber/}} からコピーしてください。同じ名前で優先順位の低い場所にある設定ファイルは無視されます [https://pipewire.pages.freedesktop.org/wireplumber/configuration/locations.html#location-of-configuration-files] * 新しいスクリプトを追加する場合、50 より大きな数字で始めるべきです (例:{{ic|51-my-config.lua}}) デフォルトの設定は、英数字の並び順で 50 かそれ以下で行われることがほとんどだからです。 ** WirePlumber は [https://pipewire.pages.freedesktop.org/wireplumber/configuration/config_lua.html#multi-path-merging multi-path merging] を実行するため、英数字の並び順がディレクトリの優先順位よりも優先されるため、番号の低いストックの設定が新しいスクリプトよりも先に実行されることに注意してください。 * 選択するディレクトリは、ストックの設定が行うものと一致している必要がありますが、[https://pipewire.pages.freedesktop.org/wireplumber/configuration/multi_instance.html 複数インスタンスを使用する] 場合ではない限り、厳密には重要ではありません。 * Bluetooth デバイスの ALSA プロパティは {{ic|bluetooth.lua.d/}} で設定する必要があります。Bluetooth デバイスの ALSA プロパティは {{ic|main.lua.d/}} で設定されたものでは ''ありません''。 === ルールマッチングのためのインターフェース名の取得 === WirePlumber の Lua スクリプトでは、設定したい対象インターフェースの [https://docs.pipewire.org/page_objects_design.html PipeWire objects] で {{ic|matches}} ルールを指定する必要があります。 システムで利用可能な全てのオブジェクトを表示するには、コマンド {{ic|pw-cli list-objects}} と {{ic|pw-cli dump}} を使用します。 オブジェクト {{ic|Node}} は PipeWire グラフ内のシンクまたはソースです。これらは ALSA の {{ic|Device}} に対応します。 表示するオブジェクトの種類を絞り込むには、 {{ic|<nowiki>[Device|Node]</nowiki>}} オプションを追加してください。例えば: {{hc|$ pw-cli list-objects Device|output= ... id 37, type PipeWire:Interface:Device/3 object.serial = "264" factory.id = "14" client.id = "49" device.api = "alsa" device.description = "Starship/Matisse HD Audio Controller" device.name = "alsa_card.pci-0000_08_00.4" device.nick = "HD-Audio Generic" media.class = "Audio/Device" ... }} オブジェクトタイプのフィルタリングは、{{ic|pw-cli dump}} コマンドにも適用されます。 もしエンドポイントの特定のクラス (例:"Audio/Sink") を探しているのであれば、 {{ic|media.class}} プロパティを参照してください。 ほとんどの場合、ALSA を設定するときに必要なプロパティは {{ic|device.name}} か {{ic|node.name}} のどちらかです。 {{Tip|{{ic|pw-top}} コマンドは現在使用されている {{ic|Node}} のリストを表示します。}} === デバイス/ノードのプロパティを変更する === デバイスやノードのプロパティ(説明やニックネームなど)を変更するには、Lua スクリプトを作成し、{{ic|~/.config/wireplumber}} に適切なパスと名前で追加する必要があります。 例えば ALSA ノードの説明を変更するには、 {{ic|~/.config/wireplumber/main.lua.d/51-alsa-rename.lua}} のようなファイルを作成して、以下のような内容を記述してください。 {{hc|head=51-alsa-rename.lua|output=rule = { matches = { { { "node.name", "equals", "alsa_output.pci-0000_00_1f.3.output_analog-stereo" }, }, }, apply_properties = { ["node.description"] = "Laptop", }, } table.insert(alsa_monitor.rules,rule)}} もし、Bluetooth ノードやデバイスの何かを変更したい場合は、以下のような内容で {{ic|~/.config/wireplumber/bluetooth.lua.d/51-rename.lua}} を作成するとよいでしょう。 {{hc|head=51-rename.lua|output=rule = { matches = { { { "node.name", "equals", "bluez_output.02_11_45_A0_B3_27.a2dp-sink" }, }, }, apply_properties = { ["node.nick"] = "Headphones", }, } table.insert(bluez_monitor.rules,rule)}} Lua スクリプトのファイル名と場所は、[https://pipewire.pages.freedesktop.org/wireplumber/configuration/config_lua.html#multi-path-merging WirePlumber's マルチパスマージ] で、デフォルトの設定ファイル (例:{{ic|/usr/share/wireplumber/main.lua.d/50-alsa-config.lua}})デバイスをロードして有効にするファイル (例:{{ic|/usr/share/wireplumber/main.lua.d/90-enable-all.lua}})の前に実行できるよう設計されています。 デバイスやノードを選択するためのマッチングルールや、変更できるプロパティは [https://pipewire.pages.freedesktop.org/wireplumber/configuration/alsa.html ALSA 設定] と [https://pipewire.pages.freedesktop.org/wireplumber/configuration/bluetooth.html Bluetooth 設定] に記載されています。 === デバイス/ノードの無効化 === WirePlumber v0.4.7 からは、プロパティ {{ic|device.disabled}} または {{ic|node.disabled}} で任意のデバイスやノードを無効にできるようになりました。 {{hc|head=~/.config/wireplumber/main.lua.d/51-alsa-disable.lua|output=rule = { matches = { { { "device.name", "equals", "alsa_card.pci-0000_08_00.4" }, }, }, apply_properties = { ["device.disabled"] = true, }, } table.insert(alsa_monitor.rules,rule)}} システム内の {{ic|alsa_card.*}} の名前については、[[WirePlumber#Obtain interface name for rules matching]] を参照してください。 {{Note|一般的な使用例としては、NVIDIA の HDMI オーディオ出力を無効にする場合など。}} === 同じサウンドカード上の複数のシンクへの同時出力 === {{ic|/usr/share/alsa-card-profile/mixer/profile-sets/default.conf}} のコピーを作成して、更新後も変更が維持されるようにします。ここでは、アナログと HDMI の 2 つのデフォルトマッピングを結合するプロファイルを定義します。 {{hc|/usr/share/alsa-card-profile/mixer/profile-sets/multiple.conf|2= [General] auto-profiles = no [Mapping analog-stereo] device-strings = front:%f channel-map = left,right paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic priority = 15 [Mapping hdmi-stereo] description = Digital Stereo (HDMI) device-strings = hdmi:%f paths-output = hdmi-output-0 channel-map = left,right priority = 9 direction = output [Profile multiple] description = Analog Stereo Duplex + Digital Stereo (HDMI) Output output-mappings = analog-stereo hdmi-stereo input-mappings = analog-stereo }} ここで、一致するデバイスに新しいカードプロファイルを使用するように Wireplumber を設定します。識別情報については、[[WirePlumber#ルール マッチングのためのインターフェース名の取得|ルール マッチングのためのインターフェース名の取得]] を参照してください。次のような Lua スクリプトを作成して構成を適用します。 {{hc|/etc/wireplumber/main.lua.d/51-alsa-custom.lua (or ~/.config/wireplumber/main.lua.d/51-alsa-custom.lua)|2= rule = { matches = { { { "device.nick", "matches", "HDA Intel PCH" }, }, }, apply_properties = { ["api.alsa.use-acp"] = true, ["api.acp.auto-profile"] = false, ["api.acp.auto-port"] = false, ["device.profile-set"] = "multiple.conf", ["device.profile"] = "multiple", }, } table.insert(alsa_monitor.rules,rule) }} == ヒントとテクニック == === キーボードで音量コントロール === 次のコマンドをボリュームキーにバインドするには、[[キーボードショートカット#Xorg]] を参照してください: {{ic|XF86AudioRaiseVolume}}、{{ic|XF86AudioLowerVolume}}、{{ic|XF86AudioMute}}、および {{ic|XF86AudioMicMute}} 音量を 150% の制限で上げるには: $ wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ 音量を下げるには: $ wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- ボリュームをミュート/ミュート解除するには: $ wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle マイクをミュート/ミュート解除するには: $ wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle {{Tip|デフォルト以外のシンクまたはソースを使用するには、{{ic|wpctl status}} を実行して利用可能なすべてのシンクをリストし、{{ic|@DEFAULT_AUDIO_SINK@}} または {{ic|_SOURCE@}}}} === 音量レベルを表示 === デフォルトのシンクの音量レベルとミュート状態を取得するには、次の手順を実行します。 {{hc|$ wpctl get-volume @DEFAULT_AUDIO_SINK@|Volume: 0.45}} {{Note|ミュートステータスは、シンクがミュートされている場合にのみ表示されます。}} === ログアウト後も Bluetooth を実行し続ける/ヘッドレス Bluetooth === デフォルトでは、{{ic|/usr/share/wireplumber/bluetooth.lua.d/50-bluez-config.lua}} により [https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/222/diffs?commit_id=a253aa4c4948cdd87ba222670ee17db849af85dd logind モジュール]が有効化されます。このモジュールは、セッションが終了すると Bluetooth を無効化します。この挙動は以下の設定で無効化できます: {{hc|/etc/wireplumber/bluetooth.lua.d/50-bluez-config.lua (あるいは ~/.config/wireplumber/bluetooth.lua.d/50-bluez-config.lua)|2= bluez_monitor.properties = { ["with-logind"] = false, } }} {{Note|これに加えて、[[PipeWire]]/Wireplumber を実行しているユーザーに対しては[[systemd/ユーザー#systemd のユーザーインスタンスを自動起動|残留 (lingering)]] を有効にする必要があります。}} == 参照 == * [https://pipewire.pages.freedesktop.org/wireplumber/ Documentation] — オフィシャル ドキュメント * [https://www.collabora.com/news-and-blog/blog/2020/05/07/wireplumber-the-pipewire-session-manager/ WirePlumber, PipeWire session manager] - George Kiagiadakis (Collabora) による2020年5月のブログ記事で、WirePlumber の仕組みが詳しく説明されています。
このページで使用されているテンプレート:
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
WirePlumber
に戻る。
検索
検索
WirePlumberのソースを表示
話題を追加