[Solved] Flash player audio distortion

Archived topics about LMDE 1 and LMDE 2
rdonnelly
Level 5
Level 5
Posts: 528
Joined: Thu Nov 27, 2008 9:38 pm

Re: Flash player audio distortion

Post by rdonnelly »

All right! Method one fixed it for me as well. Installing the 32 bit flash did not work, starting the browser with the Cli command was kind of screwy and asked if I wanted FF to be set as default, even though it already is?
Using Mint since 2008
*Mint 18.2 KDE
*ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
*AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
*G.SKILL Ripjaws X Series 16GB DDR3 SDRAM
*nVIDIA GEFORCE GT 610 2GB
day-vid

Re: Flash player audio distortion

Post by day-vid »

On LMDE x64, Fix 1 worked for me, but while attempting the major upgrade of June 22 a libpam error stalled the upgrade itself. I removed the line from the /etc/ld.so.preload file and the upgrade proceeded flawlessly. I then had to follow xircon's advice above in order to restore proper sound.

thanks for the helpful posts!
jonas.bardino

Re: Flash player audio distortion

Post by jonas.bardino »

Thanks for sharing the solutions!

This looks like a flash specific bug to me, so I would rather use the second solution of only using the workaround in the browser until a fixed flash version is released.
I made a simple shell script to do just that:

Code: Select all

#!/bin/bash
#
# Simple wrapper to fix problems with distorted/crackling/choppy sound when
# playing flash clips with flash plugin from a browser.
# You can test with e.g. the myspace player by running
# /path/to/this/script firefox http://www.myspace.com/igotyouontape
# and chosing one of the play buttons

# Original location
MEMCPYWRAP='/usr/lib/libc/memcpy-preload.so'
# New location
MEMCPYWRAPARCH='/usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so'
# Try each wrapper location in turn and warn user if neither is there
if [ -e "$MEMCPYWRAP" ]; then
    export LD_PRELOAD="$MEMCPYWRAP"
elif [ -e "$MEMCPYWRAPARCH" ]; then
    export LD_PRELOAD="$MEMCPYWRAPARCH"
else
    echo "no memcpy wrapper found - sure this is a 64-bit flash problem?"
fi
exec $@
You can paste it to a new file called, say, flash-audio-workaround.sh in your home directory and make it executable with

Code: Select all

chmod 755 ~/flash-audio-workaround.sh
Then you can use the command

Code: Select all

~/flash-audio-workaround.sh firefox
to start a firefox browser with the workaround enabled.
Of course you can replace firefox with another browser command like e.g. chromium and use the same command in a desktop/menu/keyboard shortcut to make it easy to use. This method does not touch other applications and is completely independent of package updates.

Cheers, Jonas
Darkraven

Re: Flash player audio distortion

Post by Darkraven »

Hi all,

I had the same problem and finally the solution that turned out to work for me was hozomean's solution 2. Just for the record and in case it might be useful for someone else I report the steps I followed:

1) I tried the solution as given by jonas.bardino but it didn't work.

2) In synaptic I searched "flashplugin" and four packages were found:

flashplugin-nonfree
mint-flashplugin
mint-flashpluguin-square
mint-flashplugin-x64

The first and the last were installed --the last is the one hozomean was referring too--. When I removed mint-flashplugin-x64 it disappeared completely from synaptic so I guess it was kind of an obsolete package (?). Reading the description of each of the three remaining packages one sees that flashplugin-nonfree downloads the software from Adobe while the others, which are incompatible with it, are the meta-package for Adobe Flash plugin and the package for 64-bit. Anyhow I left mint-flashplugin and mint-flashpluguin-square installed.

3) Since the problem persisted I just went for hozomean's second solution as described by him/herself. It worked smoothly.

So now the question is: whenever a new update of flashplugin is available should I expect it to work and I can revert the solution applied now or should I stick to it? Thanks!
wil

Re: Flash player audio distortion

Post by wil »

Flash 11 (BETA) has been released, with 64bit Linux support. Works "more better" with LMDE64.

http://www.bytearray.org/?p=3216
http://www.reddit.com/r/linux/comments/ ... t_amongst/

You can get it here:
http://labs.adobe.com/technologies/flas ... hplayer11/

Videos play better, and GMail in Chrome doesn't hang in other (than GNOME) window managers.

Hopefully it'll be in the repository soon. :mrgreen:
xircon

Re: Flash player audio distortion

Post by xircon »

Nice one, thanks for the heads up.
rjs

Re: [Solved] Flash player audio distortion

Post by rjs »

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 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!

Good write there hozomean. Thank you.
scottlinux

Re: Flash player audio distortion

Post by scottlinux »

Flash Player 11 is working with no distortion for me. No work around required. yay!
wyrdoak

Re: Flash player audio distortion

Post by wyrdoak »

Flash Player 11 it working for me in both Firefox and Chrome. I almost don't know what to do now since I don't have to decide what I'm going to do before I pick a browser. :wink:
o_unico

Re: Flash player audio distortion

Post by o_unico »

hozomean second solution worked here. Thanks.
Dr.m0x

Re: Flash player audio distortion

Post by Dr.m0x »

The latest x64 flash player resolves the issue. It is not in the repos yet but if one downloads it directly from adobe and drops it into ones mozilla plugin directory things become normal once again.

Sent from my Desire HD using Tapatalk
anonbeat

Re: Flash player audio distortion

Post by anonbeat »

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 that worked for me!
Locked

Return to “LMDE Archive”