Could low power stop a laptop from updating the hard drive?
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
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.
Could low power stop a laptop from updating the hard drive?
This morning I was nearly driven out of my mind by my inability to build gettext in LFS 8.2 on my Samsung laptop. The misbehaviour was weird, like nothing I've ever seen before. The build would crash at some random point because it couldn't find a file that it had just compiled, apparently successfully, in the previous step. This happened about three times in different places before I lost patience and shut the machine down.
I realised that power was probably low, so I put it on charge. When I got home from walking the dog, it was fully charged so I tried again and this time everything went smoothly.
It's an old laptop so I assume the hard drive is magnetic; it's certainly noisy enough. Is this kind of thing normal on laptops? Do they sometimes not sync when they are low?
How low was the battery? I would not expect that to be normal behavior and have you checked SMART or seen any hard drive or other errors?
Just a guess but there is a "knee" in the curve where the battery voltage starts to drop off when it gets low. In addition the total current may very depending on how hard the processor and hard drive is working which could cause the voltage to drop such that the regulator has problems. Maybe the file was lost in memory cache somewhere and was not actually written to the platter.
How low was the battery? I would not expect that to be normal behavior and have you checked SMART or seen any hard drive or other errors?
I didn't see any disk errors at the console. I haven't checked the logs yet. How do I get at SMART data?
Quote:
Maybe the file was lost in memory cache somewhere and was not actually written to the platter.
Yes, that's what I thought too.
@ondoho: This laptop usually switches itself off without warning when it gets down to 5% charge, so the battery must have contained more than that. According to the manual, it's supposed to just hibernate but that doesn't appear to work in Linux. This is the first time that I've seen lost files though.
I think I may have found the cause. kern.log showed no disk errors but a number of glibc segfaults. Why they didn't appear at the console I don't know (I'm building in a Linux virtual console) but they probably caused the crashes.
When building and checking glibc a few days ago, I noticed that a considerable number of math tests failed. glibc is known to behave badly in math tests when the processor is not intel or amd, so (after consulting with the LFS mailing list) I decided to go ahead anyway. After all, this is not my primary machine. And I was able to build gcc and binutils without incident, giving me a sane toolchain. All the test suites that I have run since then have performed normally until the business with gettext this morning.
It may well be that this LFS system is just a wee bit unstable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.