My laptop is 6 years old. There was no problem earlier but now it started shutting down randomly. Laptop battery indicator shows that it is battery problem. But I have noticed that, this problem occurs when charger is connected to it. There is no shutdown when I am using laptop on battery.
Holy cow, six years.. What's your secret? I've been a hardware junkie for (a moment please, I am doing the math) almost forty years and DC power has never been kind to me.
Let's assume your utility bills leave no room for the acquisition of a new laptop or you're just very fond of your current machine. . AC power is not a constant, there are spikes, surges, and even brownouts which occur so quickly they are unnoticeable. Keep all appliances - especially live ones that trigger events and make whirring sounds - fridge, microwave, air conditioner, razor, chainsaw etc., on a separate circuit from the one running the AC outlet you use to power your laptop. The same goes for every microchip bearing gadget in your home. Unless it's over twenty years old, this includes your toaster. Just stay away from the kitchen
if you're not sure which circuits run which outlets, plug some lamps in here and there and see what lights up or goes dark when you remove fuses.
Hey Kids, don't try this if you rent your home unless you're sure your sadistic landlord hasn't installed little traps to prevent you from upping the wattage. You'll spot the little buggers no problem...just walk away. Don;t share your computer circuit with the stuff that generates a signal. No tv;s or radios and certainly no phones. One power bar for one AC cable, and maybe a lamp.
Don't use just any power bar. Use a certified Surge Protector. There's a bunch of them. Do a search online for reviews and buying guides.
It's kind of ironic, but even the best surge protectors need replacing before well before six years...
It's all over when you need AC full time. The firmware in your laptop is looking to charge a battery, not run the BIOS. The unit won't be able to keep itself cool and that's a dangerous situation.