Currently Being Moderated09.08.2012 18:56 (in response to N4KHQ)
Interesting, so you are saying it is not whether the mac is sleeping, but instead whether the display is sleeping, which determines whether sharing will work. Clearly that is a bug on apple's part. The energy pref setting is to wake from sleep for network access. My guess is that this applies to true sleep, if it works at all, but not display sleep.
Currently Being Moderated09.08.2012 19:15 (in response to Perry Gershon)
I have tried with wake from sleep for network access on and off, it makes no difference. If the screen is awake, it works. If the screen is not awake, it wakes up but never displays and it won't go back to sleep until the force quite or restart.
I know now why everyone is not complaining. I have a iMac at work preference set the same, the iMac at work and the iMac at home are identical mid 2007 2.9 Core 2 duo 24" imacs. Both iMacs are running mountain lion and I can screen share from the home iMac to the office iMac display sleeping 100% of the time. The office iMas will only display the home iMac if I call my wife and get her to wake the display.
Currently Being Moderated09.08.2012 23:11 (in response to Perry Gershon)
Well, that is not the case with me. Screen sharing does not work even if the monitor (or TV in my case) is on. The connection still hangs, so this does not seem to be the issue. The Mac I am trying to connect to is a Lion Server that is hosting websites and mail and it never sleeps. Got optimistic when I saw someone beeing able to connect just by waking the monitor, but after limited testing that is at least not the solution for me.
Currently Being Moderated10.08.2012 02:15 (in response to Perry Gershon)
This is the only good workaround for me - I access a headless mac mini running Lion by using screen sharing. Since upgrading my laptop to ML screen sharing broke. The least intrusive workaround I've found is to ssh into the mini and run top to get the pid of any screensharing process running. Kill the process(es) and screen sharing then works fine. I've got into the habit of killing the process left behind in a session after closing screen share.
Apple - fix it! the ML screenshare app is leaving a rogue process running when it quits!
Currently Being Moderated10.08.2012 02:35 (in response to einarso)
Of course. I use terminal app. to access my mac mini with the ssh command (here is a good ttutorial -->> http://kb.mediatemple.net/questions/1599/Using+SSH+in+Terminal.app+%28Mac+OS+X%2 9#gs ). When I am logged in I run the 'top' command on the mac mini (http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ man1/top.1.html) to see a list of processes currently running by typing top + enter at the prompt. I look down the list of processes and note the PID (first column of the display) of any sharedscreen processes running. Then quit top with CTRl + c. For each sharescreen process running use the 'sudo kill xxxxx' command where xxxxx is the PID. I have found that if there are no screenshare processes running on the host, then starting a new screen share session always works. This approach has the advantage of not having to reboot the host or have any display attached as the workround is all done through the command line.
Currently Being Moderated10.08.2012 03:03 (in response to einarso)
Try just killing ScreensharingAgent. If I use MBP to view the iMac and the screen is awake and Activity Monitor run, ScreensharingAgent pop up in Activitory Monitor at the same time or a few seconds after the screen is shared on the MBP. If I close the shared screen window on the MBP the ScreensharingAgent contines to run for 15 seconds and then drops from Activity Monitor. If I screen share within the 15 seconds, it still works. Screen sharing works 100% of the time if the display is not sleeping (computer never sleeps). If the iMac display is sleeping and I try to connect, the dislpay on the iMac wakes, ScreensharingAgent is running but no screen sharing on the MBP. If I Force quite ScreensharingAgent, screen sharing pops up in the MBP and ScreensharingAgent is running in the activity monitor again.
Currently Being Moderated10.08.2012 08:54 (in response to rebel44)
This worked for me Nice to have a workaround untill Apple fixes this - hopefully in the first ML update. Thanks rebel44.
N4KHQ: The screen waking or sleeping has no effect for me.
Currently Being Moderated10.08.2012 10:12 (in response to einarso)
Can any one explain this one? I have to identical iMacs configured the same running ML system preference set the same. I can screen share on 100% the time if display is sleeping or awake. If I try to share the other direction going through a Sagem 1704 router with UPnP enabled I can not screen share unless the display is awake.
Currently Being Moderated10.08.2012 10:16 (in response to Perry Gershon)
--> Perry Gershon
Try disabling sleep on the Mac and see if that fixes it for 24hrs. If so, then it might be power management related.
I don't think that the screensharing process is responding properly after a wakeup event. The screensharing process is either hung or is not running in response to the wakeup event. Either way, it should launch when called. I can't debug the OS so, I don't know where the problem lies. I SSH into my MacMini when this occurs. Kill the screensharing process and then try again. ScreenShare always works after that. I've only had to do that once since disabling Display Sleep on the MacMini. It's a headless Mac Mini so, It doesn't matter anyway.
Some folks here in other discussions think that it might be related to the mutliple login via VNC capablity that ML now supports. Maybe the screensharing process is wating for a login password in another login that you can't see when you start a screensharing process from another Mac. Subsequently, the screenshare process is still waiting for the login and can't or won't respond to the current screenshare request.
Currently Being Moderated10.08.2012 10:54 (in response to mwakefield)
I have tried disabling VNC on everything and it stills hangs if host computer display is sleeping. Last week when I noticie the problem I was sure it was the router but I have added port forwarding to 5900 at least 20 time but it changes nothing. I really think it is a start issue with the ScreensharingAgent. What causes this is beyond me. with 3 macs at home:
and 1 mac at office
The home iMacML is the only one that won't screen share if display is sleeping. I can screen share from the home iMacML to the other three computers no matter the state of the display.
Currently Being Moderated10.08.2012 11:12 (in response to mwakefield)
The computer has always been on never sleep except when I have been experimenting with system preferences. If I tell the display to never sleep, it fixes the problem, don'y know about after 24 hours but is fixes it for the few hours. Wished I could reset the PRAM but every time I try from a restart or cold start by hold PR option command before the gray screen, I get one chime and it boots into recovery mode.