Everyone who's seen it knows what a great program Google Earth is, and the modest hardware in the Eee PC is capable of running it. Of course it won't have the same performance you'd find in a recent desktop or non-budget full size laptop, but it is usable on a stock Asus 701 4G. Upgrading the RAM to 1 GB or more will help, especially when using an external high-resolution monitor.
This How-to describes installing Google Earth and fixing a performance problem on the factory installed xandrox Linux. These directions should also work for other Linux distros, but windows users can just install the app normally as no patch is needed.
When Google Earth is run on the Eee PC's internal LCD screen, the program runs so slowly you'd think it is hung up or crashed! However, if you attach an external VGA monitor and run the program it works properly.
If you start the program via the desktop icon or the link in your home directory you'll see a console window appear. (starting the program via the Run Command menu doesn't show this window) When using the internal screen the following message appears in this console window:
do_wait: drmWaitVBlank returned -1, IRQs don't seem to be working correctly. Try running with LIBGL_THROTTLE_REFRESH and LIBL_SYNC_REFRESH unset.
Makes perfect sense, doesn't it?
Fortunately there's someone out there who did understand it well enough to develop a workaround…
I searched google looking for a fix, and found it in a post by mirsev on the google earth community forums. He wasn't using an Eee PC back in '06, but I thought I'd give his method a try, and it works!
If you haven't already installed Google Earth, visit this page and click on the “Agree and Download” button. When the download is completed, make the GoogleEarthLinux.bin file executable, then run it.
You can make files executable by setting the exec permissions in one of two ways:
chmod a+x FILENAME (for this install, replace FILENAME with GoogleEarthLinux.bin)Google Earth might give you a message complaining about missing bitstream fonts. The program seems to run just fine with the fonts already installed by Asus/xandros, but if you want to get rid of this message install the ttf-bitstream-vera and x-ttcidfont-conf packages. I used the debian repos.
By default Google Earth will use up to 400MB of disk space to cache data, images, etc. On a normal computer that's no big deal, but it's 10% of the Eee PC 4G's SSD! To change this click on the Tools-Options menu item, then select the Cache tab. Now you can lower the Disk Cache Size value to 16. (16MB is the minimum allowed)
After installation the google-earth program directory consumes 65MB, so the total disk space used will be about 81MB. See the A web alternative to Google Earth section for an alternate program that uses no disk space at all!
Download this zip file, extract the two files it contains, and copy them into the directory where you installed Google Earth. Before starting google earth, you have to make the new googleearth file executable! (see above in the “istall” section how to make e file executable)
That's it. Enjoy!
Google Earth 4.3 - released in April 2008 - has an additional issue. It seems very slow to render the atmosphere, resulting in a frame rate of about 1 frame every 3 seconds. To turn off the atmos, either edit /home/user/.config/Google/GoogleEarthPlus.conf and change Atmosphere=true to Atmosphere=false or, if you have the patience, run GE, let it stabilise and go to the view menu and turn off Atmosphere
If you just want to make Google Earth run properly, you can ignore this section, just follow the previous instructions.
If you're the type of person who doesn't trust someone else's compiled code, (you're only paranoid if they're not out to get you…) or you're just curious about what's in the patch, read on!
The patch consists of one C code file which is used to create a function module, and a change to the shell script which actually starts the Google Earth app. The change causes the updated function module to be pre-loaded and thus override the normal code.
Here's the C code file:
// Filename: drm_nowaitVblank.c // Purpose: work around the extremely slow speed that occurs // on the asus eee pc when running on the internal // lcd display. It also works for some other computers. // For: Google Earth Linux version 4.2 // Created by: mirsev on 27 June 06, posted to http://bbs.keyhole.com/ubb/showflat.php?Cat=&Board=SupportGELinux&Number=481227&Searchpage=1&Main=471862&Words=+mirsev&topic=&Search=true#Post481227 // Modified by: John M. imabuddha@gmail.com on 23 Nov 07, changed DELAY value // Usage: // compile it with "gcc -o drm_nowaitVblank.so -shared -fPIC -ldl drm_nowaitVblank.c" // copy the resulting drm_nowaitVblank.so file to ~/google-earth/ // change the following line near the end of the ~/google-earth/googleearth script: // from: exec "./googleearth-bin" $* // to: LD_PRELOAD="./drm_nowaitVblank.so" exec "./googleearth-bin" $* #include <sys/time.h> #include <unistd.h> #include <string.h> //#define DELAY 33333 // this is the original delay value #define DELAY 1 // I changed it to the minimum (ok 0 might also work...) int drmWaitVBlank(void) { static struct timeval last = { 0, 0 }; static struct timeval now = { 0, 0 }; int udiff; gettimeofday(&now, NULL); udiff = (int)now.tv_usec - (int)last.tv_usec; if (udiff < 0) udiff += 1000000; udiff -= DELAY; if (udiff < 0) usleep(-udiff); memcpy(&last, &now, sizeof(struct timeval)); return 0; }
Here's the modified shell script:
#!/bin/sh # # Google Earth startup script # # Function to find the real directory a program resides in. # Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software FindPath() { fullpath="`echo $1 | grep /`" if [ "$fullpath" = "" ]; then oIFS="$IFS" IFS=: for path in $PATH do if [ -x "$path/$1" ]; then if [ "$path" = "" ]; then path="." fi fullpath="$path/$1" break fi done IFS="$oIFS" fi if [ "$fullpath" = "" ]; then fullpath="$1" fi # Is the sed/ls magic portable? if [ -L "$fullpath" ]; then #fullpath="`ls -l "$fullpath" | awk '{print $11}'`" fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'` fi dirname $fullpath } # Set the home if not already set. if [ "${GOOGLEEARTH_DATA_PATH}" = "" ]; then GOOGLEEARTH_DATA_PATH="`FindPath $0`" fi LD_LIBRARY_PATH=.:${GOOGLEEARTH_DATA_PATH}:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH # Let's boogie! if [ -x "${GOOGLEEARTH_DATA_PATH}/googleearth-bin" ] then cd "${GOOGLEEARTH_DATA_PATH}/" # exec "./googleearth-bin" "$@" LD_PRELOAD="./drm_nowaitVblank.so" exec "./googleearth-bin" $* fi echo "Couldn't run Google Earth (googleearth-bin). Is GOOGLEEARTH_DATA_PATH set?" exit 1 # end of googleearth ...
The only change to this script file is the line near the end that begins with LD_PRELOAD=”./drm_nowaitVblank.so”.
If you want to change something in the code, you'll need to rebuild the drm_nowaitVblank.so module. Download this zip file, extract the contents, and then run makeit.
Note: You need to have the C development tools installed if you want to build the patch!
If you haven't installed these yet, see Installing Development Tools.
This post from eeeuser Phantaxus mentions an interesting flash based web alternative to installing and using Google Earth. It provides a very basic interface, but does have several map sources besides google's. It also doesn't require any valuable space on the internal SSD.
Some very simple EasyGUI-Mode GoogleEarth-Icons.
Or here's another set of icons:
Have a look here on how to Customizing the Easy Mode GUI