Hello everyone before explaining my issue i will just say that i googled it beforehand, however to no avail, most of the answers were typical ones such as your battery might be old and needs to be replaced, so i decided to post more detailed post here in dell support. So let me further explain you my problem.
I've been having this computer for 2 years and it's been working fine up till recently (2 months ago) when it started reporting this problem, that the battery is faulty and consider replacing it. So i replaced it got the new battery, however this new battery from the beginning started to give me problems. It would charge fully, however sometimes when i unplug my laptop from the power cable and leave it to work just on battery, occasionally the laptop just turns off with out any prior warning or anything it just turns off, eventho the battery is fully charged let's say like 85%. Now when i try to turn the laptop on after that incident, it won't turn on but i must insert the power cable and only then it will turn on. So i was wondering why this might be happening. Note sometimes it can work 2 hours fine just using battery, sometimes it just randomly turns itself off after 15 minutes. I also realized when using battery only in windows sometimes it works fine sometimes after like 1 hour it randomly turns off, while in ubuntu it randomly switched off after 10-15 minutes and doesn't last long. Really weird behavior which i can't explain why. I also realized that my laptop get warmer when running ubuntu, than in windows so i was wondering if heat can be the issues, however it's not really warm, when i checked the temp. level it was around 65 degrees celsius. Any ideas??