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

no sound, randomly, viewing video with FF , Chrome, VLC #1789

Closed
promeneur opened this issue Aug 31, 2022 · 65 comments
Closed

no sound, randomly, viewing video with FF , Chrome, VLC #1789

promeneur opened this issue Aug 31, 2022 · 65 comments

Comments

@promeneur
Copy link

EasyEffects Version

6.2.6

What package are you using?

openSUSE

Distribution

openSUSE Tumbleweed

Describe the bug

Randomly, sometime when viewing a video with FF or Chrome (YouTube) or VLC then there is no sound.

It seems this occurs after several starts and stops, or several launching and quitting.

Speakers are "on".

I must restart the PC to get again sound For FF or Chrome or VLC.

Expected Behavior

Output sound is never cut.

Debug Log

Debug Log
Paste your log here

Additional Information

No response

@wwmm
Copy link
Owner

wwmm commented Aug 31, 2022

This reminds of a bug whose source is still a mystery https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1733. The next time this happens try to see if enabling and disabling the global bypass button, the one next to the presets menu, makes the sound come back. Or if disabling and enabling effects for the streams in the corresponding EasyEffects checkbox makes any difference. If one of these things work it is probably the same situation as the one in the issue I have opened in the PipeWire's page.

I must restart the PC to get again sound For FF or Chrome or VLC.

Executing easyeffects -q and opening it again by clicking on you desktop icon is a faster solution if the global bypass procedure has no effect.

@promeneur
Copy link
Author

pipewire 0.3.56

Ok, I will try your solution and I will report the result.

Thanks

@promeneur
Copy link
Author

The problem has just occured with VLC. I get again the sound by clicking twice the "bypass" button.

@wwmm
Copy link
Owner

wwmm commented Sep 3, 2022

The problem has just occured with VLC. I get again the sound by clicking twice the "bypass" button.

Ok. The next time this happens run pw-dot before forcing the sound to come back. The output file can be viewed with the command xdot. It would be good to know if in your computer the links between filters are paused or if the sound is gone even if the links are made and active. In the past I saw paused links. But for a while I have been noticing lack of sound even if PipeWire tells that the links are made and active.

@promeneur
Copy link
Author

Exactly what happens.

With FF I play a video.
After this video, I quit FF and launch VLC.
With VLC I play a video
After this video, I search and play another video.
From the beginning of the video, i get no sound. I pause the video.
I launch EE
I click twice the "bypass" button
I keep on playing the video. this time i get sound.

@LebedevRI
Copy link
Contributor

I would just like to mention that this / https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1733 is also happening for me,
during watching youtube videos in chrome on debian sid. No actionable reproduction steps, sadly.

@wwmm
Copy link
Owner

wwmm commented Sep 11, 2022

No actionable reproduction steps, sadly.

That is one of the main problems with this bug. It is too random and as a result hard to debug. I think that just like https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2617 we are facing some kind of bug in PipeWire. As far as PipeWire's API is concerned I do not see what else I could do different in order to avoid these 2 bugs.

@wwmm
Copy link
Owner

wwmm commented Sep 11, 2022

Whenever this "no sound" bug happens it is important to run pw-dot and maybe pw-dump too before forcing things to work again. This way we can see if anything new is happening to the link states.

@LebedevRI
Copy link
Contributor

LebedevRI commented Sep 13, 2022

(left channel is silent)
pw-dump.txt
pw.dot.txt

@LebedevRI
Copy link
Contributor

Worse case: left channel is somehow random noise, right channel is good.
pw-dump.txt
pw.dot.txt

@wwmm
Copy link
Owner

wwmm commented Sep 13, 2022

(left channel is silent)
Worse case: left channel is somehow random noise, right channel is good.

The pw-dot output is totally fine. Just like I have seen in the last months when this problem happens. I will need some time to take a good look at the pw-dump file.

Such a frustrating bug... According to PipeWire's own tool the links are there and in the active state. There should be audio but somehow there isn't.

@promeneur
Copy link
Author

New phenomenon.

during a skype video talk suddenly no more mic.
before playing with "by pass" button, I executed "pw-dot".

pw.dot.txt

playing with "by pass" button does not solve the problem.

I recalled my contact then again after a while no more mic.

more info : the mic is dynamically shared between the host and a qemu guest.

I never get any problem till this day using mic with Skype.

@wwmm
Copy link
Owner

wwmm commented Sep 14, 2022

before playing with "by pass" button, I executed "pw-dot".

And again the output is totally fine. The filters are loaded and the links between them are in the active state... I wonder what is happening inside PipeWire under the hoods. If the links are active they are literally sending silent audio buffers to the filters. It doesn't make any sense.

@promeneur
Copy link
Author

More info about mic : I get an error message from Skype saying there is a problem with the mic and suggesting to restart the PC.

@promeneur
Copy link
Author

I get the problem with VLC.

pw.dot.txt

Playing with "by pass" button does not solve the problem.

I had to relaunch VLC to get again sound.

@wwmm
Copy link
Owner

wwmm commented Sep 18, 2022

I wonder if PipeWire 0.3.58 will have any effect on this bug. At least another one whose source was unknown https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2617 seems to have been unintentionally fixed by the new release.

@LebedevRI
Copy link
Contributor

I wonder if PipeWire 0.3.58 will have any effect on this bug.

I'll report back after statistically-significant time frame.

@LebedevRI
Copy link
Contributor

I wonder if PipeWire 0.3.58 will have any effect on this bug.

I'll report back after statistically-significant time frame.

Just had the "left channel is somehow random noise, right channel is good." case again. So nothing changed basically.

@MrAureliusR
Copy link

I am having a somewhat similar issue; I didn't want to create a new issue in case this is the same bug.
I'm on Arch Linux, running KDE Plasma 5.25.5 using Pipewire 0.3.58 and Easyeffects 6.3.0-1.
For ages, I've had no issues with EasyEffects. I use it both with the built-in speakers on my laptop, and with my Bluetooth JBL speaker. However, in the last few weeks (I should have noted exactly when but I didn't think of it) if EasyEffects is running, and I try to start an audio stream from any application, the audio stream is unable to start and the application hangs until I move the volume slider in the system tray. Then all of a sudden the program (YouTube in Firefox, VLC, Strawberry, whatever) will suddenly start playing and as long as the audio continues, it keeps playing fine.
However, if the audio stops again for any reason (next track in a playlist, buffering, etc) the stream will once again get "hung" until I move the volume slider. The volume slider fix was something I discovered accidentally when trying to figure out what was going on. I don't see anything in dmesg. EasyEffects is installed as a system package from pacman, not as a Flatpak.
Looking in various log files, I can't immediately see anything that occurs at the same time as this problem, but I may not be looking in the right places. Checked journalctl for pipewire and pipewire-pulse. I occasionally see some things from easyeffects also but they seem to be related to GTK errors when drawing the interface so likely unrelated.

@wwmm
Copy link
Owner

wwmm commented Sep 28, 2022

if EasyEffects is running, and I try to start an audio stream from any application, the audio stream is unable to start and the application hangs until I move the volume slider in the system tray.

If this is easy to reproduce you are probably seeing a different kind of problem. The bug in this issue is so random that it never happens when I need it to happen.

@promeneur
Copy link
Author

promeneur commented Oct 3, 2022

After having a problem with the mic (see my previous comment 19 days before.) in EE settings, I disabled the input stream process.
Yesterday during a video talk with Skype again, no more mic.
My conclusion is the problem does not come from EE, but comes from pipewire. What do you think?
Then I enabled the input stream process, then I get a working mic.

@wwmm
Copy link
Owner

wwmm commented Oct 3, 2022

My conclusion is the problem does not come from EE, but comes from pipewire. What do you think?

It is the only explanation I can think of. In the issue I opened at the PipeWire's page I asked if some kind of special procedure was needed when creating/destroying links based on when the players streams enter/exit the playing state. The answer was that things should work out of the box. No delays or special procedures required. So as far as I can see I am doing nothing wrong.

@LebedevRI
Copy link
Contributor

Still happening with pipewire 0.3.59, wireplumber 0.4.11, easyeffects 6.3.0.

@nargacu83
Copy link

I had the same problem and was using wireplumber. I tried to switch to pipewire-media-session, the problem still happened.

The method i used to test was playing a video with Freetube (should be the same with firefox) and have pavucontrol opened on the side to see when the output of the app disappear and when it disappears unpause the video.

It seems like the microphone input works fine while this issue is happening, it appears to be only happening on the ouputs.

Replacing easyeffects with the Flatpak seems to have fixed the issue.

@promeneur
Copy link
Author

So now what is the difference between the flatpack version and the openSUSE Tumbleweed version for example ?

@nargacu83
Copy link

So now what is the difference between the flatpack version and the openSUSE Tumbleweed version for example ?

The flatpak version is using it's own dependencies and not the system ones.

I'm surprised to have this issue because i'm on Arch Linux like @wwmm and a friend a mine. Both of them doesn't seem to have the issue.

@promeneur
Copy link
Author

The flatpak version is using it's own dependencies and not the system ones.

It's nos sufficient to say this. The question is where is the bug.

For example, openSUSE okular get a bug and not the flatpack version supplied by KDE team.
With their help we found that openSUSE okular uses a bad font which leads to a bug.
We must inquire with the help of EE team.

@wwmm
Copy link
Owner

wwmm commented Oct 24, 2022

I'm surprised to have this issue because i'm on Arch Linux like @wwmm and a friend a mine. Both of them doesn't seem to have the issue.

This lack of sound is super random and hard to reproduce. I still haven't found a way to make it happen when I want. It is always the same thing. After several hours without issue out of nowhere there is no sound after starting a new stream. I think that of all the software bugs I have ever seen in my life this one is the hardest to figure out. I have absolutely no idea about why it is even happening.

@nargacu83
Copy link

nargacu83 commented Oct 25, 2022

It's nos sufficient to say this. The question is where is the bug.

For example, openSUSE okular get a bug and not the flatpack version supplied by KDE team. With their help we found that openSUSE okular uses a bad font which leads to a bug. We must inquire with the help of EE team.

Yeah sorry about that, i actually don't know what versions of packages it's using. I don't think it really matters because i actually encountered the same issue on the Flatpak version.

This random lack of sound is super random and hard to reproduce. I still haven't found a way to make it happen when I want. It is always the same thing. After several hours without issue out of nowhere there is no sound after starting a new stream. I think that of all the software bugs I have ever seen in my life this one is the hardest to figure out. I have absolutely no idea about why it is even happening.

Agreed 100%, this is really annoying and hard to reproduce. Like you said, sometimes it will not happen at all for hours and sometimes it will happen every time you pause a stream.

I don't know if it's related, it seems to appear when i had the issue happening every time i did a quick journalctl command to check what's happening.

This is the output for journalctl --user -b -u pipewire:

systemd[948]: Started PipeWire Multimedia Service.
pipewire[1031]: mod.rt: Can't find xdg-portal: (null)
pipewire[1031]: mod.rt: found session bus but no portal
pipewire[1031]: spa.audioadapter: 0x55c38a1d8518: scheduling stopped node
pipewire[1031]: spa.audioadapter: 0x55c38a1d8518: scheduling stopped node
pipewire[1031]: spa.audioadapter: 0x55c38a1d8518: scheduling stopped node

This is for journalctl --user -b -u pipewire-media-session:

systemd[948]: Started PipeWire Media Session Manager.
pipewire-media-session[1043]: mod.rt: Can't find xdg-portal: (null)
pipewire-media-session[1043]: mod.rt: found session bus but no portal
pipewire-media-session[1043]: dbus[1043]: Attempted to unregister path (path[0] = MediaEndpoint path[1] = A2DPSink) which isn't registered
pipewire-media-session[1043]: dbus[1043]: Attempted to unregister path (path[0] = MediaEndpoint path[1] = A2DPSink) which isn't registered
pipewire-media-session[1043]: dbus[1043]: Attempted to unregister path (path[0] = MediaEndpoint path[1] = A2DPSink) which isn't registered
etc...

@nargacu83
Copy link

nargacu83 commented Oct 26, 2022

Alright, i've been running easyeffects with this command: G_MESSAGES_DEBUG=easyeffects easyeffects --gapplication-service.

Here's the last few lines:

(easyeffects:25999): easyeffects-DEBUG: 14:53:31.907: 	pipe_manager.cpp:1189	Chromium port 110 is connected to easyeffects_sink port 58
(easyeffects:25999): easyeffects-DEBUG: 14:53:31.907: 	pipe_manager.cpp:1189	Chromium port 102 is connected to easyeffects_sink port 96
(easyeffects:25999): easyeffects-DEBUG: 14:53:31.908: 	stream_output_effects.cpp:156	At least one app linked to our device wants to play. Linking our filters.
(easyeffects:25999): easyeffects-DEBUG: 14:54:09.501: 	pipe_manager.cpp:212	Stream/Output/Audio 114 Chromium has been removed

When the issue happened, no new messages appeared. Only when the stream i paused was paused long enough to be removed. Started the stream again and it was working.

I was thinking it might be related on how easyeffects removes streams references or something?

I also ran the same command without --gapplication-service yesterday and i did not encounter the issue at all. Could it also be related to the running in the background thing?

@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

@DanMan
Copy link

DanMan commented Dec 13, 2022

videos not playing is definitely caused by some flaw on PipeWire's side

Certainly possible, but I can reliably prevent all issues by simply not launching EE. So it appears to be something about how they interact.

@wwmm
Copy link
Owner

wwmm commented Dec 13, 2022

Certainly possible, but I can reliably prevent all issues by simply not launching EE. So it appears to be something about how they interact.

There isn't much to be done. We just load the filters and link them on demand based on whether there are audio players active or not. Once the links are made everything is done by pipewire. We do not even have a way to pause the pipeline for example. It is all handled internally by pipewire.

Compared to not using easyeffects the main difference is that the audio player is linked to a null-sink that we create using a pipewire module. So again pipewire's code.

@LebedevRI
Copy link
Contributor

"No audio in one of the channels" is still happening with

ii  wireplumber                                      0.4.13-1                                                     amd64        modular session / policy manager for PipeWire

Will get the debug logs next time ithappens...

@wwmm
Copy link
Owner

wwmm commented Dec 15, 2022

No audio in one of the channels" is still happening with

So as suspected by one of PipeWire developers the wireplumber patch is fixing another problem. That is unfortunate but it makes some sense. I think that in the wireplumber issue the player was not being liked to the sink. This is not what happens here. All the links are made and are active. But somehow there is no sound.

@LebedevRI
Copy link
Contributor

Observation: this seems to reliable happen when there is an audio playback (a chrome tab with youtube),
that you pause, don't close the tab, and resume some time later, like 10+ minutes later.

@LebedevRI
Copy link
Contributor

pw-dump.txt
pw.dot.txt

@wwmm
Copy link
Owner

wwmm commented Dec 23, 2022

pw-dump.txt pw.dot.txt

As usual all the links are there and according to pw-dot in the active state. Nothing seems to have changed =/.

@DanMan
Copy link

DanMan commented Dec 24, 2022

Observation: this seems to reliable happen when there is an audio playback (a chrome tab with youtube), that you pause, don't close the tab, and resume some time later, like 10+ minutes later.

It's more like 10s for me. Pause video, wait maybe 10-15s until the stream disappears from the EE outputs tab, resume video: video's frozen again and the YT buffering animation starts playing. The stream in EE comes up inactive and re-enabling it makes the video run again.

@wwmm
Copy link
Owner

wwmm commented Dec 30, 2022

I think that this problem got worse in the latest pipewire release because after months without seeing it now I notice it frequently while playing Monster Hunter Rise. In one of the occasions I saw this in pw-dot output
Screenshot from 2022-12-30 11-05-32
Some links were stuck in the paused state while others were in the init state. I attached this image in the issue I have opened at PipeWire's page. If this will give them any idea about what may be going on it is hard to say. But it is clear to me something is going really wrong inside PipeWire when links are made "in a bad moment".

@LebedevRI
Copy link
Contributor

I think i haven't encountered this issue in last few weeks;
while it was quite random, it used to be somewhat frequent.
(pipewire 0.3.65-2, wireplumber 0.4.13-1, easyeffects 7.0.0-1)

@LebedevRI
Copy link
Contributor

Another month flew by. No new occurrences.
I think it might be somehow gone for the moment.

@wwmm
Copy link
Owner

wwmm commented Mar 15, 2023

Another month flew by. No new occurrences.
I think it might be somehow gone for the moment.

I also haven't seen it for a long time. But I will keep monitoring it for more time.

@delfianto
Copy link

I think that this problem got worse in the latest pipewire release because after months without seeing it now I notice it frequently while playing Monster Hunter Rise. In one of the occasions I saw this in pw-dot output Screenshot from 2022-12-30 11-05-32 Some links were stuck in the paused state while others were in the init state. I attached this image in the issue I have opened at PipeWire's page. If this will give them any idea about what may be going on it is hard to say. But it is clear to me something is going really wrong inside PipeWire when links are made "in a bad moment".

Btw I just experience this in the past few days, fresh EndeavourOS installation

  • pipewire 0.3.67
  • wireplumber 0.4.14
  • easyeffects 7.0.1

Sometimes the links are stuck in init state after simply playing a video in youtube (google chrome) and pausing or stopping it. The occurrence is really random and still have no idea on what is wrong.

Restarting easyeffects with /usr/bin/easyeffects --gapplication-service temporarily alleviates the issue but it will happen again after sometime.

@wwmm
Copy link
Owner

wwmm commented Mar 15, 2023

Sometimes the links are stuck in init state after simply playing a video in youtube (google chrome) and pausing or stopping it. The occurrence is really random and still have no idea on what is wrong.

So the bug is just harder to reproduce on some setups. I guess things are getting better but PipeWire definitely still has some weird link management problem.

@wwmm
Copy link
Owner

wwmm commented Apr 6, 2023

The latest release 7.0.2 has the fixes for some misuses of the PipeWire's API #2228 #2246 we were doing on our side. Maybe they will help to fix this one too.

@lilydjwg
Copy link

lilydjwg commented Apr 9, 2023

I can still reproduce this (if what happened to me is indeed this issue).

@wwmm
Copy link
Owner

wwmm commented May 12, 2023

I think we can close this issue. Similar problems probably have a different origin. The corresponding issue at PipeWire's page have also been closed.

@wwmm wwmm closed this as completed May 12, 2023
@pinkflames
Copy link

@lilydjwg : are you sure it's the same issue and that you have a fixed EasyEffects version? Please note that this almost exclusively and most obviously affects the right channel, because it was processed later. If you always lose all channels, that may be a different issue and not even related to EasyEffects at all (or EE could only be acting as the trigger due to extra processing and possibly latency).

@DanMan
Copy link

DanMan commented May 12, 2023

FWIW: I haven't had this/my issue in a while now.

@lilydjwg
Copy link

@pinkflames oh, I lost both channels so that should be another issue, and recently I'm not paying a close eye to EE's issues but instead try to restart EE, reconnect the speaker, or pause and play. At least sometimes it's the speaker's fault.

@pinkflames
Copy link

pinkflames commented May 12, 2023

To be clear, it's not impossible for the issue to affect both channels sometimes. It's just that more often it only broke the right channel, because the link for it would get activated after the left channel's link and there were race conditions around that. If you only see this affect all or no channels, then it's probably something else.

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