Kernel_task and windowserver high cpu
Please help me find a solution,
my macbook has been acting strange,
it freezes every few seconds for the las 4 days.
It all started one month ago, when the resolution of the screen changed all of a sudden as if there was another display
and it was trying to find the right resolution. That problem went away after checking system preferences. Then I noticed the brightness of the display would be set to 100% everytime I started the mac, It doesn't save the last setting applied. I still having been able to solve that.
Now, the mac started freezing constantly, it began happening 4 days ago, the OS just gets stuck,
no matter what application I'm using. I checked on Activity Monitor and shows a high cpu usage, both by kenerl_task and windowserver.
If I'm right windowserver is related to display options?
I really would like to find a solution, since there are times
where the mac is back to normal and everything works great.
MacBook, Mac OS X (10.6.8)