Finally got it fixed. Make sure you guys call Apple Support. The first tier tech support is not able to help you because they have not been trained for that You will have to speak to a senior advisor. There will be a lot of deleting of caches involved while in safe mode. After did all that my trackpad and keyboard is working again. Hope you'll get yours working too!
Umm I thought I just told you guys. There are a lot of folders and caches that need to be deleted, while in safe mode. There is no way I can remember all of them and their location, as I was not able to write down the step-by-step while I was on the phone with Apple Support. As I said, a senior advisor helped me. The first tier support was not able to.
I was able to solve this problem by moving all files under /Library/LaunchAgents/* and /Library/LaunchDemons/* /Library/StartupItems/* to the Desktop and then rebooting.
The problem went away. So obviously one of those files together with 10.8.2 is causing this problem.
Now I just need to add those files back one at a time (rebooting in between everytime) to see which file actually causes the problem.
I hope this info is of any use to you.
I have the same issue as you do. Keyboard and trackpad seems to go into sleep after some inactivity and takes a few seconds to "wake up" again.
I am using a Logitech wireless mouse using a nano-receiver. This mouse doesn't have the problem.
The problem seems to go away when I cleaned out the content of:
Actually I copied them and cleaned them afterwards. I havn't taken the time yet to put things back one by one, but here is my content for anyone to try to cross reference to see what might be offending agent/daemon:
bash-3.2# ls -lR /Library/Launch*.old /Library/StartupItems.old
-rw-r--r-- 1 root wheel 697 May 25 02:31 com.Logitech.Control Center.Daemon.plist
-rw-r--r-- 1 root wheel 788 Jul 27 12:51 com.google.keystone.agent.plist
-rwxr-xr-x 1 root wheel 395 Oct 14 2010 com.hp.devicemonitor.plist
-rw------- 1 root wheel 605 Aug 31 2011 com.dymo.pnpd.plist
-rw-r--r-- 1 root wheel 814 Jul 27 12:51 com.google.keystone.daemon.plist
-rw-r--r-- 1 root wheel 568 Mar 10 2011 com.microsoft.office.licensing.helper.plist
-rw-r--r-- 1 root admin 374 Feb 3 2012 com.telldus.service.plist
drwxr-xr-x 5 root wheel 170 Jan 10 2012 ChmodBPF
-rwxr-xr-x 1 root wheel 959 Jan 10 2012 ChmodBPF
-rwxr-xr-x 1 root wheel 2551 Jan 10 2012 README.macosx
-rwxr-xr-x 1 root wheel 84 Jan 10 2012 StartupParameters.plist
I my self suspect the Logitech driver as it has todo with USB.