Mac – get a plain blue screen when I connect the Mac Mini to an external monitor

mac-miniremote controlsnow leopard

I have one of the new mac mini's and run multiple users on it. At any time up to 5 users may be logged in. I have a keyboard and monitor that I connect to alot of machines so very often the mini has no monitor plugged in. When I connect my monitor – Dell Monitor, VGA to HDMI adapter that came with mini – I get just a plain blue screen. It looks like the blue that you see when the mac is switching users.

I've turned off all the energy saver options thinking that it might be going to sleep and not awaking. Any other ideas as to what might be causing this and how I can prevent it? Every time I connect my monitor I need to reboot to use the mini.

Update: I've tried a couple of more things – I turned off the screen saver also, I tried connecting to the machine using LogMeIn (http://logmein.com) all with similar results. It's as if when a monitor is not attached the mac stops outputting display. It is still running, I just can't get the display to work.

Update – this what I get when I SSH in and do a top command:

Macintosh-5:~ litmus$ top
Processes: 134 total, 2 running, 132 sleeping, 590 threads             10:39:24
Load Avg: 0.48, 0.46, 0.24  CPU usage: 1.87% user, 4.22% sys, 93.89% idle
SharedLibs: 4872K resident, 11M data, 0B linkedit.
MemRegions: 15034 total, 760M resident, 47M private, 228M shared.
PhysMem: 411M wired, 787M active, 382M inactive, 1580M used, 467M free.
VM: 335G vsize, 1042M framework vsize, 41811(0) pageins, 0(0) pageouts.
Networks: packets: 17481/3381K in, 18709/11M out.
Disks: 20134/790M read, 4894/76M written.

PID  COMMAND      %CPU TIME     #TH  #WQ  #POR #MREG RPRVT  RSHRD  RSIZE  VPRVT
547  top          6.4  00:00.26 1/1  0    24   43    1064K+ 264K   1640K+ 19M
538  SyncServer   0.0  00:00.12 5    3    42   87    1328K+ 5452K- 5988K  16M-
537  PubSubAgent  0.0  00:00.03 4    2    58   65    1528K+ 1412K- 3356K  33M+
521  SyncServer   0.0  00:00.13 3    1    39   83    1268K+ 5440K- 5924K  15M-
520  PubSubAgent  0.0  00:00.04 4    2    55-  65    1532K+ 1400K- 3384K  33M+
513  bash         0.0  00:00.02 1    0    17   24    256K   244K   920K   17M
512  sshd         0.0  00:00.05 1    0    11   68    284K   2492K  728K   584K
506  sshd         0.0  00:00.13 2    1    37   68    492K   2492K  4720K  796K
500  cupsd        0.0  00:00.06 3    1    48   68    1344K  328K   2916K  41M
497- LMIPSUser    0.0  00:00.03 9    0    44   55    452K   248K   1240K  31M
484  CCacheServer 0.0  00:00.00 2    2    35   53    604K+  320K-  1648K  33M+
483  AppleVNCServ 0.0  00:00.01 4    1    46   56    884K   276K   3708K  31M
478  Litmus Test  0.7  00:01.61 10   3    148  118   47M+   6116K  51M+   77M
477- LogMeInGUI   0.0  00:00.09 4    1    84   82    1168K  5544K  3832K  31M

Best Answer

Finally figured this out. The issue had to do with the fact that I am using multiple users and Fast User Switching.

You can read more details about it in this thread: http://discussions.apple.com/thread.jspa?threadID=2177922&start=15&tstart=0

The gist is that each user has it's own loginwindow process running. These multiple loginwindow process' reek havoc with any method of remote controlling the mac -VNC, Apple Remote Desktop, LogMeIn even unplugging/plugging in a monitor is affected.

So you need to kill all loginwindow processes before connecting.

To do this:

  1. Connect via ssh
  2. issue a ps auxwww|grep loginwindow to find the current loginwindow processes that are running - there will be one for each user + one for console
  3. for each process call sudo kill -9 pid where pid is the process id

* note: you do not need to kill the loginwindow for console

Much thanks to Martin Marconcini who led me down the path of investigating the running processes via SSH.