Wednesday, August 24, 2011

Fixing the Full Screen Flash Stutter (720p and 1080p)

Assuming your computer can handle the fact that Adobe Flash can be processor intense (especially watching the 720p and 1080p videos on Youtube or Hulu), you really don't want the videos stuttering when you watch them in full screen when you know your computer can handle it. This has been bothering me for a while so I decided to track down a working fix to share with everyone. This fix isn't hard to implement but I'll provide some screenshots for clarity:

Open terminal and type:

$ sudo gedit /etc/init.d/ondemand

When gedit opens, paste the following block of information at the very bottom:

for CPU_THRESHOLD in /sys/devices/system/cpu/cpu*/cpufreq/ondemand/up_threshold
[ -f $CPU_THRESHOLD ] || continue
echo -n 30 > $CPU_THRESHOLD

See the image below for the exact placement of the code, notice that it is placed below the "esac" that is already present.

adobe flash fix, hq movies, 720p, 1080p

If you're having problems exiting flash, you can try changing the niceness value to something lower. The original value is echo -n 40, I was able to keep HQ video playback and better system stability at echo -n 30 so changed that to the default value above.

After you're done editing that file, save it and we'll finish up the rest of the steps in terminal:

$ sudo mkdir /etc/adobe
$ echo “OverrideGPUValidation=true” > ~/mms.cfg
$ sudo mv ~/mms.cfg /etc/adobe/

Now reboot and you *should* be able to watch full screen videos now lag and stutter free. Enjoy!

Friday, August 19, 2011

Updating to Kernel 3.0.0-x in Linux Mint 11

With Kernel 3.0 comes quite a few bug fixes over 2.6 and it's going to take a while before Linux Mint allows you to upgrade to it.  So naturally you might be interested in upgrading to it.  Luckily it's not too terribly difficult to do.

To upgrade to kernel 3.0 you're going to either want to disable 3D acceleration -OR- download and install the latest version of your video card drivers from the appropriate website (NVIDIA and AMD/ATI for example) BEFORE you start.

Once you're ready to get started open up terminal and type the following commands:

$ sudo add-apt-repository ppa:xorg-edgers/ppa
$ sudo apt-get update
$ sudo apt-get install linux-headers-3.0 linux-headers-3.0-generic linux-image-3.0-generic --fix-missing

Now you'll see an error that gets spit out depending on which version of the kernel is available and you'll have to go back and fix the final part of the command.  The error will look something like this:

Note, selecting 'linux-headers-3.0.0-8-generic' instead of 'linux-headers-3.0'
Note, selecting 'linux-image-3.0.0-8-generic' instead of 'linux-image-3.0'
Note, selecting 'linux-image-3.0.0-8-generic' instead of 'linux-image-3.0'
Package linux-headers is a virtual package provided by:
  linux-headers-3.0.0-8 3.0.0-8.10
  linux-headers-3.0.0-8-generic 3.0.0-8.10
  linux-headers-2.6.38-10-virtual 2.6.38-10.46
  linux-headers-2.6.38-10-server 2.6.38-10.46
  linux-headers-2.6.38-10-generic 2.6.38-10.46
  linux-headers-2.6.38-10 2.6.38-10.46
  linux-headers-2.6.38-8-virtual 2.6.38-8.42
  linux-headers-2.6.38-8-server 2.6.38-8.42
  linux-headers-2.6.38-8-generic 2.6.38-8.42
  linux-headers-2.6.38-8 2.6.38-8.42
You should explicitly select one to install.

E: Package 'linux-headers' has no installation candidate
E: Package 'linux-headers' has no installation candidate
E: Unable to locate package 3.0-generic
E: Couldn't find any package by regex '3.0-generic'

In all of those it states that the latest version of the kernel is 3.0.0-8.  So now we want to go back to the final command and edit that part for each instance where the 3.0 occurred like so:

$ sudo apt-get install linux-headers-3.0.0-8 linux-headers-3.0.0-8-generic linux-image-3.0.0-8-generic --fix-missing

Now reboot and you'll see that kernel available in your GRUB or LILO menu.  If your system fails to boot with this kernel, select "Previous Kernel" and then open terminal up again and type the following command:

$ sudo nautilus

Navigate to the folder /boot and delete all the files that have the new kernel's numbers in it.  It should be:


Once they're deleted, type in terminal:

$ sudo update-grub

Your grub should now have the 3.0.0-x instance removed from the list.

Wednesday, June 15, 2011

ADB, Eclipse, and Android SDK the Easier Way

Update:  For an even easier installation process, use my 32-bit or 64-bit .deb installers.  Just double click on them and follow the prompt.

Outdated Information: (still works, but not as easy)

Easy Access Links: *** Please read the installation instructions at the bottom of the page. Also the long version is designed to talk you through every step of the process. The short version is for people that just want the abridged version that are comfortable with Eclipse or Terminal. ***

GitHub (if you know how to use it)

If my script has been helpful to you, feel free to donate to the cause.


  • 1.0.3 (6/18/2011) - Setup 99-android.rules automatically, created a symlink for ddms so it can be executed from anywhere -- has to be typed twice sometimes the first time it is run for some reason (multiple displays error).
  • 1.0.2 (6/17/2011) - ./android update adb wasn't launching properly.  *Should* now.  The script should end with Eclipse wanting you to install Android SDK Platform-tools.
  • 1.0.1 (6/15/2011) - ./android update adb added to script.  Eclipse interaction minimal.
  • 1.0.0 (6/14/2011) - Android SDK, Android NDK, Eclipse, ia32-libs automatically installed.  Eclipse and ADT require prompting.


Now that I've finished my first release of the script, it has gone through some testing on 64-bit and 32-bit Linux Mint 11 systems and the installer seems to work. Now I wasn't able to completely install ADB with this script because I haven't been able to figure out a way to configure Eclipse from within the script, nor do I know if it is possible. So there is SOME work that you will have to do. I started learning how to program about 5-7 days ago and that was when I set out to make this script. That said, there are bound to be some errors that arise that I probably cannot fix.


One thing I'd like to discuss is the logic of the script (skip ahead if you just want the download link and instructions). I wanted to make it so the script could be run multiple times on accident and error check itself. I also wanted to make sure that as long as you had the Android SDK or NDK that you would not encounter problems with them installing again on my script. This will also carry over to any other of my scripts that I plan to make that will call on either of these libraries.  The following files will be installed by the end of the script:  Android SDK, Android NDK, Eclipse, and for 64-bit systems ia32-libs will be installed.  An ADB environment will also be set up so that once the script has been run and terminal has been restarted you will be able to run ADB anywhere by simply typing "adb" after setting up Eclipse.

Things Changed on Your System and Instructions

  • To access Android Debug Bridge at anytime after the script has been run and your terminal reset (bash typed or terminal closed and opened) you can type the command "adb" from any location.
  • To access the Dalvik Debug Monitor, you can access it by typing the command "ddms" and if you get an error about multiple displays then type "ddms" again and it should start.
  • To reference the Android SDK to compiling something, it will be located in the following directory: /usr/local/android-sdk
  • To reference the Android NDK for compiling something, it will be located in the following directory: /usr/local/android-ndk
  • Eclipse is now installed and most likely located in Applications -> Programming.
  • 64-Bit Operating Systems had the package ia32-libs installed for compatibility reasons.

These instructions are for people that are able to more confident with Terminal and Eclipse.  The instructions are not overly complicated, but I have provided a more in-depth tutorial for those that need it.

  • Download the file
  • chmod +x
  • sudo ./
  • Install "Android SDK Platform-tools" and accept the licensing agreement.
  • *** Close all instances of Terminal once this is done or type bash ***
  • Test ADB in terminal by typing "adb" from any directory. (without quotes)


If you have a GitHub account then you can download the latest version of my code from this link.  That link should provide the latest version of my code when and if I need to make any changes.  The other link that will probably not be updated as frequently is this dropbox link.  If you're getting the code from GitHub, for the sake of this tutorial I will assume you know how to obtain the file.

Step #1:  Download the file and find it in terminal.

When you open terminal, you will need to find where the file is located.  If you're using Linux Mint 11 and Google Chrome, it is most likely going to be in the "Downloads" folder (case sensitive, no parenthesis).  We can change to this directory in terminal by typing "cd Downloads" (notice that the Downloads has a capital D).  You can list the file and directories by typing the "ls" command.

Step #2:  Grant executable properties to the installer.

Once the file has been found and you're in the same directory type the following commmand:

chmod +x

Step #3:  Install the file and go afk.

This part takes a long, long time depending on how fast your internet connection is.  Even longer if you have a 64-bit operating system (Don't worry!  The installer figures that out for you!) and has to do a lot of things right now.  You can either read ahead or go do something fun, I'd suggest the latter.  So to initiate this part type the following command and then enter your password:

sudo ./

Notice how there is a period and then a forward slash before  Very important to put those in there.

Step #4:  Install Android SDK Platform-Tools

The Android SDK Platform-tools contains the ADB.  Also, if you plan to do any developing in Android this screen will probably be of some use to you.  Start by selecting "Available packages" from the left side and then under Android Repository install the "Android SDK Platform-tools."

Android SDK AVD Manager Eclipse Linux Platform Tools

Accept the next screen and if you have a pop up that asks if ADB can restart say "Yes."  Close out of Eclipse if you are done with it.

Step #5:  Test ADB and Done!

IF YOU HAVE ANY OPEN TERMINAL WINDOWS RIGHT NOW CLOSE THEM TO REFRESH THE ADB ENVIRONMENT.  Open terminal and type "adb" without the quotes (it doesn't matter which directory you do it from).  You should see a bunch of commands go across your screen to indicate that it worked like below:

adb google sdk android eclipse ndk linux

If "adb" doesn't prompt anything, try typing "bash" first and then type adb again.