MacBook Pro unusable when HDMI output is connected My new MacBook Pro Retina 13″ (OS X 10.10) gets completely unusable when I attach the HDMI cable to the HDMI port.

I have noticed that there are few processes that will start to consume crazy memory.
In particular "SystemUIServer" process, around 65 GB RAM (which I do not even have from an hardware perspective), and the "kernel_task" process several GBs of memory usage.

The problem is that the resolution of the screen is changed once the HDMI cable is plugged and, even after killing the SystemUIServer, if i try to open the monitor settings to change the resolution this task will hang for ever making the usage of the laptop connected with the beamer impossible.

I have tried to search on internet but seems that no one has got the same problem.
The following facts are relevant to the workaround.
  
  
  A separate copy of SystemUIServer runs on behalf of each user, owned by that user, when the user has a GUI login. This is very convenient because it means we can kill this program without requiring passwords and suchlike.
  SystemUIServer appears to have been very nicely cordoned off by Apple from the rest of the system so that you can kill it at any time and nothing bad happens. The menulings all disappear, then launch restarts SystemUIServer, and the menulings all reappear (in a much smaller memory environment).
  So the simple one-off solution to the problem is to type in Terminal: 
  killall SystemUIServer. And this works, but only once --- you will need to do it again in a week or so.
  The possibility I chose is to have launchd execute this command once a day, at a time when I'm probably not using the machine, namely 4:00am. (If your machine is asleep at that time, launchd in Snow Leopard performs the task when the machine is wakes up, and this works out OK --- we see just one more flash in the UI as the menulings are killed then restart, to accompany the various other flashes in the UI that occur when a wake occurs.
  


Source: Handle growing SystemUIServer memory usage