truck gauges, radio, power locks, and head lights will stop working. on 2001 GMC Sonoma

Sometimes driving down the road my dummy lights will flash and then my rpm/mph gauges will stop working. My power lockes,radeo and headlights will stop working also.
It acts like it has a ground wire shorting out.

Asked by for the 2001 GMC Sonoma