Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Users with laptops please help me debug an issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Mon Mar 26, 2018 10:42 pm    Post subject: Users with laptops please help me debug an issue Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Mon Mar 26, 2018 11:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 975
Location: The Village, Portmeirion

PostPosted: Mon Mar 26, 2018 11:26 pm    Post subject: Re: Users with laptops please help me debug an issue Reply with quote

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
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Mar 27, 2018 12:17 am    Post subject: Re: Users with laptops please help me debug an issue Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Tue Mar 27, 2018 12:31 am    Post subject: Reply with quote

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
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Mar 27, 2018 1:00 am    Post subject: Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Tue Mar 27, 2018 2:03 am    Post subject: Reply with quote

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
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 975
Location: The Village, Portmeirion

PostPosted: Tue Mar 27, 2018 2:19 am    Post subject: Reply with quote

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
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Mar 27, 2018 3:01 am    Post subject: Reply with quote

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
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 975
Location: The Village, Portmeirion

PostPosted: Tue Mar 27, 2018 4:20 am    Post subject: Reply with quote

Ouch, that's alot of stuff in there.
Back to top
View user's profile Send private message
karmaking
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2004
Posts: 82
Location: Berlin, Germany

PostPosted: Fri May 04, 2018 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1994

PostPosted: Sat May 05, 2018 8:42 am    Post subject: Reply with quote

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
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sat May 05, 2018 11:40 am    Post subject: Reply with quote

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
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 975
Location: The Village, Portmeirion

PostPosted: Tue May 08, 2018 8:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum