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

Sound flickering when adjusting volume with external monitor connected #3289

Open
jeffshee opened this issue Aug 7, 2024 · 9 comments
Open

Comments

@jeffshee
Copy link

jeffshee commented Aug 7, 2024

EasyEffects Version

7.1.7

What package are you using?

Flatpak (Flathub)

Distribution

Fedora 39

Describe the bug

The sound flickers when adjusting the system audio volume (using either the keyboard buttons or the volume slider in system settings) if an external monitor with speakers is connected.

This issue only occurs while changing the volume and does not happen at other times. It also doesn’t happen when there’s no external monitor connected.

Expected Behavior

There should be no sound flickering issue.

Debug Log

debug-log.txt

Additional Information

The debug log and the screen recording of the pipewire patchbay are attached. These are all captured during the moment when the sound flickering issue occurred.
https://github.com/user-attachments/assets/066b1c98-fecb-4493-a7c3-ed356034e29a

A similar issue of jdsp4linux is also reported here:
Audio4Linux/JDSP4Linux#203

@wwmm
Copy link
Owner

wwmm commented Aug 7, 2024

This may be related to PipeWire's dynamic latency switching. Try to set a temporary fixed quantum value https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Guide-Latency like 1024 or 2048. On my systems I do not have problems with the dynamic latency switching. But for some reason I am not aware of not every system handles the dynamic latency well.

@jeffshee
Copy link
Author

jeffshee commented Aug 8, 2024

Thanks for the reply!
I tried both pw-metadata -n settings 0 clock.force-quantum 1024 and pw-metadata -n settings 0 clock.force-quantum 2048, but it doesn't solve the problem.

It also doesn’t happen when there’s no external monitor connected.

Also, I noticed that the issue will persist even after the external monitor is disconnected. Relogin will temporarily fix the issue until the external monitor is connected again.

@jeffshee
Copy link
Author

jeffshee commented Aug 8, 2024

The system is ThinkPad P14s Gen 4 (Intel).

Also, changing the audio volume too fast will crash the Easy Effects, much worse than the sound flickering issue. ><

@wwmm
Copy link
Owner

wwmm commented Aug 8, 2024

Also, changing the audio volume too fast will crash the Easy Effects, much worse than the sound flickering issue. ><

Is there something related to EasyEffects in the output of sudo coredumpctl info right after the crash? Sometimes it is not the app crashing but the system killing it for some reason.

@jeffshee
Copy link
Author

jeffshee commented Aug 10, 2024

Sorry, after double confirming with sudo coredumpctl info, it's not crashing. But it will make the EasyEffects GUI unresponsive.
image

EDIT:
It does sometimes segfault when plug/unplug earphones while leaving the EasyEffects GUI open. (This seems another issue to me though.)

❯ sudo coredumpctl info
           PID: 69431 (easyeffects)
           UID: 1000 (jeffshee)
           GID: 1000 (jeffshee)
        Signal: 11 (SEGV)
     Timestamp: Sat 2024-08-10 14:47:54 JST (1min 19s ago)
  Command Line: /app/bin/easyeffects --gapplication-service
    Executable: /app/bin/easyeffects
 Control Group: /user.slice/user-1000.slice/[email protected]/app.slice/app-flatpak-com.github.wwmm.easyeffects-69406.scope
          Unit: [email protected]
     User Unit: app-flatpak-com.github.wwmm.easyeffects-69406.scope
         Slice: user-1000.slice
     Owner UID: 1000 (jeffshee)
       Boot ID: 09b80395b5204c7faa15a95da3eb5e49
    Machine ID: c73f117fd71942cf945302e6eb4c8499
      Hostname: nymph
       Storage: /var/lib/systemd/coredump/core.easyeffects.1000.09b80395b5204c7faa15a95da3eb5e49.69431.1723268874000000.zst (present)
  Size on Disk: 14.5M
       Message: Process 69431 (easyeffects) of user 1000 dumped core.
                
                Stack trace of thread 2:
                #0  0x0000559236cf5bcd n/a (/app/bin/easyeffects + 0xb8bcd)
                #1  0x0000559236d2ee5e n/a (/app/bin/easyeffects + 0xf1e5e)
                #2  0x00005592370d31dd n/a (/app/bin/easyeffects + 0x4961dd)
                #3  0x00007f6d5d60b697 n/a (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8000.4 + 0x60697)
                #4  0x00007f6d5d60d7b7 n/a (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8000.4 + 0x627b7)
                #5  0x00007f6d5d60de73 n/a (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8000.4 + 0x62e73)
                #6  0x00007f6d5c70114d n/a (/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.8000.4 + 0xf814d)
                #7  0x0000559236ca6bd0 n/a (/app/bin/easyeffects + 0x69bd0)
                #8  0x00007f6d5b14208a n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2808a)
                #9  0x00007f6d5b14214b n/a (/usr/lib/x86_64-linux-gnu/libc.so.6 + 0x2814b)
                #10 0x0000559236ca8255 n/a (/app/bin/easyeffects + 0x6b255)
                ELF object binary architecture: AMD x86-64

coredump.zip

@jeffshee
Copy link
Author

The longer you keep changing the audio volume, the longer the sound flickering issue persists. If you do that long enough, it will need a long time to recover.

@jeffshee
Copy link
Author

It seems to be caused by preset autoloading, if I remove all of them the issue is gone.
image

@wwmm
Copy link
Owner

wwmm commented Aug 10, 2024

It does sometimes segfault when plug/unplug earphones while leaving the EasyEffects GUI open. (This seems another issue to me though.)

Ok. Now I remembered that something different has to be done to analyze coredumps in a Flatpak installation https://github.com/wwmm/easyeffects/wiki/Reporting-Bugs#with-flatpak. Maybe this will give a more precise information

It seems to be caused by preset autoloading, if I remove all of them the issue is gone.

If the autoloading is being repeatedly triggered then it is because PipeWire is constantly recreating the device that triggers the profile. This could explain why you only see the problem if your external monitor is connected. The question is if it is a bug in PipeWire or the hardware misbehaving for some reason. Maybe a bad cable?

@violetmage
Copy link
Contributor

violetmage commented Aug 26, 2024

Are you using the proprietary nvidia drivers? It looks like from your screenshot that the sound is going out to your speaker via HDMI.

Does the flickering still happen if you set your output device to be the internal speakers, even with the external monitor connected?

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

3 participants