What’s flooding my Mac’s console and keeping it from sleeping?

I’ve noticed that my Macbook Pro kept running out of batteries very fast when left alone to eventually go into standby. Turns out the Mac actually didn’t go into standby at all but rather waited until the battery level was critical and forced itself into hibernation. While investigating the cause for that, I looked for suspicious entries in the system log (Applications -> Utilities -> Console) to investigate potential causes. I found a component, presumably from Google Chrome’s Software Updater that was called every 10s by the Mac OS X’s Launch Daemon. My system log was littered with messages like these:

2/3/12 8:33:25.316 AM com.apple.launchd: (com.google.keystone.daemon[4480]) bootstrap_register() erroneously called instead of bootstrap_check_in(). Mach service: com.google.Keystone.Daemon
2/3/12 8:33:25.318 AM com.apple.launchd: (com.google.keystone.daemon[4480]) Exited with code: 1

So, while I’m not sure whether this was the reason that kept my Mac from going into regular sleep, I’m going to quickly give instructions on how to remove the service from launchd.

1. Open a Terminal (found in Applications -> Utilities)

2. Type

rm -rf ~/Library/Google/GoogleSoftwareUpdater
sudo su
launchctl unload /Library/LaunchDaemons/com.google.keystone.daemon.plist
rm /Library/LaunchDaemons/com.google.keystone.daemon.plist
rm -rf /Library/Google/GoogleSoftwareUpdater

Done. Most likely you won’t get any software updates for Chrome anymore, but at least your Mac is not bothered trying to launch a broken updater anymore. Best thing at this point probably is to get the latest version of Chrome, if you want to keep using that browser.

Update: Updated the terminal commands to remove the /Library/Google/GoogleSoftwareUpdate directories.

The perfect SSD and HDD hybrid MacBook setup

The SSD and HDD happily together, with plenty of space for more data. Note the separation of different categories of data, most suitable for either drive.

The performance of a Macbook pro by itself is quite amazing, but enthusiast know that the quest for higher specs never ends. It used to be that adding more memory (RAM) would be the best investment in increasing a machine’s performance and it sure still is one of the first things one should consider upgrading. With the introduction of solid state disks (SSD) however, replacing the magnetic hard-disk has become at least equally rewarding, if not even more. A typical 2.5 inch hard-disk will get about 60-90 MB/s in sequential read/write measurements, while a modern SandForce SSD on a SATA3 connection can easily get up to 400-500 MB/s. More importantly, seek times are dramatically lower on an SSD, given that the drive does not have to position a head physically on several disk platters. Since typical usage patterns on modern OS include loading many small files from completely disjoint regions of a mechanical hard-disk, an SSD can cut load times for a typical application to fractions of a second, whereas a mechanical drive would load data for seconds. However, SSDs are still much more expensive than mechanical drives, eclipsing $1 per GB, which makes them too expensive to keep your vast collection of music, pictures and movies on them. Fortunately, storing such files is more like keeping an archive of rarely accessed data and therefore there is no real benefit in storing hundreds of gigabytes of pictures of your cats, dogs or family on an SSD.

The following is a step by step guide on upgrading a typical Macbook with an SSD and preserving the old mechanical drive for rarely loaded data, such as your iPhoto pictures, iTunes music and movie folders. Some guides will recommend moving the whole /Users/<yourname> folder to the mechanical drive. Personally, I think that having parts of your user folder on the SSD will benefit performance, as many applications cache data in the ~/Library folder, and store settings and metadata in this location. The load time of applications can be improved if such data also resides on the SSD.

First, a couple of preparatory steps need to be performed.

Preparation

a. Make sure you have a current backup

Needless to say that if you are dealing with moving data and manipulating your long-term storage system of your computer, you should make sure that your backups are up-to-date. The following guide has the potential to destroy all of your data, so beware before performing any of these steps. Safeguarding your data is YOUR responsibility!

b. Find out where your data lives

In order to make the right decision on how big of an SSD drive you should get, it’s probably best to know what kind of data takes up the most space on your drive. Data such as your iTunes library, movies or iPhoto library do not need to be placed on an SSD, as such data usually doesn’t load very often and when requested, the performance of a mechanical drive will just do fine. Applications like WhatSize can make it easier identifying your storage requirements.

WhatSize helps identifying where you're storing most of your data

c. Get an optical bay adapter

These days, most people don’t use built-in optical drives anymore. There are some vendors out there manufacturing bays that will allow replacing the optical drive with a second hard-disk. If you want to keep your mechanical drive to store rarely accessed data, this is the way to go. MCE Tech sells the Optibay online. Make sure to get the right adapter for your Macbook, as some MacBooks have SATA interfaces, while older ones have a PATA interface for the optical drive and that would require you to get a bay that converts PATA to SATA, so you can keep using the SATA drive that came with your notebook.

d. Choose an SSD

New Macbook Pros come with a SATA3 interface, which will allow you to take advantage of new SandForce SSD drives. SATA3 has a theoretical transfer speed of 6 Gb/s. SandForce powered SATA3 SSD drives can deliver up to 500 MB/s in sequential data transfer rates, which is easily a 5-8 times improvement over a regular mechanical drive. When choosing the size, make sure you also have at least 20 GB or more left on top of your storage needs, as the OS performance starts degrading dramatically, if you run into low hard-disk space.

e. Have an external USB enclosure ready

Transferring the data from the original hard-disk to the new SSD is much easier if you have an external drive available, as it will reduce the amount of times you’ll need to disassemble your notebook. Now proceed with attach the USB enclosure to your Macbook.

That’s it. We’re done with the preparations. Let’s move on to the real migration work.

1. Partition the new SSD drive

Use Disk Tool from the Utilities folder to partition the new SSD. Make sure to choose “GUID Partition Table” under Options of the Partition tab before creating the new partition. Name the new partition to “Macintosh HD” in order to preserve the naming of the drives and select “Mac OS Extended (Journaled)” as the file system type. Hit “Apply” to finalize your changes.

Choose GPT when partitioning to ensure that your drive is bootable

2. Transfer all data using Carbon Copy Cloner

While there are other tools available for this, Carbon Copy Cloner is a great and free (donation ware) tool that allows you to efficiently clone your original drive to the SSD, without requiring any re-installation of Mac OS X. I’ve used this tool for years now and it has never failed me so far.

When running CCC make sure to exclude your media data folders. Exclude the following folders:

  • /Users/<yourname>/Movies
  • /Users/<yourname>/Music
  • /Users/<yourname>/Pictures

Deselect your media folders when cloning your data from the HDD drive to the SSD

3. Make room for Bootcamp and Windows (optional)

If you are interested using some of the prospective available space of your mechanical drive, you should consider preparing your bootcamp partition now. Windows requires the optical drive to be attached to the SATA bus of your machine and won’t allow you to install from an externally attached USB drive. Therefore it’s most advisable to perform the Windows installation at this time, so that you won’t have to disassemble your machine multiple times. This guide won’t go into details on how to install Windows on your Macbook, as there are plenty of good guides elsewhere. Just make sure to detach your SSD drive from the USB port before proceeding. That will ensure you’re not accidentally removing the newly created parathion on the SSD drive or re-format it inadvertently.

4. Don’t reboot into Mac OS X

Once the main hard-disk is cloned, you should avoid continuing to use or rebooting into Mac OS X as changes won’t be present on your SSD. If you’ve installed Windows in the previous step, you can make sure to avoid booting to Mac OS X by pressing the “alt” key during startup. That will allow you to choose the Windows partition instead.

5. Remove primary drive and remove built-in superdrive

It’s time to replace your primary drive with the SSD and install the optical bay replacement to hold your mechanical drive. Follow the guide that came with your optical bay replacement or check out the many guides you can find by searching Google.

6. Your first boot from the new SSD

It’s time to boot Mac OS X from the SSD for the first time. When turning on your notebook, make sure to keep the “alt” key depressed. That will allow you to choose from which drive to boot. If you’ve installed the SSD as the primary drive and put the mechanical drive into an optical bay adapter, you will see two “Macintosh HD” volumes available. The left volume is the first from the SSD. Choose the left “Macintosh HD” volume and hit return. You should already notice by now that you’re booting from the SSD, as your usual boot time should be cut down dramatically.

7. Rename the mechanical drive to “Data”

Beware that any removals should only be performed if you are confident that your data is available on a backup. The following steps have some severe data loss potential! Proceed with caution and at your own risk!

Once Mac OS X is fully booted go to the Finder and hit control-shift-g. Enter “/Volumes” and hit enter.

Go to the /Volumes location using the Finder's goto function

You should see a “Macintosh HD 1″ volume, the old mechanical drive, which you can rename to anything you like, or just “Data” for the purpose of this guide. From here you can also proceed in removing all System directories such as “Applications”, “Libraries”, “System” and so on, as these directories are fully cloned and available on your SSD. Just ensure not to remove the “Users” directory, as it contains all your pictures, movies and music that you have not transferred to the SSD.

8. Move your media folders to the new Data volume

Go to the finder again and navigate to your old Users directory. Hit control-shift-g and enter “/Volumes/Data/Users/<yourname>” . Grab the Movies, Pictures and Music folders and drag them to the “/Volumes/Data” location. Then you can proceed in removing the rest of the “Users” folder from the old drive, as anything else should have been moved when cloning the drive initially.

9. Redirect your Music, Movies and Pictures folders to the Data volume

Open a Terminal window and type the following commands:

$ sudo su (enter your system password)
# ln -s /Volumes/Data/Movies Movies
# ln -s /Volumes/Data/Music Music
# ln -s /Volumes/Data/Pictures Pictures

 

Create the symlinks to your Data volume

These commands will create symlinks from your user folder to the mounted Data volume. Symlinks are like shortcuts redirecting data to another location on the drive. iPhoto, iTunes and iMovie will continue to think that your data is in its usual location and the applications won’t need any reconfiguration to access the data from the mechanical drive. Additionally, if you’ve set up Time Machine to perform backups, TM will follow these symlinks and continue to backup your data as usual, despite being located on a different drive than the operating system.

10. Restart your backups

Now would also be a good time to ensure your backups are up-to-date again. If you’re running Time Machine or any other backup, make sure to check that the backups are being performed as expected.

11. Done!

You’re now a lucky owner of a hybrid SSD and HDD setup. Access to your applications should be dramatically faster, while not wasting precious SSD storage on rarely accessed data.

Pictures, Music and Movies all mounted on the mechanical drive

I hope this guide was helpful to you. If you have questions or contributions, feel free to leave a comment.

2011 iPhone update predictions

Apple is a company well known for its secrecy and it is part of its strategy to surprise the market with unexpected features and more often than not, for omitted features. Naturally, whenever a product update is due, rumors start flying and tech enthusiasts around the world start feverish discussions on what may be in for the next product release. Not being immune to such speculative talk, a couple of friends and I made it a habit to muse on upcoming product releases and take bets. To keep a record of that, here is my attempt to predict the next iPhone update, due sometime this year between June and September.

Hardware updates

I don’t expect Apple to change the physical case of the current iPhone 4 design, as I would assume they don’t want to upset the market that just bought into new accessories that fit the new design, as well as inflict major manufacturing changes on accessory makers. Also, sticking to the current design will let Apple increase their margins as they continue benefitting of economies of scale of the current design.

  1. New CPU, possibly the A5 found in iPad 2s. This will basically improve speed and battery life.
  2. Unified radio baseband from Qualcomm, delivering GSM (HSPA) bands as well as CDMA. No T-Mobile support for AWS bands.
  3. 1GB memory, delivering more speed and multitasking capabilities
  4. Improved front facing camera to support HD Facetime currently available on MacBook Pros. No change to rear camera.
  5. Improved battery life, probably delivered without changing the density of the battery itself, but rather through improved power efficiency from a possible CPU upgrade.

Hardware omissions

Every year there are plenty of new technologies announced and geeks around the world start dreaming of having the latest *insert buzzword here* technology included in their gadgets. I think that Apple however carefully selects the features they want to support and from all the rumors of things that could be included in the next release, here’s a list of things that Apple will explicitly not include as I don’t see how these items would align with Apple’s current product strategy.

  1. No NFC support. I don’t expect Apple to spend money on parts not widely used on the market. NFC technology has a lot of future potential, though I don’t think Apple will support a technology that has virtually zero usage scenarios at this time. For NFC usage scenarios to take off, Apple would have to partner with a major financial institution like Visa or Amex and would expose itself to new market forces the company is currently not dealing with. The financial industry is not Apple’s expertise and any such solution would likely not work internationally.
  2. No 4G (LTE) support. I would not assume that Apple wants their product to operate on immature and spotty networks with poor coverage outside of urban areas. I expect Apple to wait for the networks to be more widely available, become more reliable and await some international standardization. Apple’s bottom line is greatly affected by whether it can source the same components for all its devices sold across the world, such as Qualcomm’s CDMA/GSM radio used in the iPad2 for Verizon networks, thus driving costs down and not requiring different designs and SKUs for different markets. Furthermore, there is no benefit of increasing the available bandwidth to the device from the current theoretical maximum of 7.2MBits (HSUPA) to several dozens of MBits available with today’s LTE networks, as there are no common mobile applications that would benefit from such a bandwidth increase. LTE is currently a very power hungry technology which would just negatively affect the common usage scenario and thus only reduce the battery lifetime without delivering any tangible benefit to the average iPhone buyer. Apple might support HSPA+, though that would rather be an iteration on already available UMTS technology used in GSM networks and not require new networks to be built.
  3. No update to the retina display. For a smartphone, the display is near perfect as it is and I don’t think there is currently much room nor need for an improved screen. If anything, Apple may choose an improved screen design to reduce costs, however on the physical specs I don’t expect any changes to be announced. Definitively I wouldn’t expect Apple to move to AMOLED screens.
  4. No changes to the SIM infrastructure. Just last year Apple required operators to migrate to the micro-SIM standard and making yet another change would probably not bode well with the many carrier partnerships around the world. Rumors of a “soft-SIM” or embedded SIM card which could be dynamically provisioned and migrated between operators seem unlikely to materialize, as Apple is too much vested with its carriers and current subsidy models to deliver a successful product.

Software updates

  1. Rumors strongly suggest that Apple will come out with a new cloud offering, probably covering e-mail, music streaming and potentially video chatting (Facetime). I mostly agree that such an offering would make sense for Apple.
  2. Improved Facetime experience (higher bandwidth efficiency), potentially opened for 3G use.
  3. Some improvements to the multi-tasking UI. I believe that Apple could deliver a better experience in terms of usability and intuitiveness of the current multi-tasking solution.

Last but not least, I predict the next iPhone to be called, the iPhone 4s. I see the above improvements similar to what Apple did with the iPhone 3GS, which wasn’t a groundbreaking new design, but much rather a matured design within a major product cycle. Come next year, Apple may be adopting new technology such as LTE which would then warrant for a new name. Up until then, my bets are on updates more commonly seen with a the mid-product cycle, than a new product all together.

It will be interesting to see what will materialize of all the above predictions. In the meantime, feel free to add your own predictions to the comments section.

Asus eeePC with Novatel Ovation MC950D HSDPA 3G modem

I recently got myself an Asus eeePC 4G. I wasn’t that impressed with the pre-installed Xandros linux, so I went on installing a brand new Ubuntu 8.04. I also got myself a Novatel Ovation MC950D USB HSUPA modem, which allows me to connect to my local 3G carrier, Sunrise T@ke Away, Switzerland. I had no problems running the card with Ubuntu, since it was detected and auto-loaded immediately without any problems and allowed me to access the modem through the serial device /dev/ttyUSB0.

After a while though, I got a little bored with Ubuntu, especially by the fact that it took about two minutes to boot, compared to a mere 10 seconds that the original Xandros distribution required. So I decided to go back to the original Asus distribution and give it another try.

I then realized, that I wasn’t able to load the kernel module for my modem anymore and that the built in connection manager wouldn’t allow me to choose my Novatel modem for a GSM connection.

I know that the Huawei E220 would load without any problems and since the Novatel modem is just another USB serial device, I started tinkering with the usb-serial kernel module. After a while I found out, that loading the “option” module would load the device driver correctly. The only problem was to tell the driver, which device to connect to. The vendor and product ID for the Novatel modem is 0×1410 (vendorId) and 0×4400 (productId). I read on a forum post, that these settings could be supplied after the module had been loaded. So I went on and added the following two lines to my /etc/rc.local file, after opening a terminal with ctrl-alt-t:

sudo vi /etc/rc.local

Add these two lines before “exit 0″:

/sbin/modprobe option
echo "0x1410 0x4400" > /sys/bus/usb-serial/drivers/option1/new_id

For those not proficient in VI, just hit “ESC :wq” and the file saves and closes. Now, enable the execution of rc.local at boot time:

sudo echo "rc.local" > /etc/fastservices

Save the file and reboot your machine. You could also supply these two lines manually on the shell every time you restarted your machine. Now you’re able to select the Novatel USB modem in your connection manager and setup up a new 3G/GSM/HSDPA connection.

If you have another modem which uses the same option module, you can simply exchange the vendor and product id by your device’s ids. To find out your device’s id just look at this file:

less /proc/bus/usb/devices

Locate your device and use the vendor and product id that you find there. This should work for most Novatel devices, such as EVDO and 3G modems. Novatel devices should always have 0×1410 as their vendor id, so look for a device with that denomination.

After successfully installing the modem you can move on and configure your network connection. HINT: You might want to disable the PIN code on your SIM card before trying to establish a connection. I think the configuration wizard will not prompt you for the PIN, though I might be wrong.

The following pictures show you how this looks like (German version of the eeePC OS):

1. Select the appropriate connection type:

2. The modem is now showing up:

3. Scanning for GSM networks:

4. Select GSM network:

5. Select your provider’s network settings:

6. Name your connection:

7. Summary of your new connection:

8. Finally, the connection is set up and running smoothly. We’re online :) :

Thanks to “neilmc” to pointing out the option module behavior in his post on http://forums.whirlpool.net.au/forum-replies.cfm?t=940241&r=15131419#r15131419 .

How to reset a Nokia E65

To reset and wipe the whole memory of a Nokia E65 use this key sequence: *#7370# . You will be asked to enter the phone lock code. Contrary to the method used for the Nokia E61 holding down the “green” key, 3 and * while booting wont succeed in resetting the phone.

How to rescue a non booting Nokia E61

I just rescued a friend’s Nokia E61 which was not booting anymore. There was no way to flash the phone with the Nokia Updater since it wouldn’t boot and the Nokia Updater needs a working E61. A Nokia Repair center also told me they couldn’t do anything for me and that they would have to send the unit in to Nokia for repair.

Well, I happened to stumble across a site on the net which would describe how to reset a Nokia 6600 which is running an old version of the series 60 OS. It was using both *#7370# (hard reset) and *#7380# (soft reset) for resetting a working unit but further more it also showed, that you could format the unit by pushing the “green phone key”, 3 and * together while powering on the unit. Since the E61 powers up immediately when you insert the battery you will have to push those three keys before you insert the battery. As soon the battery is inserted to Nokia logo will show up for a while. You must hold the buttons until the pin code entry comes up. While you hold the keys the unit will reformat its flash memory and revert to a factory default state.

By doing this I was able to recover an apparently broken unit without having to send it in to Nokia for repair. I thought I’d share this as it might come in handy for someone else. Let me know if this worked for you too!

BTW: I think this works with other models like the E50, E60, E70, N-Series and others too.

Taking apart a Nokia E61

I recently scratched my Nokia E61 quite badly. I decided to order replacement parts to replace the cover and the case. I don’t like service centers so I took the freedom to replace the cover on my own. The procedure will probably void your warranty, but then, how should they find out you changed the cover? As long you don’t break things it probably wont void your warranty from an their point of view.

In order to change the cover of my Nokia E61 I had to take it apart. I took a few moments to make pictures along the process. If you need instructions on how to remove the cover of your own E61, then follow the link to the E61 gallery.

An E61 taken apart

MacBook Pro 17-inch taken apart

http://blog.petralli.net/photos/v/takingapartmbp/

I had a little accident on my notebook a few weeks ago. While I was working very late (5-am in the morning) I poured a substantial amount of very sugared liquid over my two week old system :( . While the liquid in question shall stay unnamed, the notebook was a MacBook Pro 17 inch! You might guess my reaction… I was lucky to turn the system off immediately and shook most of the liquid out of the notebook. I also used some compressed air to get the liquid out of some nastier places of the new MacBook. Finally, and luckily(!) the system was running again flawlessly… until the keyboard started to annoy me after two more weeks. It got sticky and keys were not responding well anymore. As I pushed a key it took 1-2s for the key to pop out again. Since I really like to write fast on my keyboard this was starting to become a bigger problem.

So I decided to take the MacBook apart, disassemble the keyboard and wash it under flowing water.

As I found out on googling about similar accidents with liquids, they seem to happen quite often. So I decided to document the process with a picture gallery. Maybe you found this page because you had the same kind of luck I had or maybe you’re just here to see the innards of a new MBP 17-inch. Which ever way, enjoy the pictures :) .

A word of caution: DO NOT TRY THIS YOURSELF UNLESS YOU ARE WELL-ENOUGH SKILLED. YOU CAN BREAK OR EVEN COMPLETELY DESTROY YOUR MACBOOK. IF YOU ARE HAVING PROBLEMS WITH YOUR SYSTEM CONTACT APPLE SUPPORT FOR PROPER SERVICE. YOU ALONE ARE RESPONSIBLE FOR WHAT YOU ARE DOING WITH YOUR SYSTEMS!

http://blog.petralli.net/photos/v/takingapartmbp/