[Solved] Flash player audio distortion

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read this

[Solved] Flash player audio distortion

Postby Dr.m0x on Fri May 20, 2011 6:20 pm

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 Dr.m0x on Mon Jul 18, 2011 5:32 am, edited 3 times in total.
Image
User avatar
Dr.m0x
Level 3
Level 3
 
Posts: 117
Joined: Thu Nov 25, 2010 4:12 am

Linux Mint is funded by ads and donations.
 

Re: Flash player audio distortion

Postby karashata on Sat May 21, 2011 2:06 pm

I'm experiencing this problem as well, sadly I have no idea what's the cause or how to fix it.
Linux Mint user since 2010, fluffy dragon forever!
Registered Linux User #473695
Image
User avatar
karashata
Level 4
Level 4
 
Posts: 441
Joined: Tue May 10, 2011 2:53 pm
Location: Stratford, Ontario, Canada

Re: Flash player audio distortion

Postby autocrosser on Sat May 21, 2011 3:21 pm

Here is the "fix"--start looking at the post by the Great Sudoku.... viewtopic.php?f=141&t=70230&start=100

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

Mod the information to your needs........
"Let's nobody be dead today----Looks very bad on my report" One of my favorite lines from AVATAR :)
Linux User# 395230
User avatar
autocrosser
Level 4
Level 4
 
Posts: 421
Joined: Tue Dec 28, 2010 5:00 pm
Location: Eagle Point, Oregon

Re: Flash player audio distortion

Postby scottlinux on Sun May 22, 2011 3:15 pm

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! :)
scottlinux
Level 1
Level 1
 
Posts: 27
Joined: Sun May 15, 2011 12:00 am

Re: Flash player audio distortion

Postby jack.herbert on Sun May 22, 2011 3:56 pm

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.
The light at the end of the tunnel is just the light of an oncoming train.
Robert Lowell
User avatar
jack.herbert
Level 1
Level 1
 
Posts: 40
Joined: Sun Jun 28, 2009 5:25 pm

Re: Re: Flash player audio distortion

Postby Dr.m0x on Mon May 23, 2011 2:21 am

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.
Image
User avatar
Dr.m0x
Level 3
Level 3
 
Posts: 117
Joined: Thu Nov 25, 2010 4:12 am

Re: [Solved] Flash player audio distortion

Postby hozomean on Mon Jun 06, 2011 3:10 pm

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.
hozomean
Level 1
Level 1
 
Posts: 32
Joined: Mon Jun 06, 2011 2:06 pm

Re: [Solved] Flash player audio distortion

Postby karashata on Mon Jun 06, 2011 4:59 pm

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.
Linux Mint user since 2010, fluffy dragon forever!
Registered Linux User #473695
Image
User avatar
karashata
Level 4
Level 4
 
Posts: 441
Joined: Tue May 10, 2011 2:53 pm
Location: Stratford, Ontario, Canada

Re: [Solved] Flash player audio distortion

Postby Crummosh on Mon Jun 06, 2011 5:16 pm

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
Crummosh
Level 1
Level 1
 
Posts: 1
Joined: Mon Jun 06, 2011 5:13 pm

Re: [Solved] Flash player audio distortion

Postby karashata on Mon Jun 06, 2011 7:20 pm

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.
Linux Mint user since 2010, fluffy dragon forever!
Registered Linux User #473695
Image
User avatar
karashata
Level 4
Level 4
 
Posts: 441
Joined: Tue May 10, 2011 2:53 pm
Location: Stratford, Ontario, Canada

Re: [Solved] Flash player audio distortion

Postby hozomean on Mon Jun 06, 2011 7:22 pm

karashata: cool, let me know how it works for you.
hozomean
Level 1
Level 1
 
Posts: 32
Joined: Mon Jun 06, 2011 2:06 pm

Re: [Solved] Flash player audio distortion

Postby karashata on Mon Jun 06, 2011 7:33 pm

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.
Linux Mint user since 2010, fluffy dragon forever!
Registered Linux User #473695
Image
User avatar
karashata
Level 4
Level 4
 
Posts: 441
Joined: Tue May 10, 2011 2:53 pm
Location: Stratford, Ontario, Canada

Re: [Solved] Flash player audio distortion

Postby hozomean on Mon Jun 06, 2011 7:35 pm

Great! Glad we got another possible location for the file up here.
hozomean
Level 1
Level 1
 
Posts: 32
Joined: Mon Jun 06, 2011 2:06 pm

Re: Re: [Solved] Flash player audio distortion

Postby Dr.m0x on Thu Jun 09, 2011 12:51 am

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.
Image
User avatar
Dr.m0x
Level 3
Level 3
 
Posts: 117
Joined: Thu Nov 25, 2010 4:12 am

Re: [Solved] Flash player audio distortion

Postby bedo2991 on Thu Jun 09, 2011 4:03 am

The solution number 1 worked perfectly! Thank you! :wink:
User avatar
bedo2991
Level 1
Level 1
 
Posts: 16
Joined: Sat Jul 03, 2010 5:29 am

Re: [Solved] Flash player audio distortion

Postby Dr.m0x on Mon Jun 20, 2011 1:38 am

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.
Image
User avatar
Dr.m0x
Level 3
Level 3
 
Posts: 117
Joined: Thu Nov 25, 2010 4:12 am

Re: Flash player audio distortion

Postby hozomean on Mon Jun 20, 2011 3:19 pm

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.
hozomean
Level 1
Level 1
 
Posts: 32
Joined: Mon Jun 06, 2011 2:06 pm

Re: Flash player audio distortion

Postby lqdc on Thu Jun 23, 2011 1:45 am

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?
lqdc
Level 1
Level 1
 
Posts: 6
Joined: Wed Jun 15, 2011 5:10 pm

Re: Flash player audio distortion

Postby xircon on Thu Jun 23, 2011 5:42 am

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
Dell Inspiron N5010 / Core I5 / ATI Mobility Radeon HD5400, LMDE Tracking Sid & Cinnamon Desktop
"Ubuntu is an African word meaning 'I can't configure Debian'"
User avatar
xircon
Level 5
Level 5
 
Posts: 775
Joined: Sun Aug 01, 2010 7:59 am
Location: Sheffield, UK

Re: Re: Flash player audio distortion

Postby Dr.m0x on Fri Jun 24, 2011 4:10 am

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.
Image
User avatar
Dr.m0x
Level 3
Level 3
 
Posts: 117
Joined: Thu Nov 25, 2010 4:12 am

Linux Mint is funded by ads and donations.
 
Next

Return to Sound, Multimedia & Codecs

Who is online

Users browsing this forum: No registered users and 1 guest