View previous topic :: View next topic |
Author |
Message |
The_Document Apprentice
Joined: 03 Feb 2018 Posts: 275
|
Posted: Mon Mar 26, 2018 10:42 pm Post subject: Users with laptops please help me debug an issue |
|
|
Trying to debug an issue were hdd remounts after laptop is connected/disconnected. If your on a laptop please let me know if you get this:
Code: |
Disconnect Power Cable:
************************************************************************************
Dmesg:
[ 181.372505] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 181.380587] sd 0:0:0:0: [sda] Stopping disk
[ 181.451536] sd 0:0:0:0: [sda] Starting disk
[ 181.481492] EXT4-fs (sda4): re-mounted. Opts: data=ordered,commit=600
Connect Power Cable:
************************************************************************************
Dmesg:
[ 195.523805] EXT4-fs (sda4): re-mounted. Opts: data=ordered,commit=0 |
I verified its certainly not a kernel driver issue. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Mon Mar 26, 2018 11:13 pm Post subject: |
|
|
Need to be a bit more specific here...what the heck are you doing to trigger this? Connecting/disconnecting what? Power to the hard drive?
The root disk shouldn't/can't be unmounted without all applications with open writeable files. So no I've not seen this on my laptops. Especially SATA root disks.
I've not tried to study what it does with USB root disks. This could be a different situation. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 975 Location: The Village, Portmeirion
|
Posted: Mon Mar 26, 2018 11:26 pm Post subject: Re: Users with laptops please help me debug an issue |
|
|
Code: |
[18014.404282] sd 1:0:0:0: [sda] Synchronizing SCSI cache
[18014.412980] sd 1:0:0:0: [sda] Stopping disk
[18014.908901] sd 1:0:0:0: [sda] Starting disk |
I get this when unplug the power. Nothing about the filesystem remounting to change options. I'm using btrfs. |
|
Back to top |
|
|
The_Document Apprentice
Joined: 03 Feb 2018 Posts: 275
|
Posted: Tue Mar 27, 2018 12:17 am Post subject: Re: Users with laptops please help me debug an issue |
|
|
eccerr0r wrote: | what the heck are you doing to trigger this? |
Connecting / disconnecting power cord.
skellr wrote: | Code: |
[18014.404282] sd 1:0:0:0: [sda] Synchronizing SCSI cache
[18014.412980] sd 1:0:0:0: [sda] Stopping disk
[18014.908901] sd 1:0:0:0: [sda] Starting disk |
I get this when unplug the power. Nothing about the filesystem remounting to change options. I'm using btrfs. |
Why is gentoo the only linux distro that does this? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Tue Mar 27, 2018 12:31 am Post subject: |
|
|
It's probably flushing the disk cache unnecessarily? Are you using any desktop environment with power management? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
The_Document Apprentice
Joined: 03 Feb 2018 Posts: 275
|
Posted: Tue Mar 27, 2018 1:00 am Post subject: |
|
|
eccerr0r wrote: | It's probably flushing the disk cache unnecessarily? Are you using any desktop environment with power management? |
I got:
KDE power devil
laptop-mode-tools
apmd (laptop-mode useflag)
they are not the culprit cause I have this issue with all them not running. This has to be a userland issue either some RC service isn't started or some critical app isnt installed. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Tue Mar 27, 2018 2:03 am Post subject: |
|
|
Apmd? Do you have an older machine or do you mean acpid?
Are you using acpid, and does it do it without acpid running?
Something is triggering your software stack when the charger is removed, usually it's acpid but perhaps apmd also supports it... how that event is handled is what we need to look at... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 975 Location: The Village, Portmeirion
|
Posted: Tue Mar 27, 2018 2:19 am Post subject: |
|
|
Yes
It's something in laptop mode. edit /etc/laptop-mode/laptop-mode.conf to disable it and it will really stop. Just stopping the lm "daemon" won't disable it if something else calls it. |
|
Back to top |
|
|
The_Document Apprentice
Joined: 03 Feb 2018 Posts: 275
|
Posted: Tue Mar 27, 2018 3:01 am Post subject: |
|
|
It was certainly laptop-mode-tools I tested by unmerging it. After all my blames on the kernel see here:
https://forums.gentoo.org/viewtopic-p-8199708.html#8199708
https://www.linuxquestions.org/questions/showthread.php?p=5834652#post5834652
https://www.linuxquestions.org/questions/showthread.php?p=5834967#post5834967
I even made an initramfs of 245MB and used ubuntus kernel config (which enables all options) it turns out its just laptop mode tools. I was even considering distro hopping to kubuntu, I want gentoo because with Kubuntu I sacrifice true the command line interface and use the equivalent of the linux version of windows which means there is hardly any command line.
Problem resolved and resolved with a post to the chat forum not to hardware or other forum boards.
Let me tell you guys that a 245MB initramfs takes like 4-8 seconds to load. I am very happy I resolved this issue.
I can finally remove the huge space requirement of the modules and other uneeded kernel files:
Code: | zakhar@laptop ~ $ du -sh /lib/modules/4.15.10-gentoo/
3.7G /lib/modules/4.15.10-gentoo/
zakhar@laptop ~ $ du -sh /usr/src/linux-4.15.10-gentoo/
16G /usr/src/linux-4.15.10-gentoo/ |
|
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 975 Location: The Village, Portmeirion
|
Posted: Tue Mar 27, 2018 4:20 am Post subject: |
|
|
Ouch, that's alot of stuff in there. |
|
Back to top |
|
|
karmaking Tux's lil' helper
Joined: 11 Feb 2004 Posts: 82 Location: Berlin, Germany
|
Posted: Fri May 04, 2018 8:13 pm Post subject: |
|
|
Same here, could fix it with disabling laptop-mode.
Or rather work around it, I'd say.
Any thoughts on how to actually fix this? Fwiw, I'd rather like my lm enabled. What could be the offender here to call it like that all the time?
Cheers, D. |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1999
|
Posted: Sat May 05, 2018 8:42 am Post subject: |
|
|
I've been setting up a new laptop, and had problems with laptop_mode_tools, such as unexpectledly frequent hard disk spin down. The box also had pm-utils, which duplicates a fair bit of laptop_mode_tools, so I removed one, leaving just pm-utils. That seems to be better. Your mileage will vary. _________________ Greybeard |
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Sat May 05, 2018 11:40 am Post subject: |
|
|
FWIW, I have found tlp works better than laptop-mode-tools;
lots of control over hard disks etc. _________________ .... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme) |
|
Back to top |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 975 Location: The Village, Portmeirion
|
Posted: Tue May 08, 2018 8:48 pm Post subject: |
|
|
karmaking wrote: | Same here, could fix it with disabling laptop-mode.
Or rather work around it, I'd say.
Any thoughts on how to actually fix this? Fwiw, I'd rather like my lm enabled. What could be the offender here to call it like that all the time?
Cheers, D. |
"LM" was just a Bash script. I read through the config and tried to disable the OP's undesired behavior though "obvious" config options to no effect/ I had to completely disable it or unmerge it to avoid the behavior. good luck if you have the time ); |
|
Back to top |
|
|
|