Thank you Wundorn for LaunchDaemon idea and script! The shell script is working great for me. I can "Screen Share" into my computer after boot and run the script and my screens come right up.
The problem is that the localboot.plist is not working as it should at boot. It could be that it's happening at the wrong time; or not at all. Any suggestions on troubleshooting the problem and improving your idea? I'd love to document the procedure in my build thread to make it even easier for new 7xxx users.
Is the /Library/LaunchDaemons/localboot.plist process working for others automatically at boot, or only the AppleScript?
First of all, I can confirm that it does work and run the script - I've been using it for over a year for other purposes (as I wrote, to mount a network volume - don't ask why I don't use the accounts pref pane for that, as you'll get a *long* screed about how much AppleShare sucks when used with Fast User Switching, *grumble*.)
Now, as to how to debug it - see the comments I left in there! You'll want to redirect output to a text file that you can examine, to see what kind of errors or other output you're getting. I'll note that I did make a small mistake in that comment (I wrote the comment on the fly), by reversing the order of redirection. Here's what you really want:
Code:
#!/bin/sh
# rotate screen twice to overcome white screen startup bug.
# If things aren't working out, you'll need to redirect output to someplace you can
# actually see it, by uncommenting the next line
exec >/tmp/boot.sh.output.txt 2>&1
echo "This proves that this script ran"
/usr/local/bin/fb-rotate -d 0 -r 90
/usr/local/bin/fb-rotate -d 0 -r 0
# Any other startup code can be placed here
Once your system is up, look in the file /tmp/boot.sh.output.txt and you'll see all the output. You can get rid of the echo line once you're satisfied that the script is running. If it's not, then you probably screwed up permissions or ownership on the plist, script, or directories.
Now, moving on from there, here's some speculation:
First, do you have to rotate the screen twice? If you only do the "fb-rotate -d 0 -r 0" command, is it a no-op, or will it work? Try it and let us know.
Next, what is fb-rotate doing that "fixes" the white screen? Clearly, it's issuing some type of reset after the rotation, since the screen dimensions have changed, and that's what's making things work. Now, that might be a consequence of the rotation that you can't cause without the rotation, but maybe it can be caused without the rotation. (I'm also going to guess that a resolution change will work as well as a rotation.)
fb-rotate appears to be open source. Taking a look, I see that there is a "-i" option which might be very interesting. Next time you boot please do "fb-rotate -i" before you fix the white screen and post the results. It's possible we'll see something really anomalous, which would explain why there's no display.
I went a little further, looking for a way to just issue the sort of reset we want. Apple's docs are pretty awful, as least to someone who hasn't looked at them since the days of Inside Mac Vol.5. I did find
http://www.opensource.apple.com/sou...amily/IOKit/graphics/IOGraphicsTypesPrivate.h and that suggests that you could modify the source for fb-rotate.c, changing the line reading
Code:
dErr = IOServiceRequestProbe(service, options);
to this:
Code:
dErr = IOServiceRequestProbe(service, kIOFBAVProbe);
...which might or might not cause a reset along the lines we're looking for. If someone with a dev environment set up who also has a whitescreening hack could try that, that would be cool.