[Solved] Flash player audio distortion

Archived topics about LMDE 1 and LMDE 2
Dr.m0x

[Solved] Flash player audio distortion

Post by Dr.m0x »

I am getting some horrible sound distortion in the flash player in lmde 64 bit with all updates. My nature videos are currently unwatchable because of this. It doesn't occur in all flash video streams, and is a lmde problem and not my nature websites as they work ok in mint 11.

Anyone have any ideas what I can try to fix it?

---
Sent from my Leedroid Gingerbread love machine.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
karashata

Re: Flash player audio distortion

Post by karashata »

I'm experiencing this problem as well, sadly I have no idea what's the cause or how to fix it.
autocrosser

Re: Flash player audio distortion

Post by autocrosser »

Here is the "fix"--start looking at the post by the Great Sudoku.... http://forums.linuxmint.com/viewtopic.p ... &start=100

also: http://earth.rockinthebury.com/?p=104

Mod the information to your needs........
scottlinux

Re: Flash player audio distortion

Post by scottlinux »

https://bugs.adobe.com/jira/secure/IssueNavigator.jspa

Browsing the adobe online bug reporter (FlashPlayer / Bug / query 'audio') it appears Adobe is hostile towards supporting 64bit anything right now, even though the 64bit Linux plugin is provided as an available download.

The tl;dr of what many adobe bug reports suggest say it's a graphics card driver issue, which from the above links shows that is not the case, but rather a problem with flash player. bah! :)
jack.herbert

Re: Flash player audio distortion

Post by jack.herbert »

I had the same sound issue on LMDE x64 with Firefox4 x64 and Opera, but not Chromium. Go figure
Cheers for the links. It all seems a bit complicated so I just
downloaded the 32bit version of flash http://get.adobe.com/flashplayer/,
extracted libflashplayer.so into /usr/lib/mozilla/plugins (being root and all)
Now the sound is okay.
Dr.m0x

Re: Re: Flash player audio distortion

Post by Dr.m0x »

jack.herbert wrote:I had the same sound issue on LMDE x64 with Firefox4 x64 and Opera, but not Chromium. Go figure
Cheers for the links. It all seems a bit complicated so I just
downloaded the 32bit version of flash http://get.adobe.com/flashplayer/,
extracted libflashplayer.so into /usr/lib/mozilla/plugins (being root and all)
Now the sound is okay.
Thanks for an easy and effective solution. I even resorted to using mint 11 rc the last few days as flash is ok on that. Forgot how much Ubuntu annoys me though and this release is just as buggy as usual. That's a different topic though.
Good to be able to switch back to my lmde partition again.

---
Sent from my Leedroid Gingerbread love machine.
hozomean

Re: [Solved] Flash player audio distortion

Post by hozomean »

Here is a short summary of my adventures with flash on XFCE LMDE 64bit (though I'm certain this is not specific to the XFCE version, but to all debian 64bit systems):

First of all, there are multiple flash players in the repos. For this fix, I am using mint-flashplugin-x64.

With all of the 64bit versions of the flash plugin, including the "Square" version downloaded from adobe, I get incredibly annoying distortion on 90% of flash websites I go to.

I was able to use the solution of downloading the 32-bit version and installing it using nspluginwrapper. However, with this solution flash does not play nicely with pulseaudio, which means if you're listening to music and simultaneously try to visit a youtube video, flash will not have any audio until you kill any other app using the soundcard.

Ultimately I discovered via this post on the debian forums which basically says that there was a change to eglibc that modifies how a memcpy() call works that only affects amd64, which evidently flash is affected by. So, until flash is updated, I have 2 (relatively) painless fixes that make flash audio work without distortion and let it coexist peacefully with other audio apps.

The first is easier, but could potentially affect other apps on the system (though from my understanding of what I've read these effects would be positive in that it would fix memory issues in other apps that use that call improperly). The second solution won't survive updates, but will only apply to the browsers. They are respectively labeled 1 and 2 below.

1. edit /etc/ld.so.preload as root (this file does not exist on a stock version of LMDE). add this single line:
/usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so

This will apply the patch system-wide.

2. Each web browser on your system is started by a bash script of the same name in /usr/bin (if you don't know what this means, fear not). You can add environment variables to these bash scripts like defining exactly this type of library preload. so if you edit, say, /usr/bin/firefox as root (or via sudo), you just need to add a line like this:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so

toward the top of the file (the export probably isn't necessary in all cases, but just in case). I've tested this with iceweasel, firefox, opera, and chromium. All now produce flawless sound and the flashplayer can play at the same time as other apps if you've setup pulseaudio to do so.

Hope this helps people to not have to go through all the potential fixes I did!
Last edited by hozomean on Sun Jul 03, 2011 12:39 pm, edited 2 times in total.
karashata

Re: [Solved] Flash player audio distortion

Post by karashata »

Thanks for that informative post, I look forward to testing it out in the near future to see how it performs for me. I'm looking forward to good things.
Crummosh

Re: [Solved] Flash player audio distortion

Post by Crummosh »

hozomean wrote:
2. Each web browser on your system is started by a bash script of the same name in /usr/bin (if you don't know what this means, fear not). You can add environment variables to these bash scripts like defining exactly this type of library preload. so if you edit, say, /usr/bin/firefox as root (or via sudo), you just need to add a line like this:

LD_PRELOAD=/usr/lib/libc/memcpy-preload.so

toward the top of the file. I've tested this with iceweasel, firefox, opera, and chromium. All now produce flawless sound and the flashplayer can play at the same time as other apps if you've setup pulseaudio to do so.

Hope this helps people to not have to go through all the potential fixes I did!
Thanks! This works.

For google chrome edit the file /opt/google/chrome/google-chrome
karashata

Re: [Solved] Flash player audio distortion

Post by karashata »

I tried creating etc/ld.so.preload with /usr/lib/libc/memcpy-preload.so in the file, however it didn't work. Further inspection shows that said file doesn't seem to exist on my system (nor does a folder named libc exist at all in /usr/lib/, apparently). Would someone please tell me which package needs to be installed in order to have this file present on my system, so that I may be able to use it to fix the Flash audio issues (and any other possible related issues...)?

EDIT: I found it in a completely different location: /usr/lib64/x86_64-linux-gnu/libc/memcpy-preload.so

I'll try using that and seeing how it performs.
hozomean

Re: [Solved] Flash player audio distortion

Post by hozomean »

karashata: cool, let me know how it works for you.
karashata

Re: [Solved] Flash player audio distortion

Post by karashata »

It's up-to-date on sid and experimental excluding a few packages that are either missing dependencies or try to remove other programs I prefer to keep installed. I'm also running GNOME 3, though I doubt that would be an issue.

Either way, the file I found with the same name in a completely different location than the one specified in the thread is apparently still the same file and still works fine, so I'm good.
hozomean

Re: [Solved] Flash player audio distortion

Post by hozomean »

Great! Glad we got another possible location for the file up here.
Dr.m0x

Re: Re: [Solved] Flash player audio distortion

Post by Dr.m0x »

hozomean wrote:Here is a short summary of my adventures with flash on XFCE LMDE 64bit (though I'm certain this is not specific to the XFCE version, but to all debian 64bit systems):

First of all, there are multiple flash players in the repos. For this fix, I am using mint-flashplugin-x64.

With all of the 64bit versions of the flash plugin, including the "Square" version downloaded from adobe, I get incredibly annoying distortion on 90% of flash websites I go to.

I was able to use the solution of downloading the 32-bit version and installing it using nspluginwrapper. However, with this solution flash does not play nicely with pulseaudio, which means if you're listening to music and simultaneously try to visit a youtube video, flash will not have any audio until you kill any other app using the soundcard.

Ultimately I discovered via this post on the debian forums which basically says that there was a change to eglibc that modifies how a memcpy() call works that only affects amd64, which evidently flash is affected by. So, until flash is updated, I have 2 (relatively) painless fixes that make flash audio work without distortion and let it coexist peacefully with other audio apps.

The first is easier, but could potentially affect other apps on the system (though from my understanding of what I've read these affects would be positive in that it would fix memory issues in other apps that use that call improperly). The second solution won't survive updates, but will only apply to the browsers. They are respectively labeled 1 and 2 below.

1. edit /etc/ld.so.preload as root (this file does not exist on a stock version of LMDE). add this single line:

/usr/lib/libc/memcpy-preload.so

This will apply the patch system-wide.

2. Each web browser on your system is started by a bash script of the same name in /usr/bin (if you don't know what this means, fear not). You can add environment variables to these bash scripts like defining exactly this type of library preload. so if you edit, say, /usr/bin/firefox as root (or via sudo), you just need to add a line like this:

export LD_PRELOAD=/usr/lib/libc/memcpy-preload.so

toward the top of the file (the export probably isn't necessary in all cases, but just in case). I've tested this with iceweasel, firefox, opera, and chromium. All now produce flawless sound and the flashplayer can play at the same time as other apps if you've setup pulseaudio to do so.

Hope this helps people to not have to go through all the potential fixes I did!
Method 2 did not appear to work for me. Method 1 was perfect and I've noticed no side effects so far.

Thanks for sharing.

---
Sent from my Leedroid Gingerbread love machine.
bedo2991

Re: [Solved] Flash player audio distortion

Post by bedo2991 »

The solution number 1 worked perfectly! Thank you! :wink:
Dr.m0x

Re: [Solved] Flash player audio distortion

Post by Dr.m0x »

Ok changed thread status to not solved again as I have recently discovered a couple of websites where the flash player doesn't work at all. This is using method one.

If I use 32 bit flash with the wrapper these same sites get a problem with visual distortion (white boxes moving randomly within the playback box).

Also method one will break adb (the android debugging bridge) - android hackers will know what I'm talking about.

So I'm looking again for a new solution ... though I may just have to wait until flash itself gets updated, sadly.

---
Sent by Cyanogenmod 7.
hozomean

Re: Flash player audio distortion

Post by hozomean »

Dr.m0x:

Can you post the sites that don't work with the memcopy preload? I'd like to see if i can track down what's different. I haven't done any android hacking on LMDE yet (only 3 weeks in to my LMDE experience) but I will see if I can track anything down on that issue as well. Thanks.
lqdc

Re: Flash player audio distortion

Post by lqdc »

After I did this fix, sound worked for a few minutes, then started fading out. Now the sound is not choppy but fades out pretty quickly for unknown reasons. Anybody else has this problem?
xircon

Re: Flash player audio distortion

Post by xircon »

This mornings update killed fix one (for me at least). But if you change /etc/ld.so.preload to read:

Code: Select all

/usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so
It works again.

Cheers

Steve
Dr.m0x

Re: Re: Flash player audio distortion

Post by Dr.m0x »

hozomean wrote:Dr.m0x:

Can you post the sites that don't work with the memcopy preload? I'd like to see if i can track down what's different. I haven't done any android hacking on LMDE yet (only 3 weeks in to my LMDE experience) but I will see if I can track anything down on that issue as well. Thanks.
I'd rather not. At least one of them is not family friendly.

---
Sent by Cyanogenmod 7.
Locked

Return to “LMDE Archive”