beh_93825561489

joined 2 years ago
[–] [email protected] 3 points 10 months ago

I want to for exemple even when my headphones are plugged have the ablility to play audio through my speakers using qpwgraph and stuff like that its just a cool little thing I wanted to do also you can't do that in pavucontrol natively when you plug in headphones its as if your speaker doesn't exist you can't for example play the same audio on your headphones and speakers at the same time or play different audio its relatively niche kinda thing but its handy for the few times I needed it to be honest

 

might be helpful to someone so here we are cross-posted from: https://lemmy.ml/post/9547307

so since I digged pretty hard to find what is a ucm profile and how to seperate headphones from speakers in pipewire and alsa so yeah heres a guide first of all these are my sources:

https://github.com/luisbocanegra/linux-guide-split-audio-ports https://www.reactivated.net/writing_udev_rules.html https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3556 https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3552

you need a custom ucm profile use this command since its helpful lspci -nn -vvv

SUBSYSTEM!="sound", GOTO="pipewire_end"
ACTION!="change", GOTO="pipewire_end"
KERNEL!="card*", GOTO="pipewire_end"

ATTRS{subsystem_vendor}=="0x103c", ATTRS{subsystem_device}=="0x8742", ENV{ACP_PROFILE_SET}="custom.conf"

LABEL="pipewire_end"

and than create a file in /usr/share/alsa-card-profile/mixer/profile-sets/custom.conf and yeah I guess

https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/

and this especially

https://github.com/luisbocanegra/linux-guide-split-audio-ports

they helped a lot

[General]
auto-profiles = yes

[Mapping headphones]
device-strings= hw:0,2
channel-map = left,right
paths-output = behe-headphones
paths-input = analog-input-headphone-mic analog-input-headset-mic
priority = 20

[Mapping speaker]
device-strings= hw:0,0
channel-map = left,right
paths-output = behe-speaker
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 = 18

[Profile help]
input-mappings = speaker headphones
output-mappings = speaker headphones
description = both_both_is_good
skip-probe = yes
priority = 100

.include 9999-custom.conf

and yes that was my custom.conf and yes just reboot now and you are set btw no need to touch hdajackretask and that idor 0,2 and 0,0 I just switched profile to proaudio and than ran pactl list sinks short and took the ids from there I am basically following the guides and mimicking /usr/share/alsa-card-profile/mixer/profile-sets/default.conf to be completely honest yes thats all

 

so since I digged pretty hard to find what is a ucm profile and how to seperate headphones from speakers in pipewire and alsa so yeah heres a guide first of all these are my sources:

https://github.com/luisbocanegra/linux-guide-split-audio-ports

https://www.reactivated.net/writing_udev_rules.html

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3556

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3552

you need a custom ucm profile use this command since its helpful lspci -nn -vvv

SUBSYSTEM!="sound", GOTO="pipewire_end"
ACTION!="change", GOTO="pipewire_end"
KERNEL!="card*", GOTO="pipewire_end"

ATTRS{subsystem_vendor}=="0x103c", ATTRS{subsystem_device}=="0x8742", ENV{ACP_PROFILE_SET}="custom.conf"

LABEL="pipewire_end"

and than create a file in /usr/share/alsa-card-profile/mixer/profile-sets/custom.conf and yeah I guess

https://www.freedesktop.org/wiki/Software/PulseAudio/Backends/ALSA/Profiles/

and this especially

https://github.com/luisbocanegra/linux-guide-split-audio-ports

they helped a lot

[General]
auto-profiles = yes

[Mapping headphones]
device-strings= hw:0,2
channel-map = left,right
paths-output = behe-headphones
paths-input = analog-input-headphone-mic analog-input-headset-mic
priority = 20

[Mapping speaker]
device-strings= hw:0,0
channel-map = left,right
paths-output = behe-speaker
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 = 18

[Profile help]
input-mappings = speaker headphones
output-mappings = speaker headphones
description = both_both_is_good
skip-probe = yes
priority = 100

.include 9999-custom.conf

and yes that was my custom.conf and yes just reboot now and you are set btw no need to touch hdajackretask and that idor 0,2 and 0,0 I just switched profile to proaudio and than ran pactl list sinks short and took the ids from there I am basically following the guides and mimicking /usr/share/alsa-card-profile/mixer/profile-sets/default.conf to be completely honest yes thats all

-=-=-=-==-==--==

very fast update you actually have to enable indep_hp in hdajackretask btw fun fact you can apply now and test after killing wireplumber so don't forget to do that don't reboot over and over again (I am talking to myself here mostly also enable indep_hd using alsamixer after you do so in hdajackretask) and yes thats all peace

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

update so after realising I have ACPI: button: The lid device is not compliant to SW_LID. in my logs I found a couple of bug reports in the kernel https://bugzilla.kernel.org/show_bug.cgi?id=192231 https://bugzilla.kernel.org/show_bug.cgi?id=202421

so I guess this can be as well a kernel issue

so I made a bug report in the arch linux bug reporter: https://bbs.archlinux.org/viewtopic.php?pid=2119116

so yeah I guess and I hope someone understand the problem fix it with udev or the linux kernel directly or at least give me the steps to do so anyway yeah that's all

and I guess if this plan didn't work I have to learn C to fix the issue

[–] [email protected] 4 points 1 year ago (2 children)

there is one problem with those links they are forcing a whole device to be another device and I just want the key with scan code d7 to be state 0 of SW_LID and d8 to be state 1

and fixing this issue in the udev level will automatically fix everything like I will finally be able to use logind.conf

yeah read that bug report and to be honest I don't understand the developer standpoint like sorry at least give where can I find the documentation for udev rules

  • even if I use libinput these are the id_input available: ID_INPUT_KEYBOARD, ID_INPUT_KEY, ID_INPUT_MOUSE, ID_INPUT_TOUCHPAD, ID_INPUT_TOUCHSCREEN, ID_INPUT_TABLET, ID_INPUT_JOYSTICK, ID_INPUT_ACCELEROMETER

and there is no lid one so yeah I don't know is this problem unfixable with udev rules alone + I made this whole thread just to not make that bug report one of the other 1.9k other open ones except the fact that I wanna improve my experience with linux

+_+

[–] [email protected] 5 points 1 year ago (4 children)

well as far as I understand adding "AttrLidSwitchReliability=unreliable" will not actually fix the issue and I hope this issue is fixable to be honest

[–] [email protected] 1 points 1 year ago

so I made a follow up post: https://lemmy.ml/post/4441946 and a bug report: https://github.com/systemd/systemd/issues/28942 if you are interested in helping

[–] [email protected] 1 points 1 year ago

basically I guess this bug report will explain everything: https://github.com/systemd/systemd/issues/28942 and I made this post as a followup: https://lemmy.ml/post/4441946

  • basically in my laptop I have 3 problems pressing fn+f2/3 (supposedly brightness keys) it gives the same scan code and I am lost on how to give one of them up and the other down brightness second problem fn+f12 (basically the airport mode aka stop wifi) it doesn't even give a scancode in the first place third problem and the biggest is explained in that bug report and if you have any idea how to deal with this help I guess

and how did I set up the different sinks to headphone and speakers basically just used hdajackretask to make it so idep_hp = yes and then rebooted my laptop and yeah that was basically it and I am in the process of writing a script to change between the two sinks on the fly

 

yes I talked to the developers and well I guess I am supposed to figure it out myself but I don't know how so I am basically seeking help here this is the bug report: https://github.com/systemd/systemd/issues/28942

I guess I should post my own pr but I have no idea how to say to udev that the key specified as d8 is actually the lid being closed and the key specified as d7 is actually the lid being open

basically yes I am a noob and a helpful response will be just a documentation page to show me where can I begin to fix this problem

 

basically each of the following: fn+f2 or fn+f3 (not even being recognised by evtest ) and the lid being closed or opened is being reported as "Event: time 1692812642.988180, type 1 (EV_KEY), code 238 (KEY_WLAN), value 1".

so I though about remapping "Event: time 1692812642.988180, type 4 (EV_MSC), code 4 (MSC_SCAN), value d7" as the closing lid thingy

the same for fn+f2 and fn+f3 (increase and decrease brightness) I have to remap this "Event: time 1692812647.457821, type 4 (EV_MSC), code 4 (MSC_SCAN), value ab" so my question is I can remap the keyboard here 60-keyboard.hwdb but where can I remap the ev_msc stuff

basically all this to say I want to tell udev that the msc this with id d7 is actually the toggle for closing the lid and the msc thing with id ab are actually the two buttons that increase and decrease brightness and yeah that's all

 

so I want to create two scripts

  • first one that basically runs "systemctl suspend" when the lid is closed basically the default behavior doesn't work for some reason and running systemctl suspend always works so yeah you get the idea

  • since I have made the headsets aka the jack output and the default speakers each their respective sink (that's what I actually want (to have the power to put whatever I want in each sink using qpwgraph ) ) but that power comes at the cost of not switching between those respective two sinks so I just want to change I guess either the wireplumber config file or create a systemd service that runs when the jack port is plugged or unplugged

but I am lost in both questions to be honest and wireplumber is a mystery lol - sorry for being a noob if that matters