Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I bought a new SSD and a battery for my laptop (Thinkpad W520) recently and installed Linux.
Everything works fine when running on AC. However when I try to boot the system on battery the system shutsdown abruptly without warning anywhere between grub and the desktop. However, if I boot the system with AC power and run on the battery it's stable and works fine.
Same system on a different hard drive boot and runs perfectly well with Windows. That confirms that the problem lies in the Linux OS (configuration?, kernel?) not in the hardware. What might be causing this problem? Any help much appreciated!
Last edited by Fernandezz; 03-13-2018 at 06:35 AM.
AC = alternating current = the plug
DC = direct current = the battery.
you state you got a "new" battery. How much did it cost? $50 ~ 100 US Dollars? if less then the big chance is you got a "new" battery Old stock. with the batteries today they start to deprecate as soon as they are made. So the life expectancy is already becoming shorter before they're even put inside of the box to be shipped to the store.
So if you're saying I can boot up on AC but as soon as I unplug it Linux shuts off, it may be because you're battery is relatively old even though it may have came in original packaging. Therefore it is not holding a charge let alone actually being charged to the original 100 percent that is suppose to give you that 4 to 8 hours of battery life. Even though it maybe telling you it is charged 100 percent the "cells" do not actually hold a charge that will last as long as a "new" freshly made battery will.
send it back would be your best best.
also how long does Windows last on your battery?
the power settings on when to shut down depending on percent of battery power might be looked into as well.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
If the laptop shuts down on battery power but not on AC power, it tells me the battery is delivering less power than the AC. Try running the battery down as far as it will go, charge it up again for a good 10 hours with the laptop off. Then try it again.
Same system on a different hard drive boot and runs perfectly well with Windows. That confirms that the problem lies in the Linux OS (configuration?, kernel?) not in the hardware. What might be causing this problem? Any help much appreciated!
Don't know what the problem is. Not enough info. So far the replies are hardware related. Not software related.
Maybe dmesg might say something in /var/log. Just to show what is in my /var/log
Also. Not all hardware is equal sometimes. I bought a charger that freezes the touch pad when plugged in. This stuff happens sometimes. My solution to this ? I run a external wireless usb mouse when on the charger. It is a hardware problem though. Not software. Freezes in Windows also. Freezes in Android.
If the machine shuts down every time and at the same point in the boot process, and never actually finishes booting, then you'd be looking at some very obscure mis-configuration between Linux and your battery controller. There is a poweroff capability that is normally used when Linux finishes shutting-down on a laptop, and maybe that underlying facility is behaving wrongly. But, I must say, I think that the chances of this are very remote.
If the machine shuts down every time and at the same point in the boot process, and never actually finishes booting, then you'd be looking at some very obscure mis-configuration between Linux and your battery controller. There is a poweroff capability that is normally used when Linux finishes shutting-down on a laptop, and maybe that underlying facility is behaving wrongly. But, I must say, I think that the chances of this are very remote.
Earlier I could get to the desktop before 'shutting-down' (this is not graceful shutdown. It just 'dies' without any warning). Now it happens apparently at the same point between the grub and the login prompt. I tried a live (Debian stable) usb, and the result is the same.
Last edited by Fernandezz; 03-13-2018 at 09:34 AM.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
The laptop might not be cleanly shut down from Windows, i.e. Windows suspends the laptop to ram, which most laptops do when you just press the power button. That leaves the machine in a sleep state. So, when you boot into Linux there can be problems.
Try holding down the power button until the machine shuts off in Windows. Then boot Linux.
The laptop might not be cleanly shut down from Windows, i.e. Windows suspends the laptop to ram, which most laptops do when you just press the power button. That leaves the machine in a sleep state. So, when you boot into Linux there can be problems.
Try holding down the power button until the machine shuts off in Windows. Then boot Linux.
I would tell Windows to shut down and power off, then wait until it has actually done so. Cause it to completely wind-up its own affairs, whatever they might be, and then to turn the machine off.
I really appreciate all your replies. I'm not dual booting. I have two hard drives. One with Linux installed and the other with Windows 8.1. I just connected the hard drive with Windows just to test the other hardware and the battery. Everything worked fine when I booted the system with Windows (booting, running and shutting-down and everything works as it should). I experience this problem only with Linux. That also only when I boot the system on battery
To see if it is there. If it is installed already. You will see that in the readout also like so below
Code:
[installed]
To install it using terminal
Code:
sudo apt-get install inxi
Since this is a battery software issue. The more info members can see on your hardware. Like make and model that inxi will show. The better to help you out.
I find it weird there is no dmesg log in /var/log
After you boot debian. What does
Code:
dmesg | tail
say? I do not not expect to see any battery error messages till after the shutdown occurs. Because the command above is just running before shutdown occurs.
Also. Try finding old dmesg files with
Code:
sudo updatedb
let it finish updating the data base.
Code:
locate dmesg
Because /bin/dmesg should be on the 1st line of that readout if it is installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.