What the heck are you doing Spotlight?

Filed Under Apple, Apple - Problem, Apple - Solution, OS X |

I don’t use Spotlight at all thanks to Quicksilver. But I’ve noticed in my system.log that I’m getting the following messages over and over again:

Apr 20 14:44:40 egads com.apple.launchd[102] (com.apple.Spotlight[4906]): posix_spawnp(”/System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight”, …): No such file or directory
Apr 20 14:44:40 egads com.apple.launchd[102] (com.apple.Spotlight[4906]): Exited with exit code: 1

Anyone have any idea what’s happening here? I looked at “/System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight” and it has no size, so I’m guessing it’s leftover from something? Anyone have any insight?

Update:
hmmm weird.. When I check the file through a console I have:
sh-3.2# pwd
/System/Library/CoreServices/Spotlight.app/Contents/MacOS
sh-3.2# ls -l
total 1384
-rwxr-xr-x 1 root wheel 704720 Feb 5 22:30 Spotlight

But if I browse to it in the Finder, I see Spotlight (I’m assuming that’s Spotlight.app) with a zero KB size. If I try to open it it says it’s not supported in this architecture.

So confused.

SOLVED! Kudos go to Justin for hooking me up with the full copy of Spotlight.app. I backed up the old (apparently corrupt) one and the copied the new Spotlight.app from him into /System/Library/CoreServices. So far, so good and no more errors in system.log. Woohoo!

5 Comments

Full Screen Firefox and Safari on OS X

Filed Under Apple, Apple - Good, Apple - Solution, Geek, Internet, OS X, Software, Tools |

Maxmize to full screen on OS X

Anyone that has talked to me about what I don’t like about OS X has heard me complain about the inability to maximize an application to take up the entire screen in one easy step. Sure you can drag the corner out, but that’s an annoying “work-around” in my opinion. But thanks to Todd Dailey I have a more acceptable work-around for Firefox and Safari at least.

All you do is add a Bookmark to the Bookmark Toolbar (commonly called a Bookmarklet) that has this snippet of JavaScript instead of the URL that normally goes there:
javascript:window.resizeTo(1440,900);

Of course you’ll want to set the values to the same size as your screen resolution. You can check your screen resolution in System Preferences -> Display. And on Safari you can make it even simpler if you make this bookmarklet the first one in the list. Then you can just hit Command+1 and have a full screen web browser instantly.

This is also handy for web developers on all platforms. Want to see what your site looks like at 800×600, 1024×768, etc.? Make a toolbar button for each resolution! Quick and easy site previews while you’re working on pages.

4 Comments

Macbook Pro Resurrected!

Filed Under Apple, Apple - Bad, Apple - Problem, Apple - Solution, Geek, Hardware |

It is back from the dead! Upon suggestions from a couple of friends and some vague posts on random forums, I swapped out the new 4gb of RAM I bought with the original 2gb that came with the machine. My Macbook Pro then booted without problems. *sigh* Looks like this RAM is headed back to Crucial. For anyone else that’s trying to figure out why their Macbook Pro is showing a grey screen and the light is blinking on the front 3 times, pausing and then blinking again, check your RAM! While trying to find out a way to test RAM, I finally found this page from Apple. I don’t know why I wasn’t able to find this page in any of my searching before. I guess it’s not well indexed for the search terms I was trying. So, this link is for Google to find the page when some poor unfortunate soul that ends up in the same predicament as I did, wondering what the heck three blinks means:
Macbook Pro grey screen, light blinks three times

3 Comments

coreaudiod and mdworker (aka Spotlight) crashing! Help!

Filed Under Apple, Apple - Bad, Apple - Problem, Apple - Solution |

Sad Macbook Pro

UPDATE: Apparently you just need to make a post on your blog and then suddenly the answer appears (or things start working right. mdworker decided to stop crashing all of a sudden, but just to be on the safe side I went ahead and rebuilt the launch services database at the suggestion of a friend with the following command in Terminal:

sudo /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

As for the coreaudiod problem, I think I may have found the culprit. Awhile back I had installed some webcam drivers from IOXperts because I wanted to get my Logitech Orbit webcam working since the iSight doesn’t pan and tilt. :) Things just didn’t work and the IOXperts webcam drivers kept saying a camera wasn’t plugged in. I gave up at that point but left the drivers installed. As I was troubleshooting the sound issue tonight I found a way to reproduce it reliably. Going into the System Preferences -> Sound and double clicking sounds to preview them reliably crashed coreaudiod. I downloaded and ran IOXperts uninstaller and uninstalled all their drivers, and then sounds magically started working again. Again, so far so good. Hopefully these problems are fixed for good. I’ll leave the original post below in case any poor souls run into the same things…..

——

I’m frustrated with OS X on my Macbook Pro right now. It’s supposed to “just work”, instead I’m getting my audio randomly cutting out and apparently Spotlight is broken, and I haven’t even had this thing for 2 months. Anyone have any ideas? Google results aren’t pulling up much that’s helpful other than “reinstall” basically.

I haven’t had time to even get used to how everything interacts within OS X, so it’s tough for me to troubleshoot things. Hopefully someone out there might have some insight, or maybe I’ll have some luck at the Apple store with the Genius Bar. Here are the errors I’m seeing in Console:

3/17/08 12:06:26 AM com.apple.launchd[1] (0×10bc20.mdworker[831]) Exited abnormally: Segmentation fault
3/17/08 12:06:29 AM com.apple.launchd[1] (com.apple.audio.coreaudiod[125]) Exited abnormally: Segmentation fault
3/17/08 12:06:32 AM com.apple.launchd[1] (0×10bc20.mdworker[833]) Exited abnormally: Segmentation fault
3/17/08 12:06:38 AM com.apple.launchd[1] (0×10bc20.mdworker[840]) Exited abnormally: Segmentation fault
3/17/08 12:06:44 AM com.apple.launchd[1] (0×10bc20.mdworker[842]) Exited abnormally: Segmentation fault
3/17/08 12:06:49 AM com.apple.launchd[1] (0×10bc20.mdworker[844]) Exited abnormally: Segmentation fault
3/17/08 12:06:55 AM com.apple.launchd[1] (0×10bc20.mdworker[845]) Exited abnormally: Segmentation fault
3/17/08 12:07:01 AM com.apple.launchd[1] (0×10bc20.mdworker[847]) Exited abnormally: Segmentation fault
3/17/08 12:07:07 AM com.apple.launchd[1] (0×10bc20.mdworker[849]) Exited abnormally: Segmentation fault
3/17/08 12:07:13 AM com.apple.launchd[1] (0×10bc20.mdworker[851]) Exited abnormally: Segmentation fault
3/17/08 12:07:19 AM com.apple.launchd[1] (0×10bc20.mdworker[852]) Exited abnormally: Segmentation fault
3/17/08 12:07:24 AM com.apple.launchd[1] (0×10bc20.mdworker[854]) Exited abnormally: Segmentation fault
3/17/08 12:07:31 AM com.apple.launchd[1] (0×10bc20.mdworker[855]) Exited abnormally: Segmentation fault
3/17/08 12:07:37 AM com.apple.launchd[1] (0×10bc20.mdworker[857]) Exited abnormally: Segmentation fault
3/17/08 12:07:43 AM com.apple.launchd[1] (0×10bc20.mdworker[860]) Exited abnormally: Segmentation fault
3/17/08 12:07:49 AM com.apple.launchd[1] (0×10bc20.mdworker[862]) Exited abnormally: Segmentation fault
3/17/08 12:07:54 AM com.apple.launchd[1] (0×10bc20.mdworker[863]) Exited abnormally: Segmentation fault
3/17/08 12:08:00 AM com.apple.launchd[1] (0×10bc20.mdworker[865]) Exited abnormally: Segmentation fault

Here’s also the log file that got dumped:
Process: mdworker [908]

Read more

Leave a Comment

Make my Macbook Pro Hibernate

Filed Under Apple, Apple - Problem, Apple - Solution |

Bunki suspends to RAM to enable quick startup

I don’t like to waste battery life, especially when traveling. I love the Hibernate feature in Windows, and have all of my laptops set to hibernate when the lid is closed. The few extra seconds it takes to wake up is worth the saved battery life in my eyes. For those that don’t know here are the different states of the Macbook Pro:

  • On - Computer is awake, screen is on, battery is being consumed based on your power settings
  • Off - Computer is using no power from the battery
  • Sleep - Computer has turned off the screen and has suspended the operating system to RAM (volatile memory).
  • Hibernation - Computer has turned off most hardware and has suspended the operating system to the harddrive

Usually when you close the lid of your MBP, it will be put to sleep, and wake up quite quickly when you open the lid again. While it’s sleeping it’s still consuming battery power, albeit a small amount compared to normal usage. When the battery reaches a certain low level, the MBP will automatically switch to hibernation mode and basically shut off so you don’t lose any of your work. Sleep is great for when you’re actively using your computer, but when you want to stretch out battery life for as long as possible, you want to hibernate. Also to note is that it appears that the newer Macbook Pros also write information to the harddrive when sleeping so that when the battery drops to dangerous levels it can jump instantly into hibernation. Apple calls this “Safe Sleep”. (More info on all the technical stuff here)

A few examples of why you would want to hibernate with your laptop:

  • You’re about to head to the airport on an international flight and you want to use your machine during the flight but still leave enough juice to be able to pull up a map/email/info when you get to your destination.
  • You toss your laptop in a bag and may or may not use it on a weekend trip but don’t want to worry about charging it.
  • You want to conserve every little bit of power you can.

And when you would want to stick with sleep:

  • Your laptop isn’t running off battery power
  • You will be opening and closing your lid quite often
  • You’re running around but actively using your laptop (conferences, meetings, etc.)

Basically you sacrifice the speed of restoring your machine to gain a little bit of battery power or vice versa. Personally I like to get every last bit of electricity that I can.

After some searching I came across a post that explained how to basically force your MBP into hibernation when the lid is closed. It requires a quick bit of work in terminal, but is painfully simple.

In Terminal/iTerm/etc run the following command to determine your current sleep mode:
pmset -g | grep hibernate

This should return one of the following:

  • 0 - Legacy sleep mode. It will save everything to RAM upon sleeping but does not support “Safe Sleep”. Very fast sleep.
  • 1 - Legacy “Safe Sleep”. This is the “Safe Sleep”. Everything your laptop goes into sleep, it will save everything to harddisk. Slow on Sleep and Startup.
  • 3 - Default. As described above, when sleeping, contents are saved to RAM. When battery runs out, hibernate occurs.
  • 5 - Behaves as 1 but applicable only for modern Mac that uses “Secure virtual memory”.
  • 7 - Behaves as 3 but applicable only for modern Mac that uses “Secure virtual memory”.

Now edit and save your /Users/username/.bash_profile file with the following lines:

alias hibernateon="sudo pmset -a hibernatemode 5"
alias hibernateoff="sudo pmset -a hibernatemode 0"

hibernateon and hibernateoff can be any text you want, you just need to remember what you used

Execute the following:

source .bash_profile

Now you have a handy little command that will let you enable and disable instant hibernation on a whim. Whenever you want your machine to hibernate when you close the lid, just drop to a terminal window and type “hibernateon”. When you’d prefer your laptop to just sleep, type “hibernateoff”.

8 Comments