Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: video playback after suspend

  1. #11
    Join Date
    Apr 2011
    Beans
    1

    Re: video playback after suspend

    For thinkpad w510 / i7 820 QM - your work-around works fine!


    #!/bin/sh
    # Disable hyper-threading processor cores on suspend and hibernate, re-enable them
    # on resume. Presumably helps for buggy nvidia behaviour.
    # This file goes into /etc/pm/sleep.d/

    case $1 in
    hibernate|suspend)
    echo 0 > /sys/devices/system/cpu/cpu1/online
    echo 0 > /sys/devices/system/cpu/cpu3/online
    echo 0 > /sys/devices/system/cpu/cpu5/online
    echo 0 > /sys/devices/system/cpu/cpu7/online
    ;;

    thaw|resume)
    echo 1 > /sys/devices/system/cpu/cpu1/online
    echo 1 > /sys/devices/system/cpu/cpu3/online
    echo 1 > /sys/devices/system/cpu/cpu5/online
    echo 1 > /sys/devices/system/cpu/cpu7/online
    ;;
    esac


    thx!
    Last edited by shellac; April 8th, 2011 at 08:00 AM.

  2. #12
    Join Date
    Apr 2010
    Location
    England
    Beans
    14
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: video playback after suspend

    This fix has worked on my AMD dual core with ATI graphics also. Flash player and compiz effects jerky after suspend/resume, but not now thanks to this!

    #!/bin/sh
    # Disable hyper-threading processor cores on suspend and hibernate, re-enable them
    # on resume. Presumably helps for buggy nvidia behaviour.
    # This file goes into /etc/pm/sleep.d/

    case $1 in
    hibernate|suspend)
    echo 0 > /sys/devices/system/cpu/cpu0/online
    echo 0 > /sys/devices/system/cpu/cpu1/online
    ;;

    thaw|resume)
    echo 1 > /sys/devices/system/cpu/cpu0/online
    echo 1 > /sys/devices/system/cpu/cpu1/online
    ;;
    esac

  3. #13
    Join Date
    Mar 2007
    Beans
    13

    Re: video playback after suspend

    Hi,

    on my debian stable (that is impacted with same bug) on my HP Pavilion DM4-1162sf, the following do the job :


    #!/bin/sh

    # This file goes into /etc/pm/sleep.d/

    case $1 in
    hibernate|suspend)

    echo 0 > /sys/devices/system/cpu/cpu1/online
    echo 0 > /sys/devices/system/cpu/cpu2/online
    echo 0 > /sys/devices/system/cpu/cpu3/online
    ;;

    thaw|resume)

    echo 1 > /sys/devices/system/cpu/cpu1/online
    echo 1 > /sys/devices/system/cpu/cpu2/online
    echo 1 > /sys/devices/system/cpu/cpu3/online
    ;;
    esac

    Thanks !

  4. #14
    Join Date
    Nov 2008
    Location
    Rotterdam
    Beans
    7
    Distro
    Ubuntu

    Re: video playback after suspend

    2sauthess: the script helped me, thanks!

    Guys, do you know if there is a bug reported somewhere so I can subscribe to it?

  5. #15
    Join Date
    May 2011
    Beans
    1

    Re: video playback after suspend

    Worked for me on thinkpad T410 with Nvidia graphic

    thanks!!!

  6. #16
    Join Date
    Mar 2007
    Beans
    13

    Re: video playback after suspend


  7. #17
    Join Date
    Apr 2009
    Location
    Florida, United States
    Beans
    112
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: video playback after suspend

    This bug also appears in Lucid. To all of those that are having this problem, does Flash video performance still stutter in fullscreen if you disable Compiz? If it plays smoothly, then that's both a workaround and a clue. This bug has nothing to do with intel video drivers, or nvidia. From this layman's perspective, it looks like it's either a kernel bug, a compiz bug, or a flash bug. For me (and likely for others for whom my workaround works), this bug is reproducible 100% of the time after suspending TWICE. Suspending only once from a fresh reboot does not reproduce the bug for me. Hibernate doesn't impact flash performance at all. I have no idea when this bug first appeared, since I always used to shut down the machine completely at the end of the day.
    Linux. Think Different-er.

  8. #18
    Join Date
    Mar 2005
    Beans
    Hidden!

    Re: video playback after suspend

    Awesome! This works on Intel video card's as well! Ubuntu 11.04 (natty). On my system I had to add cpu2 to the script.

    Thank you so much clrg!

    My script that was added to /etc/pm/sleep.d/10_sleep_video_fix (make sure to chmod it to 755):
    Code:
    #!/bin/sh
    # Disable hyper-threading processor cores on suspend and hibernate, re-enable them
    # on resume. Presumably helps for buggy nvidia behaviour.
    # This file goes into /etc/pm/sleep.d/
    
    case $1 in
        hibernate|suspend)
            echo 0 > /sys/devices/system/cpu/cpu1/online
            echo 0 > /sys/devices/system/cpu/cpu2/online
            echo 0 > /sys/devices/system/cpu/cpu3/online
            ;;
        
        thaw|resume)
            echo 1 > /sys/devices/system/cpu/cpu1/online
            echo 1 > /sys/devices/system/cpu/cpu2/online
            echo 1 > /sys/devices/system/cpu/cpu3/online
            ;;
    esac
    UPDATE #1:
    WARNING!

    The solutions given by myself as well as others will fix video and flash playback, but will KILL any virtualization you are doing! This virtualization freeze will also cause many problems like:

    • It will totally break Xorg (for me, I end up having half of a monitor repeated).
    • It will also freeze your kernel at certain points which means DEAD computer until you force cut-power!

    I have only seen this happen when going to sleep with some virtualized environment running (for me, that's virtualbox)!
    Last edited by AgenT; May 31st, 2011 at 01:41 PM.
    STOP!
    Before you sign up to Dropbox, click here to read my post showing you how to get an additional 500mb free! That's 2.5GB of free space!

  9. #19
    Join Date
    Mar 2007
    Beans
    13

    Re: video playback after suspend

    Hi,

    Here is a script that should work on all our computer (instead of looking for CPU numbers...) :


    #!/bin/sh
    # Disable hyper-threading processor cores on suspend and hibernate, re-enable them
    # on resume. Presumably helps for flash resume problem.
    # This file goes into /etc/pm/sleep.d/

    case $1 in
    hibernate|suspend)
    for i in /sys/devices/system/cpu/cpu*/online; do echo "0">$i; done
    ;;

    thaw|resume)
    for i in /sys/devices/system/cpu/cpu*/online; do echo "1">$i; done
    ;;
    esac

    I think it will be easier that checking cpus numbers...

    For me, it's not an ubuntu bug (I have it on debian stable too) and not a compiz one too (as disabling cpus is a workaround...).

    Hope this "new" scripts helps few of us

    Regards,

  10. #20
    Join Date
    Apr 2007
    Beans
    4

    Re: video playback after suspend

    Quote Originally Posted by sauthess View Post
    Hi,

    Here is a script that should work on all our computer (instead of looking for CPU numbers...) :


    #!/bin/sh
    # Disable hyper-threading processor cores on suspend and hibernate, re-enable them
    # on resume. Presumably helps for flash resume problem.
    # This file goes into /etc/pm/sleep.d/

    case $1 in
    hibernate|suspend)
    for i in /sys/devices/system/cpu/cpu*/online; do echo "0">$i; done
    ;;

    thaw|resume)
    for i in /sys/devices/system/cpu/cpu*/online; do echo "1">$i; done
    ;;
    esac

    I think it will be easier that checking cpus numbers...

    For me, it's not an ubuntu bug (I have it on debian stable too) and not a compiz one too (as disabling cpus is a workaround...).

    Hope this "new" scripts helps few of us

    Regards,
    Worked for me. Thanks!

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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