Computer does not wake from sleep


I have a G5 dual 1.8 GHz with 1gb ram 10.4.1. When my computer goes to sleep, pressing any key shuts the computer down therefore requiring a restart. If I select the setting "allow power button to sleep the computer" and press power key the same problem occurs. I had the same problem with earlier system 10s. I am getting over the problem by using screen saver and reluctantly shutting down when not in use for some time.