[Bug 1629512] Re: HDD failed command: SET FEATURES error

2017-03-23 Thread Jean-Pierre van Riel
I too see this error for Seagate 'ST3500418AS' SATA drives via 88SE9123
PCIe SATA 6.0 Gb/s controller (Ubuntu 16.04.2, latest 4.8 Kernel)


```
exception Emask 0x1 SAct 0x0 SErr 0x0 action 0x0
irq_stat 0x4001
failed command: SET FEATURES
cmd ef/05:fe:00:00:00/00:00:00:00:00/40 tag 4
status: { DRDY ERR }
error: { ABRT }
```

Note:

- `Emask 0x1` = "device reported error"
- `status: { DRDY ERR }` = device ready, but with error

If it relates to other posts on the internet, it might be benign and
simply failed power management setting attempts, or the like via the
Marvel controller.

To note, I have other SSD drives in the system that are connected via a
different controller (SB850) and also don't support APM, but they don't
exhibit this error!


`cmd ef/05:fe:00:00:00/00:00:00:00:00/40` requires understanding ATA commands 
to know what the above command is attempting. As per the "Enable/disable 
advanced power management" section of the ATA.8 standard:

- "Subcommand code `05h` allows the host to enable Advanced Power Management."
- `FEh` = Maximum performance

So this confirms:

- ATA command = ef = SET FEATURE
- ATA Feature = 05 = Advanced Power Management4
- ATA NSect = fe = 254 = Maximum performance
- remainder of string ":00:00:00/00:00:00:00:00/40" is addressing 

SOMETHING during boot is trying to set APM on drives that don't support
it!!!

I checked udev rules - this doesn't seem to be udev...

```
$ grep -r hdparm /lib/udev/*
/lib/udev/hdparm:. /lib/hdparm/hdparm-functions
/lib/udev/hdparm:   if grep -wq nohdparm /proc/cmdline ; then
/lib/udev/hdparm:OPTIONS=$(hdparm_options $DEVNAME)
/lib/udev/hdparm:   /sbin/hdparm $OPTIONS $DEVNAME 2>/dev/null
/lib/udev/rules.d/85-hdparm.rules:ACTION=="add", SUBSYSTEM=="block", 
KERNEL=="[sh]d[a-z]", RUN+="/lib/udev/hdparm"
```

Tracing the udev -> hdparm scritping, I found that in 
`/lib/hdparm/hdparm-functions`, there is `hdparm_options()` and 
`hdparm_try_apm()`, which might default to `hdparm_set_option -B254`
```

and

```
hdparm_try_apm()
{
# set our default global apm policy here.
if [ -z "$ID_PATH" ]; then
local ID_PATH="$(udevadm info -n "$1" -q property 2>/dev/null | sed -n 
's/^ID_PATH=//p')" || true
fi
case $ID_PATH in
pci-*-ieee1394-*|pci-*-usb-*)
return 1
;;
esac
return 0
}
```

But in my case, when I query udev properties for the device, I see this

```
$ udevadm info -n /dev/sdg
...
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
...
```

But I do not see `ID_ATA_FEATURE_SET_APM=1` so udev is, or it shouldn't
be setting APM on my drive that doesn't support it...

So if it's not the normal system udev rules, I wondered if it might be
something about the init on initramfs trying to enable this, given that
does try to load block device drivers and probably runs udev rules in
preparation for mounting root. I uncompressed initramfs, but failed to
identify anything that sets the APM on drives that don't support it.

So it's still a mystery why APM is attempted when, clearly, it's obvious
the drives don't support it, and also, why only the HDD drives on the
marvel controller vs other SSDs (not on Marvel) that don't have APM?

Also, if I force `sudo hdparm -B 254 /dev/sdg` and tail
/var/log/kern.log, I can't trigger that same error seen during boot.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1629512] Re: HDD failed command: SET FEATURES error

2016-10-15 Thread Boby
I have posted the issue on ubuntu fourms.

Another user also face same issue. Both of us have Marvel controller.

https://ubuntuforums.org/showthread.php?t=2338519=13556996#post13556996

Host: scsi15 Channel: 00 Id: 00 Lun: 00
  Vendor: Marvell  Model: 91xx Config  Rev: 1.01
  Type:   ProcessorANSI  SCSI revision: 05

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1629512] Re: HDD failed command: SET FEATURES error

2016-10-03 Thread Boby
I tried kernel 4.8, but i have same error as in v4.4.

I switched back to v4.4 as my graphics driver (nvidia) not working with
new kernel (on login, i get logged off to login screen again and low
resolution).


root@hon-pc-01:~# dpkg -l | grep linux-image | grep ii
ii  linux-image-4.4.0-36-generic   4.4.0-36.55  
   amd64Linux kernel image for version 4.4.0 on 
64 bit x86 SMP
ii  linux-image-4.4.0-38-generic   4.4.0-38.57  
   amd64Linux kernel image for version 4.4.0 on 
64 bit x86 SMP
ii  linux-image-4.8.0-040800-generic   4.8.0-040800.201610022031
   amd64Linux kernel image for version 4.8.0 on 
64 bit x86 SMP
ii  linux-image-extra-4.4.0-36-generic 4.4.0-36.55  
   amd64Linux kernel extra modules for version 
4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-38-generic 4.4.0-38.57  
   amd64Linux kernel extra modules for version 
4.4.0 on 64 bit x86 SMP
ii  linux-image-generic4.4.0.38.40  
   amd64Generic Linux kernel image
root@hon-pc-01:~# 


** Changed in: linux (Ubuntu)
   Status: Incomplete => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1629512] Re: HDD failed command: SET FEATURES error

2016-10-03 Thread Joseph Salisbury
Would it be possible for you to test the latest upstream kernel? Refer
to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest
v4.8 kernel[0].

If this bug is fixed in the mainline kernel, please add the following
tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag:
'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as
"Confirmed".


Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8


** Changed in: linux (Ubuntu)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu)
   Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1629512] Re: HDD failed command: SET FEATURES error

2016-10-01 Thread Boby
** Changed in: linux (Ubuntu)
   Status: Incomplete => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1629512] Re: HDD failed command: SET FEATURES error

2016-09-30 Thread Boby
apport information

** Tags added: apport-collected xenial

** Description changed:

  When my computer boots, i get a screen with following errors
  
  [9.470860] ata6.00: exception Emask 0x1 SAct 0x0 SErr 0x0 action 0x0
  [9.470880] ata6.00: irq_stat 0x4001
  [9.470893] ata6.00: failed command: SET FEATURES
  [9.470908] ata6.00: cmd ef/05:fe:00:00:00/00:00:00:00:00/40 tag 29
  [9.470908]  res 51/04:fe:00:00:00/00:00:00:00:00/40 Emask 0x1 
(device error)
  [9.470942] ata6.00: status: { DRDY ERR }
  [9.470954] ata6.00: error: { ABRT }
  [9.506904] ata5.00: exception Emask 0x1 SAct 0x0 SErr 0x0 action 0x0
  [9.506944] ata5.00: irq_stat 0x4001
  [9.506974] ata5.00: failed command: SET FEATURES
  [9.507008] ata5.00: cmd ef/05:fe:00:00:00/00:00:00:00:00/40 tag 26
  [9.507008]  res 51/04:fe:00:00:00/00:00:00:00:00/40 Emask 0x1 
(device error)
  [9.507083] ata5.00: status: { DRDY ERR }
  [9.507110] ata5.00: error: { ABRT }
  
  I stays there for like a minute before continue booting.
  
  It started after i upgrade to Ubuntu 16.04, i had no such errors with
  both HDD on Ubuntu 14.04
  
  The HDDs are western digital WDC WD20EZRX-00D. Both purchased same time.
+ --- 
+ ApportVersion: 2.20.1-0ubuntu2.1
+ Architecture: amd64
+ AudioDevicesInUse:
+  USERPID ACCESS COMMAND
+  /dev/snd/controlC2:  boby   2509 F pulseaudio
+  /dev/snd/pcmC0D0p:   boby   2509 F...m pulseaudio
+  /dev/snd/controlC0:  boby   2509 F pulseaudio
+  /dev/snd/controlC1:  boby   2509 F pulseaudio
+ CurrentDesktop: Unity
+ DistroRelease: Ubuntu 16.04
+ HibernationDevice: RESUME=UUID=6c36e74e-a467-4b4c-a6b0-edd20249754f
+ InstallationDate: Installed on 2016-05-31 (122 days ago)
+ InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 
(20160420.1)
+ MachineType: System manufacturer System Product Name
+ NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
+ Package: linux (not installed)
+ ProcFB:
+  
+ ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-38-generic 
root=UUID=01f82bf5-45f1-4509-bdb3-44a51665830f ro quiet splash
+ ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
+ RelatedPackageVersions:
+  linux-restricted-modules-4.4.0-38-generic N/A
+  linux-backports-modules-4.4.0-38-generic  N/A
+  linux-firmware1.157.3
+ RfKill:
+  0: phy0: Wireless LAN
+   Soft blocked: no
+   Hard blocked: no
+ Tags:  xenial
+ Uname: Linux 4.4.0-38-generic x86_64
+ UpgradeStatus: No upgrade log present (probably fresh install)
+ UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
+ _MarkForUpload: True
+ dmi.bios.date: 12/21/2010
+ dmi.bios.vendor: American Megatrends Inc.
+ dmi.bios.version: 0802
+ dmi.board.asset.tag: To Be Filled By O.E.M.
+ dmi.board.name: SABERTOOTH X58
+ dmi.board.vendor: ASUSTeK Computer INC.
+ dmi.board.version: Rev 1.xx
+ dmi.chassis.asset.tag: Asset-1234567890
+ dmi.chassis.type: 3
+ dmi.chassis.vendor: Chassis Manufacture
+ dmi.chassis.version: Chassis Version
+ dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvr0802:bd12/21/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnSABERTOOTHX58:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
+ dmi.product.name: System Product Name
+ dmi.product.version: System Version
+ dmi.sys.vendor: System manufacturer

** Attachment added: "AlsaInfo.txt"
   
https://bugs.launchpad.net/bugs/1629512/+attachment/4752161/+files/AlsaInfo.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1629512] Re: HDD failed command: SET FEATURES error

2016-09-30 Thread Boby
version.log attached.

** Attachment added: "version.log"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+attachment/4752160/+files/version.log

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629512

Title:
  HDD failed command: SET FEATURES error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1629512/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs