Ubuntu 9.10 Karmic Koala: Fix Video Tearing with Compiz & Nvidia Geforce GTS 250

I am using Ubuntu 9.10 but steps should be similar for other distributions too.

Video Tearing with Compiz

Ubuntu’s NVidia drivers are okay for this card. I tried playing 1080p video and it works well if you don’t have compiz turned on. When compiz is on, the video tearing is noticeable. This is what I did to solve it:

  1. In CompizConfig Settings Manager (installable via Ubuntu Software Cemter), go to General Options > Display Settings. Set Refresh Rate to 60 and check “Sync to VBlank.”
  2. Enable “Sync to VBlank” under nvidia-settings. To do this, go to System > Administration > NVIDIA X Server Settings. Then, choose OpenGL Settings, and check the “Sync to VBlank” box.

This stopped the tearing I guess, but the 1080p became very choppy, probably because the driver is old. Once I installed the latest drivers, the problem was no more.

Update NVidia Drivers

The drivers in the Ubuntu repositories are almost always old. To install the latest version, go to the NVidia site and download the latest version. As of Feb. 22, 2010, the latest version is 190.53. Set the .run as executable by right clicking the file > Properties > Permissions and then checking “Allowing executing file as program.”

Before installing, close X by typing into a terminal:

sudo /etc/init.d/gdm stop

Then run the installer:

sudo ./NVIDIA-Linux-x86_64-190.53-pkg2.run

Choose “Yes” for every dialog.

After installation, start X again:

sudo /etc/init.d/gdm start

And the new drivers should be loaded.

Set Up the Logitech MX Revolution in Linux with Revoco

Download Revoco 0.5

Wheel:

The basic mouse functions will work in Linux but to get the mouse wheel customized, download Revoco 0.5. Extract the contents to some folder, go to that folder in the terminal and compile it by typing “make”.

Run revoco without any parameters to see the usage. Remember to run it as root! I personally prefer setting it to auto so I’ll run something like this:

sudo ./revoco auto=18

Where the number indicates the sensitivity. 0 = free scroll, 50 = clicky scroll.

The neat thing about revoco is that, unlike Logitech’s SetPoint, you only need to run this once and the settings stay regardless of whether the next computer you plug it in has SetPoint or revoco. Handy if you need it to function the way you like on a work computer ;)

Extra Functions:

Download btnx and you can set functions to the mouse wheel/buttons. Remember to detect the mouse buttons first before assigning features.

Note that while btnx has a tab for revoco, it may not work if revoco is removed from the build of btnx due to a licensing issue.

Seagate Barracuda HDD vs. OCZ Vertex SSD – HD Tune Results

Tested on a system with the following specs:

  • ASUS P5P43TD Motherboard
  • Intel Core 2 Quad Q8200 2.33GHz
  • 8GB DDR3
  • Windows 7 Professional 64-bit

Seagate Barracuda HDD

  • 7200RPM
  • 500GB
  • SATA2
  • 3.5″
  • 16MB Cache

OCZ Vertex SSD

  • 60GB
  • SATA2
  • 2.5″
  • 64MB Cache
  • Firmware 1.4

How To Set Up a Samba Server in Ubuntu

Samba

So you have a Linux desktop or server and want to share files and/or printers to your Windows PCs or Macs. Luckily, all three operating systems support SMB so let’s use that. With Samba you can share files and printers on your home network and protect your shares with a username and password.

Read the rest of this entry »

Review: Monoprice iPhone External Battery (2200mAh)

Monoprice

Let’s be frank: the iPhone 3G has the worst battery life out of all the iPhones. Add to that the fact that I use my iPhone like a laptop and the battery can die in less than one day. The Monoprice backup battery is only $15 from Monoprice.com and does the job very well. The battery pack should work with all iPods too.

Let’s take a look…

Read the rest of this entry »

Sudoku Solver in Java

SudokuSolver

This is a Sudoku solver that uses arc consistency and domain splitting. Also able to tell if a board has no or many solutions.

Download SudokuSolver

Great iPhone Apps (Free & Paid)

one-billion-apps-hero-20090418

I’ll just list out a few of the apps I have right this moment. If an app costs money, I’ll try to list out some free alternatives. Hopefully you’ll find that they’re useful!

Read the rest of this entry »

How to Use the PS3 Controller (Dualshock 3/Sixaxis) on Windows 7 64-bit via USB

DS3Windows

Get your PS3 controller to work on your PC with MotionInJoy drivers for 32 and 64-bit Windows. This guide will show you how to connect your PS3 controller via USB.

Read the rest of this entry »

Deterministic Linear Time k-Select Algorithm

Code

This is an implementation of linear time selection by Blum, Floyd, Pratt, Rivest, and Tarjon in Java.

Pseudocode:

BSelect(A,k):
    If |A| == 1 return A[1]
    p = GoodPivot(A)
    S = { A[i] | A[i] < p }
    L = { A[i] | A[i] > p }
    If |S| >= k return BSelect(S,k)
    else if |S| == k-1 return p
    else return BSelect(L, k-|S|-1)

GoodPivot(A):
    Divide A into n/5 groups of 5 elements each
    Find the median of each group
    Use BSelect to find the median, p, of the n/5 medians
    Return p

View implementation