Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
toggle sata power management errors
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
albright
Advocate
Advocate


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

PostPosted: Sun Jan 05, 2014 8:51 pm    Post subject: toggle sata power management errors Reply with quote

Hi all - I have a brand new thinkpad T440s (which is all in all a
pretty magnificent machine; e.g. I am now surfing the web
with screen half bright using 5.77 watts!).

But enough of that. Here's the problem

If I toggle the sata power link management in powertop or
via laptop-mode (which happens with ac plug out or in
events), I get errors.

It seems that sata can be set to power save mode, but setting
it back to performance mode causes these errors.

Here are some from /var/log/messages from when the problem occurred;
the drive then becomes read only and I have to reboot by power button

Quote:
Jan 4 23:03:17 olwe kernel: ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
Jan 4 23:03:17 olwe kernel: ata1.00: failed to get NCQ Send/Recv Log Emask 0x1
Jan 4 23:03:17 olwe kernel: ata1.00: configured for UDMA/133
Jan 4 23:03:17 olwe kernel: ata1: EH complete


I can of course prevent this by disabling sata power management - it does not seem to
affect power use all that much that I can see.

However, my worry is that this is a hardware problem and I should get the machine replaced,
or is this a bug in the power management software?

There doesn't seem to be much on the web about this lately and I would welcome any
advice or help ...
_________________
.... 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
albright
Advocate
Advocate


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

PostPosted: Mon Jan 06, 2014 6:55 pm    Post subject: Reply with quote

small update on this

typically, the problem does not occur for mint linux; I can toggle
the /sys/class/scsi_host/hostX/link_power_management_policy
from min_power to max_performance either manually or via
powertop.

Since mint uses kernel 3.11.10 I built one with my config and
the problem persists in 3.11

must be something in my kernel config ... no idea what of course :cry:
_________________
.... 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
albright
Advocate
Advocate


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

PostPosted: Mon Jan 06, 2014 6:55 pm    Post subject: Reply with quote

small update on this

typically, the problem does not occur for mint linux; I can toggle
the /sys/class/scsi_host/hostX/link_power_management_policy
from min_power to max_performance either manually or via
powertop.

Since mint uses kernel 3.11.10 I built one with my config and
the problem persists in 3.11

must be something in my kernel config ... no idea what of course :cry:
_________________
.... 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
albright
Advocate
Advocate


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

PostPosted: Sat Jan 11, 2014 6:39 pm    Post subject: Reply with quote

more on this; the problem seems to be laptop-mode

at least, since disabling it, the problem has disappeared

I don't know what setting in laptop-mode would cause this
however.
_________________
.... 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
loneranger
n00b
n00b


Joined: 12 Apr 2014
Posts: 3
Location: canada

PostPosted: Sat Apr 12, 2014 3:47 am    Post subject: Reply with quote

albright wrote:
more on this; the problem seems to be laptop-mode

at least, since disabling it, the problem has disappeared

I don't know what setting in laptop-mode would cause this
however.


Hi albright,

I'm seeing the same issue on my desktop:
Code:
[    0.980795] ata3.00: failed to get NCQ Send/Recv Log Emask 0x1

I'm not using Gentoo (using Arch) but was hoping that you can give me any advice on where to look for the issue (was redirected here from Arch's forum)?

How serious is this error? Can I just ignore it (this SSD is being my ROOT drive)?

I tried to run SysLinux on the same machine and didn't notice any error messages from dmesg. I then compared SATA power profiles and in both cases they are max_performance...

I would appreciate your help!
Back to top
View user's profile Send private message
albright
Advocate
Advocate


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

PostPosted: Sat Apr 12, 2014 12:10 pm    Post subject: Reply with quote

Quote:
How serious is this error? Can I just ignore it (this SSD is being my ROOT drive)?


It's very serious and not ignorable. It will corrupt your SSD's filesystem leading to loss of data,
failed programs and possibly total system failure.

Please ignore what I said about laptop mode tools which is not the real reason for the
problem, which is the switching from min_power to max_performance in SATA power
link management.

If you are not doing this switching of power modes (and with a desktop, I would doubt
you are) then you should not see *this* particular problem.

My problem stems from bad firmware on some samsung ssds (same errors happen in
windows; see http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/T440s-is-killing-Samsung-840-pro-SSD-s/td-p/1366903).

My workaround is to use medium_power instead of min_power in SATA power management policy.
_________________
.... 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
loneranger
n00b
n00b


Joined: 12 Apr 2014
Posts: 3
Location: canada

PostPosted: Sun Apr 13, 2014 1:10 am    Post subject: Reply with quote

Thank you for your reply!

I tried to play with power profile changes but that didn't make any effect...I will keep looking:)

Thanks again!
Back to top
View user's profile Send private message
loneranger
n00b
n00b


Joined: 12 Apr 2014
Posts: 3
Location: canada

PostPosted: Fri Apr 18, 2014 2:07 am    Post subject: Reply with quote

I tested other distributions and found out that Ubuntu 12.04/13.10 (kernels 3.5/3.11.0 respectively) and SystemRescue 4.2 (kernel 3.10.30) don't have this issue with my SSD.
So it looks like there was a kernel change introduced in the recent kernels that is messing with my SSD drive.
From the diff for Ubuntu's kernels for 12.04 and 13.10 I was not able to figure out the change (too many changes). Could you give me a direction which part might be a problem?
I posted a kernel configs below (couldn't find Arch config changes, so posting Ubuntu's):
Ubuntu 13.10: http://kernel.ubuntu.com/~kernel-ppa/configs/saucy/amd64-config.flavour.generic
Ubuntu 14.04: http://kernel.ubuntu.com/~kernel-ppa/configs/trusty/amd64-config.flavour.generic
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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