LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having 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


Reply
  Search this Thread
Old 06-22-2018, 08:26 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,477
Blog Entries: 19

Rep: Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409
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?
 
Old 06-22-2018, 10:28 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
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.
 
Old 06-22-2018, 10:37 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
imo, it shouldn't happen for an internal drive, there should be low-level mechanisms to simply switch the machine off (like with overheating).

but i have seen similar things for usb drives (and other devices) when they don't get enough power from the usb port.

of course it is possible that the battery is old and fluctuates wildly, something that software cannot predict reliably.

it is fairly common for software to ask the user to connect the laptop to the power supply before performing power hungry tasks; e.g. burning CDs.

edit:
oh, didn't see michaelk's post.
seems we are touching on similar aspects though.

Last edited by ondoho; 06-22-2018 at 10:40 AM.
 
Old 06-22-2018, 10:51 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,477

Original Poster
Blog Entries: 19

Rep: Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409
Quote:
Originally Posted by michaelk View Post
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.
 
Old 06-22-2018, 12:58 PM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,477

Original Poster
Blog Entries: 19

Rep: Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409
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.

Last edited by hazel; 06-22-2018 at 12:59 PM.
 
Old 06-22-2018, 01:47 PM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,207

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
To access Smart data on a drive, the short answer is the command smartctl, it has a detailed man page.

There are ways to make this a little easier. This link -->https://html5.litten.com/accessing-a...-m-a-r-t-data/ recommends using PartedMagic. I use Webmin most of the time. Hope this helps.
 
Old 06-22-2018, 02:19 PM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,477

Original Poster
Blog Entries: 19

Rep: Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409Reputation: 4409
Quote:
Originally Posted by camorri View Post
To access Smart data on a drive, the short answer is the command smartctl, it has a detailed man page.
Thanks a lot. smartctl turns out to be part of smartmontools, which is in BLFS. I think it would be worth installing, at least on the laptop.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ideas for a low cost, low power, low noise web server/torrent box alecjtaylor Linux - Hardware 13 01-10-2012 05:26 AM
My system does not put the hard drive in a low power state. stf92 Slackware 13 06-21-2010 02:39 PM
Help getting Netgear WG511T working on a low power laptop with Slack Agent0013 Linux - Wireless Networking 9 03-15-2009 05:52 PM
Hard Drive Partitioning Turns Laptop Power Off Compaq Evo N610c wkdude18 Linux - Hardware 3 07-02-2008 05:46 PM
DISCUSSION: Howto stop your laptop from crashing when power source is changed. bufo333 LinuxAnswers Discussion 1 07-24-2004 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 11:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration