alumika1 0 Newbie Poster

I have a Gateway Laptop Model 3040. Its working fine when running on its power but it immediately logs off when i put the power code on. so i am charging the batery and use the laptop for 10 minutes then the powers goes off. So when i put direct power the computer is logging off amd the screen becomes black though i can see some words from the black screen
i desperately need help
regard
Peter