I have the same persistent problem with my 2005 LS V8, still happening. I read on another thread where a poorly charged battery can cause this. I activated the hood plunger manually several times thinking that might be stuck, no change. I was about to replace that switch, but thanks Joe for the troubleshooting steps, will definitely be trying these ASAP.
While working through my stereo problems, which caused the Limp Mode to kick in, occasionally I had the 'door ajar' warning on the dash. I'd open and close all the doors and sometimes restart the car and it would go away.
One thing I have noticed over time is that, when I double click the lock switch on the key fob, that often precedes an alarm going off a couple of hours later. Definitely will try to manual lock switch inside the car to get my sanity back.
Hood switch has to be easy to replace, right, for a guy that doesn't like to get his hands too dirty on cars anymore like me? What about the door switches? Do I have to take off door panels to get to that?