New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulseeffects doesn't apply preset when switching from speaker to headphones (headphone jack) #520
Comments
Headphones that are plugged in the sound card jack are treated in a different way by Pulseaudio. It took some time to realize how to support them. But they should work too in the latest PE versions. The procedure is the same. Plug it in the sound card so that they become the default output device and then select a preset that should be loaded the next time they are plugged in the system. If everything is fine a file for this headphone should be created in the folder |
As an example when I plug a headphone in my sound card and do the procedure above this file is created |
Hmm I am on Archlinux with version 4.6.1-1. But no idea why. Pulse audio shows me: |
Usually Pulseaudio creates a port in the soundcard for these kind of headphones. Plug this headphone and run the command |
pactl output
|
I don't see a reason for this to be failing. In your soundcard we have
Try to see if it prints nothing or a file with another name. When you tried to do this was your soundcard(not the one in the usb) set as default device? Right now this feature only works for default devices. It is a limitation I am not sure how to overcome. |
Headphones plugged in + setting a preset: Removed the headphones (speakers active) and set a preset: So in both cases it will write it to the same .json file. In reality it should make two different .json files. One for my speakers, one for my headphone jack? :/ |
Yes. In your case I would expect something like this I have only one explanation for this. For some bizarre reason Pulseaudio seems to be giving me a |
And they read it just like I do https://github.com/pulseaudio/pulseaudio/blob/4e3a080d7699732be9c522be9a96d851f97fbf11/src/utils/pactl.c#L331 =/ |
Hmm weird. Well it doesn't bother me too much because I rarely use the headphone jack but it would still be nice to see it fixed and might also resolve the same problem for others :) Let me know if I should provide any further debug/logs/testings... thats all I can do to help :( |
I'm having a similar issue; I'm trying to use this to fix my GPD Win 2's speakers being out of phase, and while PE correctly detects whether the speakers or headphones are in use when opening the presets pane, it only actually switches when unplugging the headphones and not when plugging them in. |
It would be good to see what PE prints when this happens. Run |
No messages when plugging headphones in; removing headphones prints:
|
It feels like Pulseaudio is not sending us notifications when the headphones are plugged. Only when they are removed. This may be a hardware dependent Pulseaudio bug. In my computer it emits the sink changed signal when the headphones are plugged =/ |
well, since the application gets the correct info when it actually checks, perhaps add an option to recheck every so often, with a configurable period? |
I can confirm what zetaPRIME is experiencing on a Dell Latitude 5490 notebook, that is, PE only actually switches when unplugging the headphones and not when plugging them in. |
I could do what @zetaPRIME suggested but I have to think if continually polling Pulseaudio like this could degrade performance. And it somehow feels like a last resort. I would like to be sure there is nothing else I can do before trying this. @zetaPRIME and @roospeteristvan there is another test you can do. Open Pavucontrol with the headphones unplugged and go to the output devices tab. Pay attention to the |
I've been having the same issue. PulseEffects recognises the switch from headphones to speakers, but not speakers to headphones. @wwmm, I just tried as you suggested in pavucontrol, and the port field immediately changes from I use headphones a lot, so I'm happy to help to debug this in any way I can, just let me know! |
Interesting. When you plugged the headphone the output device was moved to the end of Pavucontrol list or did it stay in the same position? In my computer it is moved to the end. What suggests that Pulseaudio destroyed the sink and recreated it with another port. Maybe this is the reason why this feature is working on my hardware and not on others. Recreating the sink would cause a similar effect to change from one output device to another. In any case I will delay the moment we ask about the headphone port state. Maybe Pulseaudio or the sound card need sometime to make the headphone port active. |
I have made some changes and now we wait for 3 seconds before auto loading presets. People on Arch Linux can use the aur package |
Something is definitely odd in Pulseaudio. Sometimes it emits a signal telling that the speakers are the new default device when I plug the headphones and right after that it emits a signal telling the the headphone is the new default device. In the end things work but it makes no sense to do what Pulseaudio is doing. And it is totally random. Most of the time it emits only the headphone signal... In any case a delay should help to workaround this weird behavior... |
If I understand your question correctly, I only have the two output devices listed under port; speakers and headphones. Headphones are listed last in either case. I've attached screenshots of before and after plugging in the headphones, although I'm guessing it probably doesn't help much in this case. I'm just using Linux Mint Cinnamon 19.1, so can't help you test with |
After talking about this with Pulseaudio devs they suggested to open a new issue there about this https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/700. They would also like to see some advanced Pulseaudio logs when the headphone is plugged/unplugged. You can get these advanced logs as explained here https://github.com/wwmm/pulseeffects/wiki/Reporting-Bugs |
After some guidance from Pulseaudio developers I think I was able to rework this feature in a way that should work in every sound card. It would be good to have some feedback before the next release. |
I will assume |
Hi @wwmm, |
Good to know! :-) |
Hello again,
so far Pulseeffects switches it's settings/presets perfectly fine between:
Laptop Speakers
Sennheiser HD800S + DAC1 - via USB
Sennheiser HD600 + DAC2 - via USB
How ever, today I tried plugging some random VE Monk headphones in the headphone jack and pulseeffects doesn't switch automatically.
Pulseaudio is detecting that my output changed from speakers to headphones and also applies the last saved volume level. But pulseeffects doesn't?
Thanks!
The text was updated successfully, but these errors were encountered: