Skip to content
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

JamesDSP prevents video playback until volume/audio button is clicked #74

Closed
jastx-jasmint opened this issue Oct 29, 2022 · 29 comments
Closed
Assignees

Comments

@jastx-jasmint
Copy link

jastx-jasmint commented Oct 29, 2022

Hello, it appears that this has not been reported here despite it being quite a notorious issue (here's one such thread on the Garuda Linux forums).

This issue doesn't discriminate against browsers, and tends to randomly appear. It affects any form of video playback in the system, which means VLC and other media playback apps are affected as well. Many have solved the issue by not letting JamesDSP autostart, but the issue is that when it is started, it will sometimes exhibit this problem. It appears that once it happens during a session, it will always happen upon a restart of the program. It's not always guaranteed that the issue happens as soon as JamesDSP is autostarted- as is often in my case, it just randomly happens when it feels like it.

When this issue happens, Firefox and Chromium will suggest restarting the device. Clicking the volume icon, adjusting the volume or quitting JamesDSP will unfreeze the video, but skipping through the video will cause it to freeze again until one of the actions mentioned are taken (except for the quit one).
I love using JamesDSP for its bass boost, so I would prefer not to disable autostart or fiddle with volume buttons.

Here's my system information to help you troubleshoot, though this hasn't been limited to only one person or system: https://gist.github.com/jastx-jasmint/e0f9b61e6e70086bfed77f99cd3dddfe

@HanabishiRecca
Copy link

this has not been reported here

It has been reported earlier: #70
The issue is partially fixed, it was 100% consistent before. Now it is random, as you said. I also tried tinkering with WirePlumber configs, but no luck.
We need @ThePBone response.

@timschneeb
Copy link
Member

I also noticed this issue happening randomly on my laptop. Initially, I linked it to power saving mode in KDE because the problem appeared to occur more frequently while it was on.

The pipewire backend of this app is closely based on EasyEffects' implementation, so it is a good idea to keep an eye on the issues in their repo too.
Some people over there appear to experience the same issues:

I'm not sure where to start at the moment, I couldn't find anything relevant in pipewire's or jamesdsp's log yet. I'll probably search through the changelogs for wireplumber and pipewire, maybe there were some breaking changes I missed.

@wwmm
Copy link

wwmm commented Nov 3, 2022

The pipewire backend of this app is closely based on EasyEffects' implementation, so it is a good idea to keep an eye on the issues in their repo too.

I couldn't find anything relevant in pipewire's or jamesdsp's log yet. I'll probably search through the changelogs for wireplumber and pipewire, maybe there were some breaking changes I missed.

I have tried to debug this in EasyEffects several times.. If this is the same bug we are seeing on our side just looking at PipeWire's logs is useless. We have to find a reliable way to make it happen so we look at PipeWire's logs at the moment the bug manifest itself. But even after many months I could not find a way.

A long time ago I opened an issue about this in PipeWire's page. The main problem is that according to PipeWire's own tools like pw-dot everything is fine. The links are there and active. Things should work fine... But somehow they don't...

@HanabishiRecca
Copy link

I already pointed out the MR which caused the issue. Obviously this links rescan thing was useful for us.

I will try to revert back scheduleRescan() into policy-node.lua and report the results.

@HanabishiRecca
Copy link

HanabishiRecca commented Nov 3, 2022

Yes, it definitely helped.

Edited policy-node.lua:

--- /usr/share/wireplumber/scripts/policy-node.lua
+++ /etc/wireplumber/scripts/policy-node.lua
@@ -699,6 +699,8 @@
           -- remove also not yet activated links: they might never become active,
           -- and we should not loop waiting for them
           Log.warning (link, "Link was not activated before removing")
+          scheduleRescan()
+          return
         end
         si_flags[si_id].peer_id = nil
         link:remove ()

I kept the warning to see it actually still shows up, and it does:

wireplumber[2268]: <WpSiStandardLink:0x55f7f22dcca0> Link was not activated before removing

But the sound works with no problems at all. So if someone needs a hotfix, here it is.


Edit: MR author posted a bit more appropriate fix.

@jastx-jasmint
Copy link
Author

jastx-jasmint commented Nov 4, 2022

It has been reported earlier: #70

Ahh I didn't see it as I only looked at open issues, sorry about that. ^^;

Awesome that you've come up with a hotfix! I'll give it a try, and close the issue if it fixes it.

@HanabishiRecca
Copy link

HanabishiRecca commented Nov 4, 2022

I'll give it a try, and close the issue if it fixes it.

I don't think it should be closed now. At least for people to see the problem exists.

Btw, MR author posted a bit more appropriate fix.

@jastx-jasmint
Copy link
Author

I don't think it should be closed now. At least for people to see the problem exists.

Ahh yep, understood, since that was my same exact misunderstanding HAHA
I didn't expect this to get addressed so quickly, so this is really epic. Thank you for moving this along and bringing it to the attention of the right people. :D

@HanabishiRecca
Copy link

HanabishiRecca commented Nov 4, 2022

I didn't expect this to get addressed so quickly

It should have been done months ago actually. Before WirePlumber made it to release. If only I knew earlier that the issue is actually widespread and not JDSP specific.

ford-prefect pushed a commit to PipeWire/wireplumber that referenced this issue Nov 7, 2022
If a link is not activated, don't remove it. Instead, schedule a rescan
when a link activates, so that we'll handle it once it does.

This is a workaround for some problems, see
Audio4Linux/JDSP4Linux#74
However, the underlying cause is not understood.
@HanabishiRecca
Copy link

Fix merged to WirePlumber upstream.
https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/450

@jastx-jasmint
Copy link
Author

This hasn't been an issue since the update, which is awesome :D
Shall I close the issue?

@HanabishiRecca
Copy link

Which update? There were no updates for JDSP or WirePlumber since.

@jastx-jasmint
Copy link
Author

Since the merge request you linked before, which got merged into the master branch. I haven't encountered the issue mentioned in this thread since then

@HanabishiRecca
Copy link

Are you using wireplumber package from Arch repo?

Last Updated: 2022-10-07 18:32 UTC

If you did not applied hotfix manually, this is magic.

@timschneeb
Copy link
Member

Probably wireplumber-git from the AUR? It works flawlessly for me so far.

@jastx-jasmint
Copy link
Author

jastx-jasmint commented Nov 19, 2022

bruh sorry all, did the dumb haha. I applied the hotfix manually, so of course it'd work 🤡 I'm not using wireplumber-git, but if I ever magically run into the issue again, I'll give it a shot.

edit:
A user on the Garuda Linux forums said that installing wireplumber-git didn't solve the issue for them, so it's not a universal fix.

@HanabishiRecca
Copy link

WirePlumber 0.4.13 released

Fixes:

  • Worked around an issue that would prevent streams from properly linking
    when using effects software like EasyEffects and JamesDSP

@jastx-jasmint
Copy link
Author

Awesome ^^ is it time to close this issue?

@HanabishiRecca
Copy link

If it solves the issue for you, I think yes.

@zany130
Copy link

zany130 commented Dec 16, 2022

I'm still having this issue in all apps now originally it was only in proton games.

In fact as long as jamesdsp is running there is no audio raising the volume switching the output devices, etc does nothing.

The only way to get working audio is to close jamesdsp

@LOLCATATONIA
Copy link

Also having this issue... also using Garuda. How can I assist in solving the problem?

@HanabishiRecca
Copy link

Also having this issue... also using Garuda

WirePlumber 0.4.13? I have no issues on Arch after the update (as expected). AFAIK Garuda uses Arch repos for packages so should behave the same.

Anyway, inspect your system logs. There can be unrelated problems. Generally collect

$ journalctl --user-unit=pipewire.service
$ journalctl --user-unit=pipewire-pulse.service
$ journalctl --user-unit=wireplumber.service

after the problem appears.

@zany130
Copy link

zany130 commented Dec 17, 2022

pacman -Qi wireplumber
Name            : wireplumber
Version         : 0.4.13-1
Description     : Session / policy manager implementation for PipeWire
Architecture    : x86_64
URL             : https://pipewire.pages.freedesktop.org/wireplumber/
Licenses        : MIT
Groups          : None
Provides        : pipewire-session-manager
Depends On      : libwireplumber=0.4.13-1  libsystemd.so=0-64  lua  pipewire
Optional Deps   : wireplumber-docs: Documentation
Required By     : gst-plugin-pipewire  kwin  pipewire-alsa  pipewire-jack  pipewire-pulse  pipewire-support  pipewire-v4l2
Optional For    : pipewire
Conflicts With  : pipewire-media-session
Replaces        : None
Installed Size  : 871.90 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Tue 13 Dec 2022 06:33:08 AM EST
Install Date    : Thu 15 Dec 2022 05:43:07 PM EST
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature
journalctl --user-unit=wireplumber.service
Dec 16 22:48:49 Garuda-Linux wireplumber[105494]: <WpPortalPermissionStorePlugin:0x55e3d2b10f20> Fai>
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopping Multimedia Service Session Manager...
Dec 17 02:39:46 Garuda-Linux wireplumber[105494]: stopped by signal: Terminated
Dec 17 02:39:46 Garuda-Linux wireplumber[105494]: disconnected from pipewire
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopped Multimedia Service Session Manager.
Dec 17 02:39:46 Garuda-Linux systemd[104869]: wireplumber.service: Consumed 4.597s CPU time.
-- Boot 73e037fdea07491d8af47560fd923814 --
Dec 17 12:04:35 Garuda-Linux systemd[10377]: Started Multimedia Service Session Manager.
Dec 17 12:04:35 Garuda-Linux wireplumber[10980]: [0:00:19.103731216] [10980]  INFO Camera camera_man>
Dec 17 12:04:36 Garuda-Linux wireplumber[10980]: <WpPortalPermissionStorePlugin:0x55c3e0c6f220> Fail>
lines 1-10/10 (END)
journalctl --user-unit=pipewire.service
Dec 16 20:20:44 Garuda-Linux pipewire[105492]: mod.x11-bell: X11 I/O error handler called on display>
Dec 16 20:20:44 Garuda-Linux pipewire[105492]: mod.x11-bell: X11 display (:1) has encountered a fata>
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopping PipeWire Multimedia Service...
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopped PipeWire Multimedia Service.
Dec 17 02:39:46 Garuda-Linux systemd[104869]: pipewire.service: Consumed 1min 46.102s CPU time.
-- Boot 73e037fdea07491d8af47560fd923814 --
Dec 17 12:04:35 Garuda-Linux systemd[10377]: Started PipeWire Multimedia Service.
lines 1-7/7 (END)...skipping...
Dec 16 20:20:44 Garuda-Linux pipewire[105492]: mod.x11-bell: X11 I/O error handler called on display>
Dec 16 20:20:44 Garuda-Linux pipewire[105492]: mod.x11-bell: X11 display (:1) has encountered a fata>
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopping PipeWire Multimedia Service...
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopped PipeWire Multimedia Service.
Dec 17 02:39:46 Garuda-Linux systemd[104869]: pipewire.service: Consumed 1min 46.102s CPU time.
-- Boot 73e037fdea07491d8af47560fd923814 --
Dec 17 12:04:35 Garuda-Linux systemd[10377]: Started PipeWire Multimedia Service.
journalctl --user-unit=pipewire-pulse.service
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopping PipeWire PulseAudio...
Dec 17 02:39:46 Garuda-Linux systemd[104869]: Stopped PipeWire PulseAudio.
Dec 17 02:39:46 Garuda-Linux systemd[104869]: pipewire-pulse.service: Consumed 3min 12.110s CPU time.
-- Boot 73e037fdea07491d8af47560fd923814 --
Dec 17 12:04:37 Garuda-Linux systemd[10377]: Started PipeWire PulseAudio.

thats what it shows for me

Sys info

@HanabishiRecca
Copy link

@zany130 seems like you have some issues wireplumber[10980]: <WpPortalPermissionStorePlugin:0x55c3e0c6f220> Fail> but your log is abrupted. Use something like

$ journalctl --user-unit=wireplumber.service --no-pager

or just pipe it to a file, e.g.

$ journalctl --user-unit=wireplumber.service > wireplumber.log

@zany130
Copy link

zany130 commented Dec 17, 2022

Those errors seems to be due to screen sharing as they pop up whenever I use discord screen share or launch obs so I don't think its related to this issue. Audio continues to work when those errors show up anyway, in fact nothing new is logged in the journal when I launch jamesdsp and immediately lose audio

EDIT: on this boot I didn't even get the error it seems (the <WpPortalPermissionStorePlugin: audio still does not work)

journalctl --user-unit=wireplumber.service --no-pager
Dec 17 12:23:57 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:24:35 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:24:45 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:02 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:11 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:18 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:23 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:28 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:34 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:41 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:25:48 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:26:20 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:26:40 Garuda-Linux wireplumber[12628]: <WpPortalPermissionStorePlugin:0x55db93af75c0> Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera
Dec 17 12:36:56 Garuda-Linux systemd[12028]: Stopping Multimedia Service Session Manager...
Dec 17 12:36:56 Garuda-Linux wireplumber[12628]: stopped by signal: Terminated
Dec 17 12:36:56 Garuda-Linux wireplumber[12628]: disconnected from pipewire
Dec 17 12:36:56 Garuda-Linux systemd[12028]: Stopped Multimedia Service Session Manager.
-- Boot 363bc413c28143ec9cfeafc150d475ca --
Dec 17 12:37:51 Garuda-Linux systemd[10318]: Started Multimedia Service Session Manager.
Dec 17 12:37:51 Garuda-Linux wireplumber[10918]: [0:00:18.154888630] [10918]  INFO Camera camera_manager.cpp:299 libcamera v0.0.2

 ╭─zany130@Garuda in ~ via  v3.10.8 took 3ms
 ╰─λ

here are the other two

 ╭─zany130@Garuda in ~ via  v3.10.8 took 3ms
╰─λ journalctl --user-unit=pipewire.service --no-pager
Dec 17 12:36:55 Garuda-Linux pipewire[12611]: mod.x11-bell: X11 I/O error handler called on display :1
Dec 17 12:36:55 Garuda-Linux pipewire[12611]: mod.x11-bell: X11 display (:1) has encountered a fatal I/O error
Dec 17 12:36:56 Garuda-Linux systemd[12028]: Stopping PipeWire Multimedia Service...
Dec 17 12:36:56 Garuda-Linux systemd[12028]: Stopped PipeWire Multimedia Service.
Dec 17 12:36:56 Garuda-Linux systemd[12028]: pipewire.service: Consumed 2.155s CPU time.
-- Boot 363bc413c28143ec9cfeafc150d475ca --
Dec 17 12:37:51 Garuda-Linux systemd[10318]: Started PipeWire Multimedia Service.

╭─zany130@Garuda in ~ via  v3.10.8 took 3ms
╰─λ journalctl --user-unit=pipewire-pulse.service --no-pager
Dec 17 12:36:56 Garuda-Linux systemd[12028]: Stopping PipeWire PulseAudio...
Dec 17 12:36:56 Garuda-Linux systemd[12028]: Stopped PipeWire PulseAudio.
Dec 17 12:36:56 Garuda-Linux systemd[12028]: pipewire-pulse.service: Consumed 2.656s CPU time.
-- Boot 363bc413c28143ec9cfeafc150d475ca --
Dec 17 12:37:53 Garuda-Linux systemd[10318]: Started PipeWire PulseAudio.

╭─zany130@Garuda in ~ via  v3.10.8 took 3ms
╰─λ

@HanabishiRecca
Copy link

I launch jamesdsp and immediately lose audio

Hmm, are you sure your audio setup is ok? Did you checked it with something like pavucontrol?
Like proper output should be selected as the default. Your real one, not JamesDSP Sink.
Also JamesDSP Sink should not be muted. And its monitor (input device) too.

@HanabishiRecca
Copy link

are you sure your audio setup is ok?

But now reading your original issue, I don't think this is the case.

I see there are USB/Bluetooth audio devices in your system. The problem appears when you use them? Did you tried wired output?

@zany130
Copy link

zany130 commented Dec 17, 2022

Also JamesDSP Sink should not be muted. And its monitor (input device) too.

Well that was exactly the issue 🤦 unmuted it and now everything seems to be working

@timschneeb
Copy link
Member

Well that was exactly the issue unmuted it and now everything seems to be working

Great! I'll see if I can implement a check that ensures that the sink is unmuted at all times.

This was referenced Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants