Hello again,
It’s been a problem that I was having for quite some months.
Basically every time I plug my headphones the audio doesn’t work, and for making it work I must always open Pavucontrol > Configuration and turn on my audio device configuration. Wanna point out that it has the following options:
If I click one the following Analog Stereo options, the “(unplugged) (unavailable)” comments disappear.
I think it’s kinda the same as https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/283
Is there any way to avoid this issue without depending on a script? pls
some logs
[toni@arch2 ~]$ journalctl --user -u wireplumber.service -b -0
dic 16 16:41:06 arch2 systemd[5717]: Started Multimedia Service Session Manager.
dic 16 16:41:06 arch2 wireplumber[5729]: Failed to get percentage from UPower: org.freedesktop.DBus.Error.NameHasNoOwner
dic 16 16:41:06 arch2 wireplumber[5729]: [0:00:43.330883657] [5729] ERROR IPAModule ipa_module.cpp:172 Symbol ipaModuleInfo not found
dic 16 16:41:06 arch2 wireplumber[5729]: [0:00:43.330898545] [5729] ERROR IPAModule ipa_module.cpp:292 v4l2-compat.so: IPA module has no valid info
dic 16 16:41:06 arch2 wireplumber[5729]: [0:00:43.330931076] [5729] INFO Camera camera_manager.cpp:284 libcamera v0.1.0
dic 16 16:41:06 arch2 wireplumber[5729]: GetManagedObjects() failed: org.freedesktop.DBus.Error.NameHasNoOwner
[toni@arch2 ~]$ pw-cli e alsa_card.pci-0000_30_00.6 Profile
Object: size 184, type Spa:Pod:Object:Param:Profile (262151), id Spa:Enum:ParamId:Profile (9)
Prop: key Spa:Pod:Object:Param:Profile:index (1), flags 00000000
Int 0
Prop: key Spa:Pod:Object:Param:Profile:name (2), flags 00000000
String "off"
Prop: key Spa:Pod:Object:Param:Profile:description (3), flags 00000000
String "Off"
Prop: key Spa:Pod:Object:Param:Profile:priority (4), flags 00000000
Int 0
Prop: key Spa:Pod:Object:Param:Profile:available (5), flags 00000000
Id 2 (Spa:Enum:ParamAvailability:yes)
Prop: key Spa:Pod:Object:Param:Profile:classes (7), flags 00000000
Struct: size 16
Int 0
Prop: key Spa:Pod:Object:Param:Profile:save (8), flags 00000000
Bool false
[toni@arch2 ~]$ pw-cli e alsa_card.pci-0000_30_00.6 Profile | grep String
String "off"
String "Off"
[toni@arch2 ~]$ pw-cli e alsa_card.pci-0000_30_00.6 Profile #After clicking the Analog Stereo Duplex option
Object: size 448, type Spa:Pod:Object:Param:Profile (262151), id Spa:Enum:ParamId:Profile (9)
Prop: key Spa:Pod:Object:Param:Profile:index (1), flags 00000000
Int 1
Prop: key Spa:Pod:Object:Param:Profile:name (2), flags 00000000
String "output:analog-stereo+input:analog-stereo"
Prop: key Spa:Pod:Object:Param:Profile:description (3), flags 00000000
String "Analog Stereo Duplex"
Prop: key Spa:Pod:Object:Param:Profile:priority (4), flags 00000000
Int 6565
Prop: key Spa:Pod:Object:Param:Profile:available (5), flags 00000000
Id 2 (Spa:Enum:ParamAvailability:yes)
Prop: key Spa:Pod:Object:Param:Profile:classes (7), flags 00000000
Struct: size 224
Int 2
Struct: size 96
String "Audio/Source"
Int 1
String "card.profile.devices"
Array: child.size 4, child.type Spa:Int
Int 0
Struct: size 96
String "Audio/Sink"
Int 1
String "card.profile.devices"
Array: child.size 4, child.type Spa:Int
Int 4
Prop: key Spa:Pod:Object:Param:Profile:save (8), flags 00000000
Bool true
[toni@arch2 ~]$ pw-cli e alsa_card.pci-0000_30_00.6 Profile | grep String
String "output:analog-stereo+input:analog-stereo"
String "Analog Stereo Duplex"
String "Audio/Source"
String "card.profile.devices"
String "Audio/Sink"
String "card.profile.devices"
the configs are from the Arch Wiki or probably somewhere else
~/.config/wireplumber/main.lua.d/41-persistent-profile.lua
table.insert (device_defaults.persistent_profiles, {
matches = {
{
-- Matches all sources.
{ "node.name", "matches", "alsa_input.*" },
},
{
-- Matches all sinks.
{ "node.name", "matches", "alsa_output.*" },
},
},
profile_names = {
"output:analog-stereo+input:analog-stereo=analog-output-headphones",
"on=analog-output-headphones",
"input:analog-stereo=analog-output-headphones"
}
})
~/.config/wireplumber/main.lua.d/51-disable-suspension.lua
table.insert (alsa_monitor.rules, {
matches = {
{
-- Matches all sources.
{ "node.name", "matches", "alsa_input.*" },
},
{
-- Matches all sinks.
{ "node.name", "matches", "alsa_output.*" },
},
},
apply_properties = {
["session.suspend-timeout-seconds"] = 0, -- 0 disables suspend
},
})
