Howto kill your mac? Use Acrobat!

Today I though I’d lost my mac.

I was creating a PDF from Word using Adobe Acrobat. While Mac OS provides a built-in method to generate PDFs, I was under the impression that using the distiller word macro will generate better PDFs – mostly because the macro knows meta information about the text it converts and thus can create links and other PDF hints.

The system completely locked up.

I was able to still move the mouse, but the rest was dead.

I did the 4 seconds power button trick to restart the machine in the hope that this was just the usual flakiness of distiller on intel macs

Unfortunately, the system just froze again after a short wile (seconds)

And on every restart, the freeze happened earlier till I could not even log in in the end.

Using bootcamp (which I’m only using for playing World of Warcraft currently) I determined that it was no hardware problem (Windows had no lockups) which made me considerably happier.

I also learned that you have to press and hold shift on boot until that progress indicator is displayed to boot in some kind of Safe Mode

Using that, I was able to boot, log in and even work in OSX without the crash. I began stripping my system.

I’ve uninstalled the newly released RC of Parallels, removed all startup items (/Library/StartupItems, /Users/pilif/Library/StartupItems) – thinking that one of those things may have caused the problem.

A reboot showed no improvement unfortunately. The system still locked up. The error log did not show anything of interest.

Googling about “lockup macbook pro” after rebooting yet again in safe mode (which takes AGES), showed me lots of people having this problem after the recent security update released by Apple.

Usually the hint was to reinstall the OS (like in the old days of windows…) and to skip installing that securtiy update. Unfortunately that was no option at all as I did not have the CDs in range and I’m completely against not installing a security relevant patch.

Remembering the crash first happening when using Acrobat, I opened the printer setup utility and got the message that no printer was installed.

This made me notice that Safe Mode also seemed to disable printers, giving me some hope that maybe Acrobat was the problem: More stuff to disable is always a good thing when debugging something like this.

The printer setup utility has a nice feature. It’s called “Reset printing system…” and it’s placed in the application menu.

The feature works exactly as advertized, thus removing that acrobat printer (and all other printers *sigh*).

I rebooted once more and… it worked.

That recent security update did something to Rosetta (I’m guessing, but the same lockups seem to happen with Adobe Version Cue and they don’t happen on PPC systems) causing these lockups. And probably the printing system reinitializes the printer drivers after the updated.

And as I did not print after installing the update until now, the problem was triggered only just now.

While I’m happy that everything is working again, I’m certainly pissed right now.

A security update should never render your system unusable. I don’t mind who screwed up here (Apple, Adobe, Rosetta), but something like this must not happen.

The only good thing is that I’m quite experienced with situations like this. But still: This is my first mac. It was sheer luck that I found out how to fix this.

If such situations can’t be averted then please, please provide meaningful error reporting or just logging. Were there lines like ‘initializing printers’ in some logfile, I’d have known where the problem was.

But no. It just crashes with no way what so ever to just kill the hanging process. Why does failing to load a printer driver crash my whole system? Granted. The problem is probably in Rosetta, but something like this still MUST NOT happen.

The emulation layer stops responding? Easy: Kill and restart it.

This is majorly unpleasant. And it took away nearly two hours of my time which I’d have preferred to use for more useful stuff.

Mac Mail: Can software perform worse?

I’m a fan of Mac Mail (Mail.app). It looks nice, it renders fonts very nicely it creates mails conforming to the relevant RFCs and it basically supports most of the requirements I’ve posted back in 2003.

There are some drawbacks though. First one is no proper IMAP search support. This is not as bad as it sounds as the local full text index works very nicely (faster than our exchange server) and it’s even integrated into Spotlight.

Then, the threading support sucks as it’s not multi-level. This does not matter as much as back in 2003 though as my daily dose of technology-update now comes from RSS and blogs. Actually I’m currently not subscribed to any mailing list.

Everything else on that list is supported and the beautiful UI and font-rendering convince me to live with those two drawbacks and not use Mozilla Thunderbird for example which supports the whole set of features but looks foreign to OS X.

BUT. There’s a big BUT

Performance is awful.

Even though I’m using IMAP, Mail.app insists on downloading all messages – probably to index them. I know that you can turn this behavior off, but then it doesn’t download any message at all, rendering the program useless in offline situations. In Thunderbird you can make the program just download the messages as you read them and then use the contents of the cache for later offline display.

Then again: I have no problem with downloading and it even displays new mail while still downloading in the background. It does a better job at not blocking the UI than Thunderbird too.

What sucks is the performance while doing its thing.

I have around 3GB of mails on my IMAP server and before I could use Mail.app for the first time, the program downloaded the whole thing, utilizing 100% of one CPU core (it’s not SMP capable ;-) ), forcing my MacBook Pro to turn on the fans – it was louder than after playing 4 hours of World of Warcraft in Windows (via Boot Camp – it’s around twice as fast than the mac version).

It also took lots and lots of RAM making working with the machine a non-fun experience.

Later I decided to throw away two years worth of Cron-Emails containing a basic “Job done” which were filtered away on the server so I never noticed them. Deleting those ~22000 emails took two hours – again with 100% CPU usage on one core.

Even worse: Mail.app does not send an IMAP move command to move the messages to the trash (or just mark them as deleted). It actually manually copies the messages over! Message by Message. From the local copy to the server. Then it deletes them. And then begins the awful “Writing Changes to disk”, completely killing the performance of my MacBook.

Also annoying: Mail.app does not support IMAP folder subscriptions. It insists to fetch all folders – if you have a full calendar on your exchange server, it’s going to fetch all those (useless for Mail.app) entries aswell – and we know now how well Mail.app works with large folders.

My conclusion is: Mail.app is perfect for reading and writing your daily mail. It fails miserably at all mail administration jobs.

I’m going to stick with it none the less as reading my daily mail is what I’m doing most of the time. It’s just a good thing that Thunderbird exists and I’m going to use that for the next round of cleanup (hoping that Mail.app picks up the changes and does not take too long to mirror them to its local store).

RAM for my MacBook Pro

Today, another GB of RAM for my MacBook Pro arrived (I bought it at Heiniger AG. It’s no original Apple RAM, but it’s about a third as expensive as the original).

Installation was very easy to do (I link the instructions for the 17″ model because that’s what I found on the web – it works the same for the 15″ model).

And I tell you: This is the best thing to ever happen to a computer of mine performance-wise.

While the system feels a lot snappier in “default mode”, it shines even more when I’m running Parallels Workstation in the background (at full screen – using VirtueDesktop).

I’m inclined to say that the parallels-thing just got usable with this upgrade.

Funny thing: When you are working with Windows XP, you won’t notice as much as a speed increase in normal operating mode when you upgrade your RAM from 1GB to 2GB. I guess the memory manager of OSX is just more eager to swap out stuff if RAM gets scarce. And as we all know: Swapping kills a system.

GPRS, Bluetooth and Mac OS X

GPRS in your mobile phone and bluetooth are a real dream-team: Phones like that are small, fit in your pocket and still, they allow you to connect to the internet from your laptop – and even at reasonable speeds.

In contrast to the widely spread PC-Cards or wired connections, the handling too rocks: Just keep your phone in your pocked, dial from the laptop and use the internet. No fiddling with cards (or drivers. or strange software. your OS comes with all it needs to get the connection going), no problems with forgotten cables.

Bluetooth brought simplicity to the connection with your phone. Earlier we had infrared or cables, but nothing works as reproducibly as bluetooth does – at least in Windows.

As you know, I switched over to using Mac OS for my main office workstation. And today I was in the situation of needing internet in train and at a customers site.

Naturally, I wanted to use my mac to connect via Bluetooth to my K750i to use it’s GPRS capability.

While the bluetooth stack provides a very nice assistant to add a new bluetooth device and even allows you to create the GPRS connection, unfortunately, it does not work in the end.

Apple does provide some very specialized modem scripts, which is both good and bad. Good because if there’s a script for your modem/phone, it’ll work perfectly. Bad because if there is no script, it won’t work at all.

The assistant provided a list of Ericsson phone scripts and suggested using “Ericsson Infrared”. Naturally I first tried connecting with that, dialing *99***3# as I would in windows (the GPRS data connection being the third configured connection on the phone).

The phone did not even begin the dialing process.

I rebooted the Mac, launched Windows, created the RAS connection there and connected via GPRS to google for a solution (oh the irony…).

And I quickly found one: The modem scripts by Kia ora Ross

One thing to note though: You must use the script using a CID which is not configured on your phone (which is different from windows) and use the name of the APN as phone number (which also is different). With that in mind, connecting is easy.

What remains to be told: Apple which claims to be the superior OS usability-wise fails on this not-so-advanced task. Not only that. It fails in multiple ways:

  • It does not provide a generic modem script (like Windows does)
  • It suggests a completely non-working solution (instead of telling “sorry. I have not matching script.”)
  • One you get the right scripts, you have to click the “Show all”-Checkbox to be actually able to select it – despite all scripts listed in the default configuration being completely unusable.

So I’m coming back to what I was saying all the way: OS X or Windows? Doesn’t matter. Both have advantages. Both have disadvantages. Neither is clearly more usable than the other. Just go with what you feel more comfortable and live with the problems.

Oh and: Setting up a GPRS connection via a bluetooth-connected phone arguably is not a task doable at all for the people OSX was designed for. So it’s probably OK if it’s a bit harder. But still…. I’m not very happy about this.

PS: This is written and posted during a train ride. Connected via GPRS. Written on my MacBook Pro.

Tweaking Mac OS X for the Linux/Windows user

As you no doubt know by now, I’m gradually switching over from using Windows to using Mac OS X.

I have quite some experience with using Unix and I’d love to have the power of the command-line combined with the simplicity of a GUI here and then.

OSX provides that advantage to me: For one, I’m getting a very styled and time-tested UI, the ability to run most applications I need (this is where Linux still has some problems) and on the other hand, I’m getting a nice well-known (to me) command line-environment.

Of course, in my process of switching over, I made some tweaks to the system, I’m sure some of my readers may find useful:

  • Use a useful default shell: I very much prefer ZSH, so chsh -s /bin/zsh was the first thing I did.
  • Use a useful configuration for said shell: I’m using this .zshrc. It configures some options, enables a nice prompt, fixes the delete-key, sets the path and does other small cosmetical things.
  • Install the developer tools. They are on your install DVD(s).
  • Go and install Fink. No UNIX without some GNU utilities and other small tools. The current source-distribution works perfectly well with the intel macs.
  • Fix the Home- and End-Keys.
  • Tweak the terminal: Open the Window-Settings, chose “Display”, use a reasonable cursor (underline) and set your terminal to Latin-1 (I had numerous problems using UTF with ZSH). If you want, enable Anti-Aliasing. Then chose “Color”, use the “White on Black” preselection and play with the transparency slider. Use the settings as default.
  • Install VLC – your solution for every thinkable multimedia need. Watch out to get the Intel nightly if you have an Intel Mac.
  • I never use sleep-mode because it feels “wrong” not to shut the machine down completely. That’s why I entered sudo pmset -a hibernatemode 1 to make the “Sleep” option in the Apple-Menu work like Hibernate in Windows.

If you are a web developer on an intel mac and consider using PostgreSQL, don’t use the premade builds on entropy.ch because they are still built for PPC. You may use the StartupItem which is provided there though. If you do, call PostgreSQL’s configure like this to get the paths right:

./configure --prefix=/usr/local/pgsql --bindir=/usr/local/bin --with-openssl
--with-pam --with-perl --with-readline --with-libs=/sw/lib
--with-includes=/sw/include

This is after you’ve installed readline using fink. OS X itself does not come with readline and psql without readline sucks.

After installing PostgreSQL with make install, the paths are set correctly for the premade StartupItem, which makes PostgreSQL start when you turn on your machine.

Furthermore, I created my own customized PHP-installation (5.1.2) using the following configure line:

./configure --enable-cli --prefix=/usr/local --with-pear --with-libxml-dir=/sw
--with-apxs=/usr/sbin/apxs --enable-soap --with-pgsql=/usr/local/pgsql
--with-readline=/sw --with-pdo-pgsql=/usr/local/pgsql --enable-pcntl
--with-curl=/usr --enable-ftp --with-gd --with-png-dir=/sw --with-jpeg-dir=/sw
--with-zlib-dir=/usr --with-freetype-dir=/usr/X11R6 --with-bz2

Use fink to install libxml2, libjpeg and libpng

Using the hints provided here, you’ll get a configuration which makes working with the machine much easier for a UNIX/Windows guy. I hope it’s of some use for you.

XP on the MacBook Pro

As I’ve announced earlier, I’ve bought myself a MacBook Pro with the intention of running Windows XP on it (see that other post for the reasoning behind that), thought I changed my mind considering the multimedia capabilities: VLC (the preview for intel macs) plays whatever I throw at it, has a nice GUI and does NOT use 100% CPU time all the time.

One day after I made that blog post, I actually got my machine and immediately used the XOM EFI-Hack to actually install XP.

The process went quite smoothly despite it being quite a hack. The installation process actually was one of the fastest I’ve ever seen so far.

The problem with the XOM solution is the lack of drivers where it hurts the most: Power Management and Graphics

Having no graphics driver means: No acceleration, no DVI, no 2560 pixels resolution.

Useless for my purpose.

Yesterday, Apple announced Bootcamp, their solution for installing XP (or any other x86 OS for that matter) on the Intel Macs. Bootcamp requires a firmware update on the Macs which actually does nothing more but adding a real BIOS compatibility layer, allowing to install any non-EFI system.

Bootcamp itself is a graphical partitioning tool with the capability of resizing HFS+ paritions without data loss. And it comes fully packed with drivers for most of the integrated hardware (only iSight, the harddisk shock protection and the keyboard backlight don’t work)

As installing that driver package on a XOM solution sounded risky to me (and does not work as I’ve learned afterwards), I’ve installed the whole thing from scratch, deleting the former two paritions and letting bootcamp create new ones.

Installing XP was fast as ever and installing the drivers was one of the most pleasant experiences: Just doubleclick that large MSI and let it do it’s work. Reboot. Done.

Here’s my desktop in full 2560×1600 resolution (warning: The linked full-size picture is large) of my 30-inch cinema display, showing some CPU specs, the resolution control panel applet and the tool for selecting the default OS which was installed by Apple’a driver package.

The OS you select there is booted by default, but you can hold the Alt-Key while booting to bring up a boot manager.

I’m very plesed by the speed and low noise of the machine. Now the only thing I’m still whishing for is a docking solution as I now have to plug in three (DVI, USB, Power) or four (if I want ethernet) cables each day.

Well done, Apple. And: Thanks!

Update: This is a screenshot of the same machine running OS X. The installation is quite fresh still, but the most important things are installed already: Textmate, X11 and SSHKeychain.

Powerbook runs XP

It’s done. The contest has been won.

Windows XP is installable on a MacBook Pro and it even boots from there after the installation.

This solves a big problem I’m having: In the office, I’m using a 30″ cinema display connected to a Windows XP box which I had to custom-build because no out-of-the box systems have graphics cards with dual-link DVI ports which is needed for all resolutions bigger than 1920×1080 (technically, the limit is even 1600×1200, but 1920 still works somehow).

Now, custom-built boxes are nice, but they have two flaws: The first is the noise. Even though I got it to run very quiet despite the kick-ass graphics card I had to put in, it’s louder than your average laptop (it was even louder before I unplugged the chipset fan. As it’s working stable since more than a year now, I guess it doesn’t matter). The second problem is the problem of data redundancy:

If you prefer and have the ability, like I do, to both work at home and in the office, you are dependant of having current data at both places. Version control systems help a lot here, but they don’t solve all the problems (unfinished revisions which I don’t like to commit and binary files). In the end, the only way to have your data where you need it is to maintain it only at one place at a time.

This is the main advantage I’m seeing in laptops (beside the quietness).

Looking at the current laptop pc market, it’s even worse in respect of dual-link DVI outputs: Usually, you don’t even get single-link DVI. And custom-building one is no option unfortunately. There are some barebones, but what comes out of such an operation is a loud, badly manufactured “thing” with short battery life.

So, hardware-wise, powerbooks were always perfect because all of them have my direly needed dual-link DVI port.

The problem was the software. I’m dependant on Delphi for my daily work. Even if days can pass without me actually using it, it still happens that I need it. And when I do, it must be quick.

The other thing is multimedia. No matter what you are now going to tell me: Nothing on the Mac matches the perfect architecture of DirectShow which allows media players and codecs to be developped independently. Core Media Player with the right codec pack is unbeatable in performance, usability (at least for me) and versatility. Sorry Quicktime (only quicktime and maybe DivX). Sorry MPlayer (always uses 100% CPU, awkward GUI). You just don’t beat that.

Also multimedia related is my passion for speedruns and superplay movies in particular. For the latter ones, you need the emulator and the original ROM and especially the emulators (some of which are patched for the movies to work) don’t run on the Mac Platform and if they do, they only do with some limitations (like pausing the emulation stopping the playback of the movie in Snes9x).

If I want a single computer to work both at home and in the office, it must do both: Provide an environement to work with and an environement to play with.

OS X allows me to do some developement (TextMate comes to mind), but not all. It allows me to do some multimedia (XVid works sometimes), but not all. Thus, OS X is currently not a solution for me. At least not the single one (I’d love to work in TextMate for PHP and Ruby, eclipse for Java, but I can’t do Delphi or Windows CE).

So what I need is Windows (where the software does everything I need) on a Macintosh Laptop (where the hardware does everything I need).

Up until today, this was not possible.

Now it is. This wonderous hack (which is not completely disclosed yet, but I have a very good idea how it works) solves my problem in allowing me to combine the optimal software (for me. I know lots of people who can be perfectly happy with OS X) with the optimal hardware (for me).

Needless to say that I’ve ordered a MacBook Pro at our hardware distributor. They even had 13 on stock, so I’ll be getting mine tomorrow.

I hope the hack gets disclosed shortly, so I can do that nice dual-boot configuration :-)

Or maybe Virtual PC just works good enough for delphi and the speedruns…

Update: A howto with needed tools is now ready to be donwnloaded

Found on my iMac

Today, I found a residual registration link lingering around in my home-directory of my iMac. Looking at it’s contents with cat reveals quite an ordinary .plist-XML-file.

What’s interesting is what the engineers at Apple obviously thought of the newsletters the user is given a chance to subscribe to:

        <key>RegistrationInfo</key>
        <dict>
                <key>AppleSpam</key>
                <string>NO</string>
                <key>Location</key>
                <string>B</string>
                <key>Occupation</key>
                <string>5</string>
                <key>OthersSpam</key>
                <string>NO</string>
        </dict>

(the emphasis is mine)

Oh… how I agree with them!

AirPort basesation and external DHCP server

Recently, I bought an airport basestation.

I wanted to use it as a NAT router and a wireless access point. DNS and DHCP I wanted to do via a fully-fledged BIND/dhcpd combination running on my iMac.

DNS I need because I’m doing some work for the office from home. As much of it is web based, I need virtual hosts on my server and I certainly don’t want to go back to stone age and move around hosts files. DNS was invented for something, so please, let me use it.

DHCP I wanted because sometimes, I’m using applications on my notebook that require some ports forwarded to them (bittorrent for example). Forwarding ports without fixed IP-adresses can be difficult (especially if changing the forwarding address requires a restart of the router), so I wanted the possibility to give the MAC-adress of my notebooks NIC a fixed IP-address. This is not possible with airports built-in DHCP server (and I don’t blame them for this – it’s quite a special feature)

Now, imagine how disappointed I was seing, that this is not possible when using Apples configuration program:

They tie NAT and DHCP together: Either you turn off both NAT and DHCP, NAT only, or none of them. Turning off DHCP only is not possible.

Looking around on the web, I came across Jon Sevys Java Based Configurator again.

With this tool my configuration certainly is possible:

  1. Configure your basestation using Apples utility. Tell it to enable NAT and distribute IP-Adresses
  2. Update the configuration and exit Apples utility.
  3. Run the Java Based configurator.
  4. On the “DHCP Functions”-Tab, unckeck the Checkbox
  5. On the “Bridging Functions”-Tab uncheck “Disable bridging between Ethernet and wireless Lan”
  6. Save the configuration.

    The last step is important if you want the Basestation to continue working as an usable wireless access point. I forgot to do this the first time I tried and did not get an IP-Adress and could not connect to the wired lan after setting one manually either. Logical, but disturbing if you think you got the solution but it still does not work as expected…

New PowerMacs

designcluttervertical060904.jpg

(Taken from apple.com)

Today Apple announced new G5 Power Macs, where the most expensive one has two 2.5 GHz CPU’s and – that’s the reason for this entry – a liquid cooling system.

When I see the two words liquid and cooling together with Computer in one Phrase, I think of things like this, this and especially this. I find that really stupid

The german magazine c’t recently had an article about liquid cooling systems for PC’s and none of them was both more efficient than conventional air coling and secure enough to be used (you know: Water & Current isn’t a very good team. And then comes the whole chemistry with its cool things like corrision and other stuff). So for me, liquid cooling is just another gadget for overclocked gaming PC’s. Often a liquid cooling system is applied to keep the hoplessly overclocked CPU cool. And all is done because overclocking is supposed to be cheaper than buying the real thing, but in the end all this cooling stuff is much more expensive – even more so when something goes wrong.

I fail to see where apples solution is something different. The old G5 where quiet too, so I don’t see any reason for this besides it being a cool feature.

But whatever. The comparison between the internals of a G5 and a common PC I’ve taken from the Apple page is quite cool. What they don’t tell you: If you buy a complete PC from a manufacturer like IBM, you won’t get something extremely different from what you see on the left. But it’s cool none the less.