I'll let you know, but you're likely to beat me to it. Now that it's working again, I'm unlikely to toggle out of Target Display anytime soon. It may only be a correlation, but it seems like toggling in and out of Target Display a few times between iMac restarts has no impact on the iMac's f1/f2 buttons functioning properly. There always comes a point where toggling into Target Display brings the iMac's screen in at "Blinding Brightness" that cannot be turned down.
I know when I hit the point where the Safe Boot / Restart cycle fails consistently to restore the brightness controls, I'll make the leap unless you and/or others report that ML isn't a consistent solution. Thanks for sharing the link.
ONE MORE SUCCCESSFULL SOLUTION. I have iMac 27" with Mini DisplayPort used as an external monitor for Macbook Pro Retina 15" with Thunderbolt port connected with MDP cable. After the iMac system was automatically updated to version 10.6.8, the brightness stopped adjusting by pressing F1 and F2 keys on the wireless iMac keyboard during the connection. I've tried to reboot iMac in different special modes, reseting, etc..., but all the attempts failed. Finally I've remembered that I still have the original istallation disc with the older OS X version, that was provided with the iMac. I've used it to install OS X 10.6.4, and got all the brightness functions back, constatly working after each reboot. Of course, it would be better to have the same functions in the latest OS version, but now I'm quite happy to get the external monitor mode properly available again.
Go ahead and update to the latest OS. It was confirmed by a couple of people that 10.8.2 worked fine for this feature. It's at 10.8.3 now. I just finally decided to go with it since I was having problems with some applications and with stability. I updated a few days ago and it's working just fine. Since updating, I've played Planetside 2 on my PC, viewing on my iMac, and I have brightness controls working as they should.
I was worried enough about security updates staying at whatever 10.6 it was. But going all the way back to the beginning of 10.6 I just think is risky. Besides missing out on new features.
So trust me, it's all good. If you didn't already know, you update to Mountain Lion through the Mac App Store. And you have to be on... I think it was 10.6.8 to update. I do recommend unplugging all hard drives and monitors before updating OS.
I finally hit the point where the Safe Boot / Restart cycle fails to restore the brightness controls every single time. I cloned my iMac's drive to an external volume and restarted with the clone as the startup volume, then erased/partitioned the iMac's drive into Snow Leopard, Mt Lion, and Mavericks volumes. I cloned my clone back to the Snow Leopard partition and restarted from it, and then installed Mavericks in its own partition.
All went smoothly, but still no joy on the brightness front when started from Mt. Lion. When booted from Mavericks, the iMac's brightness controls have worked as expected through several reboots. Have not installed Mt. Lion, but probabbly will likely clone my MBPr to that volume if/when I get to the point that I want to migrate that machine to Mavericks.
tl;dr: 27" iMac10,1 on Mavericks 10.9.1 supports brightness controls when used as external monitor.