Category Archives: Software

Ubuntu 9.04 nVidia Driver Screen Resolution Problem

Many people running Ubuntu 9.04 are having trouble with the proprietary nVidia driver (nvidia-graphics-driver-180 in my case) including getting it to go to high resolutions that fit the native resolution of widescreen monitors. I had the same problem with an nVidia GeForce 6150 LE and Dell UltraSharp 2407WFPHC monitor.

I was able to get all the resolutions, including 1920×1200, for my monitor as well as have the nVidia driver recognize the monitor as a 2407WFPHC, by doing the following:

(If you can’t see your screen at all after enabling the nVidia driver, first read the companion post, Ubuntu 9.04 Screen Resolution/Monitor Out of Range (nVidia Driver 180).)

  1. Open a terminal window
  2. Go to the X11 directory (cd /etc/X11)
  3. Make a backup of the current xorg.conf (e.g., sudo cp xorg.conf xorg.conf.backup)
  4. Run nvidia-xconfig with root permission (sudo nvidia-xconfig). If you get a parsing error, delete xorg.conf so nvidia-xconfig can create a fresh one.
  5. Open xorg.conf with your favorite editor (e.g. sudo vim xorg.conf)
  6. You’ll see a lot of extra settings now
  7. Look for Section “Monitor”. Mine defaulted to the following settings:
    Identifier “Monitor0”
    VendorName “Unknown”
    ModelName “Unknown”
    HorizSync 28.0  – 33.0
    VertRefresh 43.0 – 72.0
    Option “DPMS”
  8. Change the HorizSync and VertRefresh values to the correct ones for your particular monitor. For my 2407WFPHC, I put the following:
    HorizSync 30.0 – 83.0
    VertRefresh 56.0 – 76.0
  9. Save the xorg.conf file
  10. Log out and restart the X server (at the login screen, select Menu, then Restart X server)
  11. Log in and run the NVIDIA X Server Settings tool. You should now have a whole bunch of resolutions from which to choose. I selected 1920×1200.

The reason that this works is that the nVidia driver needs to know the frequency ranges for your monitor in order to know what resolutions are safe to use. Setting the HorizSync and VertRefresh in xorg.conf provides this necessary information.

Redirect Output from Time Command to a File

If you want to find out how long a program takes to execute, you can use the Linux time command. It outputs the real, user and system resources used by the command you specify. For example, to see how long the ls command takes to execute on the current directory, you run time ls and get something like the following:

real 0m0.005s
user 0m0.004s
sys 0m0.000s

However, by default, the time command outputs this information to the standard error device and, as a result, it’s not always obvious how to get this information into a file.

If you’re using the GNU time command, it’s pretty easy with the -o or --output option. For example, the following command writes the time information from executing ls into the file time.log:

time -o time.log ls

On some systems, such as a Linux server I was using recently, the only available time command may be the one built into the shell. This time command does not have an output option. As a result, if you want to redirect the output of both the time command and the program it’s executing, you might think you want to do the following:

time ls > output.log 2>&1

Then, you discover that it doesn’t work as expected. All you get in the log file is the output of the ls command while the time command still prints to the console, even though you redirected standard error to standard out.

Why does this happen? It’s because those redirects apply only to the ls command, not to the time command. Fortunately, there’s an easy solution. Group the time command and the program you want it to time using parentheses. Try changing the previous command to the following:

( time ls ) > output.log 2>&1

When you view the output.log file now, you’ll find that the output of both the ls and time commands went into the log file, as desired.

Kubuntu 8.10 Video Flashing, Flickering, Blanking

Kubuntu Intrepid Ibex (8.10) on my laptop makes the screen flash on and off repeated every 10 seconds or so. The video output is actually turning on and off. It was driving me crazy. Here’s how to fix it.

My laptop has an Intel 945GM but this problem seems to affect other cards such as the GMA915 and some ATI as well. It has also manifested itself as flicker, rather than the periodic blanking that I’m experiencing.

According to bug 278471, this problem is associated with the monitor detection function in KDE4. So, to stop the flickering, flashing and blanking, simply turn off the detection service as follows.

  1. Click on the K menu
  2. Go to the Applications tab
  3. Click on the System menu followed by System Settings
  4. In the System Settings window, click on the Advanced tab
  5. Click on the Service Manager
  6. In the Startup Services list, select the service named, “Detecting RANDR (monitor) changes” so that it’s highlighted
  7. Click the Stop button to stop the service, then click the checkbox to clear it (so it doesn’t start up anymore)
  8. Click the Apply button

Voila! No more flashing. What a relief. After this bug is fixed, you can turn the service back on so that Kubuntu can detect monitors again.

Syncing Palm and Blackberry Contacts: Solution Update

A year ago, I posted a step-by-step solution to sync contact data from the Palm Treo to the Blackberry Curve. It should also work well from the Palm Treo 650, 700, 755 and new Centro to a Blackberry Pearl, Curve and other varieties of RIM cell phones.

Since then, that article became and has remained the most frequently read post on my blog. What amazes me is how so many people are trying to transfer their Palm smartphone contact info to or from a Blackberry and unable to get help from the manufacturers and wireless carriers after hours on the phone. The worst “solution” I’ve heard was from an anonymous commenter who said, “[I] just spent 2 hrs with T-mobile/BBerry support. They gave up and told me to transfer contact[s] manually.” Ouch!

Have a look through the original comments about syncing these smartphones. Some are quite entertaining.

The comments have also surfaced other related problems that needed solving. I’ll reprint some of them here since the comment history is getting rather long. But feel free to check out the original list for other goodies.

Transferring data from Blackberry to Palm
Some visitors wanted to actually go the other way, converting their Blackberry info to a new Palm Treo (or perhaps a Palm Centro). That’s pretty easy to do as well:

  1. Sync your Blackberry with Outlook.
  2. Export the data to a CSV file (e.g. Contacts.csv).
  3. Using the Palm Desktop software, import the CSV file from step #2 into the Palm Contacts database.
  4. If all the contacts look good after step #3 (make any correction in Palm Desktop), then HotSync the Treo.

Transferring data from Blackberry to Palm without Outlook

  1. Sync the Blackberry.
  2. Open the Blackberry Desktop Manager.
  3. Go to Intellisync.
  4. Click on Configure PIM.
  5. Select the Address book item.
  6. Click on Choose and select ASCII Import/Export as the type of address book.
  7. Select Export under Operation.
  8. In the file name field, enter Contacts.csv
  9. Click the OK button, then click on Synchronize Now.
  10. When the sync is complete, import the file into Contacts in Palm Desktop
  11. Sync the Palm Treo/Centro, etc.

Syncing from Palm to Blackberry without Outlook

The least expensive shareware/commercial tool to convert from Palm DBA format to CSV is datebookCSV. I haven’t tried it but it looks like it’ll do the job. If you use this tool, post a comment with your experience.

Well, that’s it for now. If you have more tips for Palm or Blackberry users, be sure to post it here.

Firefox 3 Beta Downloads Always Open in the Same Application

As I mentioned in the previous post, I’ve been using Firefox 3 Beta 5 quite a bit lately. When I used the Downloads dialog to Open Containing Folder for a document I had downloaded, Firefox asked me what program to use to open file links. Naturally, I selected the application for opening documents, oowriter. Bzzzt! Wrong answer.

Now, it wants to use oowriter to open every file and folder. Firefox wasn’t really asking for which application it should use to open a file, but a file link. So, I should’ve picked a file manager such as Konqueror, Dolphin, Thunar, etc. To fix this, go to Preferences (in the Edit menu on Linux), then Applications and scroll down to file in the Content Type column. In the Action column, select Use other… from the drop down list and choose your favorite file manager. Since I’m using Kubuntu, I chose Dolphin since it’s lighter and loads more quickly.

Is your Applications list empty? You can fix that problem by reading my previous post, “Firefox 3 Beta Applications Preference Empty on Kubuntu / Xubuntu“.