FedoraForum.org - Fedora Support Forums and Community
Results 1 to 14 of 14
  1. #1
    Join Date
    May 2010
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    F14; Sound comes with lots of noise on some flash videos

    I did a fresh install of F14, and I am using adobe 64bit flash plugin,
    on "some" websites such as yahoo movie trailers, flash videos are played with an audio which comes with lots of annoying noise. the video itself is played smoothly without any problem but the sound is terrible

    to my astonishment, this problem shows up only on a number of web sites, and on others such as youtube the sound is clear.

    any idea?

  2. #2
    Join Date
    Nov 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    Sure, see this bugzilla report:
    https://bugzilla.redhat.com/show_bug.cgi?id=638477

    It is a bug with flash and a change in the latest glibc memcopy. There is a temporary workaround in the bug report. Who knows if Adobe will ever get around to fixing their bug.

    ---------- Post added at 01:13 PM GMT ---------- Previous post was at 01:13 PM GMT ----------

    Sure, see this bugzilla report:
    https://bugzilla.redhat.com/show_bug.cgi?id=638477

    It is a bug with flash and a change in the latest glibc memcopy. There is a temporary workaround in the bug report. Who knows if Adobe will ever get around to fixing their bug.

  3. #3
    Join Date
    May 2010
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    Quote Originally Posted by pem2010
    It is a bug with flash and a change in the latest glibc memcopy. There is a temporary workaround in the bug report. Who knows if Adobe will ever get around to fixing their bug.
    how come this is a flash bug while I was using the same version of flash in F13 without any problem?

  4. #4
    Join Date
    Jul 2010
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    I have the same problem with Firefox/Chrome/Opera on Fedora 14 x86_64...
    Last edited by skyxn3t; 12th November 2010 at 11:03 PM.

  5. #5
    Join Date
    Nov 2010
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    Okay, please read the link I provided-it explains it all. I will just say that what happened is that glibc changed the behaviour of memcopy to be more strict about overlapping memory regions. Applications should not use memcopy if there are overlapping memory regions but some have. Flash is one of those applications. So yes, the same version of flash worked fine on F13 but is now not working on some sites with F14 due to the glibc change. It is a bug in glibc and in the bugzilla link even Linus Torvalds agrees, even though he has a few choice words for the glibc devs. So you can be sure it is a flash problem if Linus Torvalds says it is a flash problem.

    ---------- Post added at 03:55 PM GMT ---------- Previous post was at 03:45 PM GMT ----------

    I thought I would go ahead and post the fix that Linus Torvalds came up with in the bugzilla report. Here is his post in full. Linus uses chrome but the fix also works for firefox and opera.

    So in the kernel we have a pretty strict "no regressions" rule, and that if
    people depend on interfaces we exported having side effects that weren't
    intentional, we try to fix things so that they still work unless there is a
    major reason not to.

    So I'm disappointed glibc just closes this as NOTABUG. There's no real reason
    to do the copy backwards that I can see, so doing it that way is just stupid.

    But whatever. You can do a LD_PRELOAD trick to get a sane memcpy(), and it does
    indeed fix the sound for me. Just do something like this:

    prompt$ cat > mymemcpy.c
    #include <sys/types.h>

    void *memcpy(void *dst, const void *src, size_t size)
    {
    void *orig = dst;
    asm volatile("rep ; movsq"
    :"=D" (dst), "=S" (src)
    :"0" (dst), "1" (src), "c" (size >> 3)
    :"memory");
    asm volatile("rep ; movsb"
    :"=D" (dst), "=S" (src)
    :"0" (dst), "1" (src), "c" (size & 7)
    :"memory");
    return orig;
    }
    ^D
    prompt$ gcc -O2 -c mymemcpy.c
    prompt$ ld -G mymemcpy.o -o mymemcpy.so
    prompt$ LD_PRELOAD=mymemcpy.so /opt/google/chrome/google-chrome &

    and it does seem to work. Not a lot of testing, but at least TED-talks work for
    me again (and I tested the Daughtry thing too, although I am not convinced it
    sounds all that much better without the sound corruption).

  6. #6
    Join Date
    Jul 2010
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    It didn't work for me. Did it work for you? EDIT: Works fine now...
    Go to this website and play the video in in the main page: https://www.dropbox.com/ do you notice syncing or sound clipping after the fix?

    I get the following error in the last step:

    Code:
    [user@host ~]$ LD_PRELOAD=mymemcpy.so /opt/google/chrome/google-chrome &
    [1] 3891
    [user@host ~]$ ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object 'mymemcpy.so' from LD_PRELOAD cannot be preloaded: ignored.
    
    (exe:3944): Gdk-WARNING **: XID collision, trouble ahead
    LD_PRELOAD=mymemcp
    [COLOR="Silver"]

    ============= EDIT

    ---------- Post added at 03:35 PM GMT ---------- Previous post was at 03:18 PM GMT ----------

    Ok I got it working:

    This line: prompt$ LD_PRELOAD=mymemcpy.so /opt/google/chrome/google-chrome &
    Does not work, you have to specify the absolute path not the current path, even if you are in the same folder as the file it wont work you still need to specify the full path as in:

    prompt$ LD_PRELOAD=/home/user_name/mymemcpy.so /opt/google/chrome/google-chrome &

    This is assuming the file mymemcpy.so is in the /home/user_name/ directory.

    Now the noise is gone... Thanks to Linus for this quick hack& to pem2010 for posting !

    ---------- Post added at 05:13 PM GMT ---------- Previous post was at 03:35 PM GMT ----------

    Edit # 2 =======
    I noticed that I have to open the browser using the following line:
    LD_PRELOAD=/home/user_name/mymemcpy.so /opt/google/chrome/google-chrome &
    in order to be able to use chrome without the sound problems. Is this supposed to be used this way? Because opening the browser normally will open the browser with sound problems[COLOR="Silver"]
    Last edited by skyxn3t; 13th November 2010 at 12:39 AM.

  7. #7
    Yu Tsao Guest

    Re: F14; Sound comes with lots of noise on some flash videos

    I had the same problem before.But now it work for me.I write shell scripts to start my browser.

  8. #8
    Join Date
    Oct 2010
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    I'm a relative novice and I am having the same problems with my [I]flash[I] and I'm hoping that someone would be willing to post more specific instructions on how to use the work around. It would be greatly appreciated.

  9. #9
    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    Quote Originally Posted by nedavis001
    I'm a relative novice and I am having the same problems with my [I]flash[I] and I'm hoping that someone would be willing to post more specific instructions on how to use the work around. It would be greatly appreciated.
    Here's an alternate workaround script that I found on the Red Hat bugzilla section. It worked for me

    Note: Once you run that script, you need to type this command at the terminal in order to launch Firefox.

    LD_PRELOAD=$HOME/Downloads/linusmemcpy.so firefox.

    However, if you're running Chrome, I'm not too sure what that particular command would be.

    But whatever browser you're running, that popping sound issue in flash should disappear.
    Attached Files Attached Files

  10. #10
    Join Date
    Jul 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    I found that by adding LD_PRELOAD=/home/richk/lib/mymemcpy.so to the export section
    of ksh .profile file. This allows me to select any browser without it running in the background.

    richk

  11. #11
    Join Date
    May 2010
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    I added

    Code:
    LD_PRELOAD=/home/startover/lib/mymemcpy.so
    export LD_PRELOAD
    to .bash_profile

    and everything works fine, and there is no need to write a shell script to start firefox

  12. #12
    stevea Guest

    Re: F14; Sound comes with lots of noise on some flash videos

    Here is a cleaned-up, simplified version of the solution.
    This is for F14 (maybe later) x86_64 only, and the 64bit adobe flash plugin.
    https://bugzilla.redhat.com/show_bug.cgi?id=638477

    Create an empty directory -then cut-n-paste this into a shell

    Code:
    cat <<EOF > linusmemcpy.c
    #include <sys/types.h>
    
    void *memcpy(void *dst, const void *src, size_t size)
    {
      void *orig = dst;
      asm volatile("rep ; movsq"
    	       :"=D" (dst), "=S" (src)
    	       :"0" (dst), "1" (src), "c" (size >> 3)
    	       :"memory");
      asm volatile("rep ; movsb"
    	       :"=D" (dst), "=S" (src)
    	       :"0" (dst), "1" (src), "c" (size & 7)
    	       :"memory");
      return orig;
    }
    EOF
    Then get root privileges , for example using "su -" and run this from the directory:

    Code:
    gcc -O2 -c linusmemcpy.c
    ld -G linusmemcpy.o -o linusmemcpy.so
    cp linusmemcpy.so /usr/lib64
    chcon --reference=/lib64/libc.so.6 /usr/lib64/linusmemcpy.so
    sed -e "s:^exec :LD_PRELOAD=/usr/lib64/linusmemcpy.so exec :" -i /usr/bin/firefox
    The last line inserts the necessary option into the firefox startup script.

    For other browsers you'll need ...
    LD_PRELOAD=/usr/lib64/linusmemcpy.so /opt/google/chrome/google-chrome &
    LD_PRELOAD=/usr/lib64/linusmemcpy.so /usr/bin/opera &

    somewhere

  13. #13
    Join Date
    Aug 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    Great, this last post worked for me -- thanks everyone!

  14. #14
    Join Date
    May 2008
    Location
    amsterdam
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F14; Sound comes with lots of noise on some flash videos

    @stevea:
    thx dood!

    https://bugzilla.redhat.com/show_bug.cgi?id=638477
    interesting thread...
    funny mr linus himself came up with this solution.

    can you.. or anyone explain why this script actually works?

Similar Threads

  1. Lots of firefox XID collision errors while watching flash
    By dd_wizard in forum Fedora 13 Development Branch
    Replies: 12
    Last Post: 11th March 2010, 01:57 AM
  2. sound in videos (flash?)
    By sleetm in forum Using Fedora
    Replies: 8
    Last Post: 6th July 2008, 08:36 PM
  3. Sound issue with Flash videos
    By FelixT in forum Using Fedora
    Replies: 2
    Last Post: 19th May 2008, 11:02 PM
  4. Canon Lide 30 + Xsane = LOTS of shadow noise...
    By Mouse33 in forum Using Fedora
    Replies: 0
    Last Post: 8th November 2006, 10:24 PM
  5. sound in flash videos?
    By j0e in forum Using Fedora
    Replies: 1
    Last Post: 12th May 2006, 05:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •