# The Ubuntu Forum Community > Ubuntu Official Flavours Support > Multimedia Software > [SOLVED] Youtube flash player slow and laggy in Ubuntu 12.04 LTS

## Vinnizz

*Moderator note.* If you have found this forum thread from a google or other search, please be warned: there appears to be no logical reason why this should work. The method appears elsewhere, although it is impossible to tell where it started, and seems to have become some sort of internet version of a folk remedy for flash problems. Despite the claims that some in this thread have made that it has solved their flash problem, the forum staff urge caution in its use. Use at your own risk. It may have adverse effects on your system. In particular, be careful to add in the extra code properly otherwise you may break the functionality of the package and update managers.


So I've had the same problem as a lot of people, youtube was extremely laggy even when I played 240p videos and I tried everything, html5 youtube, flash-aid plugin for firefox and whatnot, and they didn't work for me.
Then I enabled "Override automatic cache management" on firefox. It got a little better but still a bit laggy on fullscreen.

Then I thought I'd let Ubuntu use more cache . So if you have the same problem just try this:

sudo gedit /etc/apt/apt.conf.d/70debconf.

Then put this code,:
 APT::Cache-Limit "100000000";
 on that file and then save it. 

Next type this code on your terminal
sudo apt-get clean && sudo apt-get update --fix-missing
and you wont find apt cache limit again in the next time.

It worked for me!!!  :Very Happy:

----------


## Damien Doe

After trying some of the same things as you, I thought I'd give this a try.

It worked!

Thanks!
-J.C.

----------


## Myon87

Worked for me aswell!

----------


## rearentry

This isn't just a fix this is an improvement. It seems Ubuntu is holding the cache back for some reason. I haven't actually had any major problems with flash but looked this up for a friend and tested it just to make sure it wouldn't crash and holy high definition video! It even improved the function of VLC and and streaming HD 1080p from my server over my Wifi is a breeze.
If you're reading this do it even if you don't have problems with flash.
Thanks!!! (there is no emoticon for how I feel so this will have to do) 
 :Guitar:   :Guitar:   :Guitar:

----------


## polyethlene

Thank you so much for this solution!  It was so frustrating to have the lag issues when watching videos online.  This SOLVED my problem.  Thank you!!!

----------


## pqwoerituytrueiwoq

how could changing how much space is allowed for apt to store packages (deb files) possibly affect video performance?

----------


## michael-wd21

> how could changing how much space is allowed for apt to store packages (deb files) possibly affect video performance?



Exactly, what's going on here?

Maybe the flash-aid plugin is what's helping. I'm going to give that a try.

Or this bit:




> Then I enabled "Override automatic cache management" on firefox


I don't see how that would help either though, this refers to disk cache for web content.

----------


## LaptopU

Fantastic, just logging in to say this has solved my laggy flash video playback too.  :Very Happy: 

Thank you  :Smile:

----------


## kino2984

Thanks  :Smile:

----------


## SterlingM

Hey guys, my flash is still laggy and my wifi will cut out when I stream it after about 1-1.5 minutes. I've tried all the suggestions here...does anyone have any other ideas I could check for?

----------


## WEPrechaun

For some reason, my Flash playback works fine only when fullscreen is running. Why?

----------


## vasa1

> how could changing how much space is allowed for apt to store packages (deb files) possibly affect video performance?


There's something _odd_ about this thread.

----------


## GRFrones

Well... it's worked for a few people, already... I didn't know computers were also susceptible to placebo. hehe

I'm also having problems with flash player in both of my ubuntu systems. They get laggy in youtube, flash games, etc.

Does anyone know of a solution unrelated to placebo? haha

Best Regards,
Gabriel.

----------


## derklempner

> So I've had the same problem as a lot of people, youtube was extremely laggy even when I played 240p videos and I tried everything, html5 youtube, flash-aid plugin for firefox and whatnot, and they didn't work for me.
> Then I enabled "Override automatic cache management" on firefox. It got a little better but still a bit laggy on fullscreen.
> 
> Then I thought I'd let Ubuntu use more cache . So if you have the same problem just try this:
> 
> sudo gedit /etc/apt/apt.conf.d/70debconf.
> 
> Then put this code,:
>  APT::Cache-Limit "100000000";
> ...


Unbelievable.  Not only did this fix the laggy Flash videos in Firefox for me, but it also stopped Flash videos in Chrome from playing too fast.

Canonical should really change *70debconf* to add this line.  It completely fixed all of my issues with Flash videos.

----------


## JoZ3

> So I've had the same problem as a lot of people, youtube was extremely laggy even when I played 240p videos and I tried everything, html5 youtube, flash-aid plugin for firefox and whatnot, and they didn't work for me.
> Then I enabled "Override automatic cache management" on firefox. It got a little better but still a bit laggy on fullscreen.
> 
> Then I thought I'd let Ubuntu use more cache . So if you have the same problem just try this:
> 
> sudo gedit /etc/apt/apt.conf.d/70debconf.
> 
> Then put this code,:
>  APT::Cache-Limit "100000000";
> ...


Thanks!!! work fine in ubuntu 12.10  :Guitar:

----------


## detlev24

hi, i tried a lot of things and this is what finally *worked* on *linux mint 14 64-bit* and *32-bit* (which is based on ubuntu 12.10); with amd catalyst 12.11 beta for radeon hd 7470m graphics card:

1. *sudo apt-get install gecko-mediaplayer* (_firefox-plugin for mplayer_)
2. i deactivated all plugins for totem and divx in firefox (_but the new ones_)
3. i installed *greasemonkey* add-on in firefox
4. i installed *viewtube* userscript from _https://userscripts.org/scripts/show/87011_

now at least 720p on youtube is working fine using pre-set configuration.

and what *did not work*:

- updating to the latest flash player (also by hand)
- enabling "override automatic cache management" in firefox
- adding APT::Cache-Limit "100000000"; to 70debconf via sudo gedit /etc/apt/apt.conf.d/70debconf
- _http://askubuntu.com/questions/117127/flash-video-appears-blue_

 :Guitar:

----------


## WackyClash

This also Greatly improved my flash performance. This is not a placebo. Thanks a lot for this information. Awesome!

----------


## mastergunner

By adding this line in APT i lost all flash. After removing the line I got flash to work again but still with the choppy playback. Still need help on this.

----------


## cyclothunder

Just find this thread, tried it, re-launched chromium and voilá!
It worked!!  :Very Happy: 

Many thanks

----------


## Whatzit

> hi, i tried a lot of things and this is what finally *worked* on *linux mint 14 64-bit* and *32-bit* (which is based on ubuntu 12.10); with amd catalyst 12.11 beta for radeon hd 7470m graphics card:
> 
> 1. *sudo apt-get install gecko-mediaplayer* (_firefox-plugin for mplayer_)
> 2. i deactivated all plugins for totem and divx in firefox (_but the new ones_)
> 3. i installed *greasemonkey* add-on in firefox
> 4. i installed *viewtube* userscript from _https://userscripts.org/scripts/show/87011_
> 
> now at least 720p on youtube is working fine using pre-set configuration.
> 
> ...


I tried the cache-limit and it didn't work for me. 

I wondered why it had been working fine before and then just recently it had stopped working. I thought maybe I got a bad flash update.

As it turned out, I had just recently hooked up my laptop to my HD TV via an HDMI cable and I would not get sound from my TV speakers, only the laptop speakers. So, after searching the web I found a solution. I modified etc/default/grub to add this line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1 (link here: http://community.linuxmint.com/tutorial/view/1051)

This worked as I could now select under System Settings/Sound my HDMI audio. What I didn't realize was that it was also the cause of my slow flash when I was not connected via HDMI but still had HDMI audio selected.

In the end my solution was to select my built-in speakers under System Settings/Sound.

Now flash video playback is back to normal!

----------


## d_in_Conduct

After weeks of "trying stuff" and still getting Flash crashes and large CPU loads that dragged down my whole system, I just gave up on Firefox and installed Google Chrome (not Chromium).  Flash works and CPU load is reasonable.  Chromium is all open-source, Chrome is not, but it's still a free download.

----------


## cannabis overdose

I keep getting a syntax error, I'm new to linux so I'm thinkin I copied the wrong lines or parts of the text wrong.  The first part works.

sudo gedit /etc/apt/apt.conf.d/70debconf


Then I modified said file.


Then this terminal cmd "sudo apt-get clean && sudo apt-get update --fix-missing"  and get the syntax error. What am I doing wrong?  Any help would be appreciated thanks.
.

----------


## shantiq

> sudo gedit /etc/apt/apt.conf.d/70debconf.
> 
> Then put this code,:
>  APT::Cache-Limit "100000000";
>  on that file and then save it. 
> 
> Next type this code on your terminal
> sudo apt-get clean && sudo apt-get update --fix-missing
> and you wont find apt cache limit again in the next time.



Well Vinnizz tried to play 720p and 1080p for the last 2 years and it has never worked

This WORKS on my 13.04 install and for the first time i am able to see 720p perfect ! and 1080p with still a bit of lag

bumped it up to 300000000
and still lags on 1080p   any reason i should not go higher?    thought of trying 500000000

In any case many thanx

----------


## n3wbvip3r

created an account and logged in just to say +1

works great on my hp mini 110, which is low spec'd and why i thought video was laggy.

one catch. when i move the mouse, video freezes. stop moving it, jumps to where it should be and continues flawlessly until i move the mouse. better than 2fps videos though.. lol.

----------


## seanos

> hi, i tried a lot of things and this is what finally *worked* on *linux mint 14 64-bit* and *32-bit* (which is based on ubuntu 12.10); with amd catalyst 12.11 beta for radeon hd 7470m graphics card:
> 
> 1. *sudo apt-get install gecko-mediaplayer* (_firefox-plugin for mplayer_)
> 2. i deactivated all plugins for totem and divx in firefox (_but the new ones_)
> 
> * 3. i installed greasemonkey add-on in firefox
> 4. i installed viewtube userscript from* *https://userscripts.org/scripts/show/87011*


Do this!

You probably already have gecko installed so that's not a big deal.

I'm even thinking of giving this a try in Windows (where  I have no probs with flash).  This script gives you control and lots of  options (e.g. players) to try.

Finally, no more jerk-o-vision!

----------


## denmat

Agreed. I too used HDMI output the other day (but did not adjust my grub config) and experienced the same problem. Stopping chrome, changing sound output to Analogue Output builtin audio, restarting chrome and setting sound output back to head phones solved my problem.

----------


## forreststevens

I've tried many, many things in this thread and others and the best solution I found was to use Chrome (not Chromium).  Though I've found the built-in Flash plugin to be unstable and buggy on alternate platforms, in Linux this is simply the only Flash option that produces reasonable performance for me.  :Sad:

----------


## dennis-mayr-c

I experienced the same annoyance under Ubuntu 12.04.3 on my netbook [Asus 1005PE, Intel GMA3150 video chipset, linux-generic-lts-raring kernel + xserver-xorg-video-intel-lts-raring]

In addition to the /etc/adobe/mms.cfg file workaround, I went to compizconfig settings manager (if not installed, sudo apt-get install compizconfig-settings-manager) and completely disabled the "dim windows" option under Effects, at the bottom section.

Less load on the system (without even giving up on Unity), and voilà, fullscreen flash videos don't stutter now.

----------


## mikewhatever

> Well... it's worked for a few people, already... I didn't know computers were also susceptible to placebo. hehe
> 
> I'm also having problems with flash player in both of my ubuntu systems. They get laggy in youtube, flash games, etc.
> 
> Does anyone know of a solution unrelated to placebo? haha
> 
> Best Regards,
> Gabriel.


+1, but walking backwads treats a headache for all I know.

----------


## darkhole

Ok, maybe the APT::Cache-Limit part is just a placebo. That value is used just by apt (when you are installing packages, etc).

But, It really worked! The cache managemente work really well!
Before aI made this, I tested YouTube (http://www.youtube.com/watch?v=cK3NMZAUKGw)
On Ubuntu + Firefox Nightly + Flash player:
10 FPS on 720p (as much)
On Ubuntu + Firefox Nightly + HTML5:
Choppy video
On Windows + Firefox Nightly + Flash player:
24 FPS with no problem on 720p
On Windows + Firefox Nightly + html5:
24 FPS with no problem on 720p

After deleted and restablished the parameters of cache I got 25 FPS with no problems (html5 and flash) I will test chromium.

----------


## Cerberus90

> So I've had the same problem as a lot of people, youtube was extremely laggy even when I played 240p videos and I tried everything, html5 youtube, flash-aid plugin for firefox and whatnot, and they didn't work for me.
> Then I enabled "Override automatic cache management" on firefox. It got a little better but still a bit laggy on fullscreen.
> 
> Then I thought I'd let Ubuntu use more cache . So if you have the same problem just try this:
> 
> sudo gedit /etc/apt/apt.conf.d/70debconf.
> 
> Then put this code,:
>  APT::Cache-Limit "100000000";
> ...


What command do what and it is make my videos even worst! I try 3 times this and nothing is better !

----------


## cccharles1

> So I've had the same problem as a lot of people, youtube was extremely laggy even when I played 240p videos and I tried everything, html5 youtube, flash-aid plugin for firefox and whatnot, and they didn't work for me.
>  Then I enabled "Override automatic cache management" on firefox. It got a little better but still a bit laggy on fullscreen.
> 
> Then I thought I'd let Ubuntu use more cache . So if you have the same problem just try this:
> 
>  sudo gedit /etc/apt/apt.conf.d/70debconf.
> 
> Then put this code,:
>  APT::Cache-Limit "100000000";
> ...



You, Sir, are a star!!!  :KDE Star: 

If I had a prize to give you, I would. But, I can only give you my thanks for enabling me to finally watch 1080p video on my machine.

Thanks again  :Smile:

----------


## Ivan_Ongko

Wow. it worked dude, Thanks :Razz: !!!

----------


## ricardoamercado

Thanks Vinnizz! Made it a lot better!

----------


## pwoo

> Well... it's worked for a few people, already... I didn't know computers were also susceptible to placebo. hehe
> 
> I'm also having problems with flash player in both of my ubuntu systems. They get laggy in youtube, flash games, etc.
> 
> Does anyone know of a solution unrelated to placebo? haha
> 
> Best Regards,
> Gabriel.


Without really digging into the internals of apt, I wouldn't completely rule out that this is a placebo because it does improve my firefox youtube viewing as well.  Full screen was not usable at all earlier but now, while not perfect, is much better.  It could be that it has nothing related to cache, but simply, the process cleans up some dirty links left over by the flash plugin installation.

----------

