# Recompile Kernel on every third reboot?

## Azimoth

Hi to all,

I have a problem that seems rather strange to me:

Epilogue:

I successfully installed Gentoo on my Macbook Pro following Sakaki's EFI Install Guide.  

After a few months of flawless Gentoo usage my Macbook did not find ANY OS (there are three available) and showed the "prohibited sign" at boot, which lead me to think the drive was dead, but it turned out it booted from USB without problems.

So I replaced the cable, which connects the hard drive with the logic board and it showed up again.

NOW:

The drive showed up again, but it did not boot as before. It gets stuck very early in the boot process showing only the white screen (which it does while searching for bootable OSs). I booted the Gentoo Live image, recompiled the kernel (4.4.21) using Sakaki's buildkernel (includinge "make clean") and everything was fine. I booted into OSX and WIN10 to make sure everything was working (which it was) and back to Gentoo.

During the second boot I noticed some messages that looked like "error" seemed new to me, but were too fast for me to read. I rebooted to find me stuck in the same state as before recompiling. This pattern seems to continue (simply updating the kernel via buildkernel is not sufficient, it apparently has to be rebuilt from scratch). The only hint I have are the error messages I mentioned (see below, dmesg revealed them)

Does anyone have a clue what my problem is (apparently the hard drive)?

Thanks a lot!

```

[   29.548237] ata1.00: exception Emask 0x10 SAct 0x3000 SErr 0x280100 action 0x6 frozen

[   29.548242] ata1.00: irq_stat 0x08000000, interface fatal error

[   29.548245] ata1: SError: { UnrecovData 10B8B BadCRC }

[   29.548249] ata1.00: failed command: READ FPDMA QUEUED

[   29.548254] ata1.00: cmd 60/80:60:d8:a2:d3/02:00:0e:00:00/40 tag 12 ncq 327680 in

                        res 40/00:68:e0:93:71/00:00:0c:00:00/40 Emask 0x10 (ATA bus error)

[   29.548257] ata1.00: status: { DRDY }

[   29.548258] ata1.00: failed command: READ FPDMA QUEUED

[   29.548263] ata1.00: cmd 60/20:68:e0:93:71/00:00:0c:00:00/40 tag 13 ncq 16384 in

                        res 40/00:68:e0:93:71/00:00:0c:00:00/40 Emask 0x10 (ATA bus error)

[   29.548265] ata1.00: status: { DRDY }

[   29.548270] ata1: hard resetting link

[   29.853351] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   29.853698] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   29.853838] ata1.00: supports DRM functions and may not be fully accessible

[   29.854254] ata1.00: disabling queued TRIM support

[   29.855014] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   29.855065] ata1.00: supports DRM functions and may not be fully accessible

[   29.855290] ata1.00: disabling queued TRIM support

[   29.855699] ata1.00: configured for UDMA/133

[   29.855726] ata1: EH complete

[   30.296248] ata1.00: exception Emask 0x10 SAct 0x8 SErr 0x280100 action 0x6 frozen

[   30.296253] ata1.00: irq_stat 0x08000000, interface fatal error

[   30.296256] ata1: SError: { UnrecovData 10B8B BadCRC }

[   30.296259] ata1.00: failed command: READ FPDMA QUEUED

[   30.296264] ata1.00: cmd 60/00:18:38:a4:95/0a:00:43:00:00/40 tag 3 ncq 1310720 in

                        res 40/00:18:38:a4:95/00:00:43:00:00/40 Emask 0x10 (ATA bus error)

[   30.296266] ata1.00: status: { DRDY }

[   30.296272] ata1: hard resetting link

[   30.601348] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   30.601641] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   30.601692] ata1.00: supports DRM functions and may not be fully accessible

[   30.601951] ata1.00: disabling queued TRIM support

[   30.602556] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   30.602608] ata1.00: supports DRM functions and may not be fully accessible

[   30.602819] ata1.00: disabling queued TRIM support

[   30.603161] ata1.00: configured for UDMA/133

[   30.603182] ata1: EH complete

[   31.430297] ata1.00: exception Emask 0x10 SAct 0x1e0 SErr 0x280100 action 0x6 frozen

[   31.430302] ata1.00: irq_stat 0x08000000, interface fatal error

[   31.430305] ata1: SError: { UnrecovData 10B8B BadCRC }

[   31.430308] ata1.00: failed command: READ FPDMA QUEUED

[   31.430313] ata1.00: cmd 60/00:28:c8:dd:49/08:00:0d:00:00/40 tag 5 ncq 1048576 in

                        res 40/00:40:10:98:27/00:00:45:00:00/40 Emask 0x10 (ATA bus error)

[   31.430316] ata1.00: status: { DRDY }

[   31.430318] ata1.00: failed command: READ FPDMA QUEUED

[   31.430323] ata1.00: cmd 60/78:30:c8:e5:49/08:00:0d:00:00/40 tag 6 ncq 1110016 in

                        res 40/00:40:10:98:27/00:00:45:00:00/40 Emask 0x10 (ATA bus error)

[   31.430325] ata1.00: status: { DRDY }

[   31.430327] ata1.00: failed command: READ FPDMA QUEUED

[   31.430332] ata1.00: cmd 60/d8:38:20:8b:27/03:00:45:00:00/40 tag 7 ncq 503808 in

                        res 40/00:40:10:98:27/00:00:45:00:00/40 Emask 0x10 (ATA bus error)

[   31.430334] ata1.00: status: { DRDY }

[   31.430336] ata1.00: failed command: READ FPDMA QUEUED

[   31.430340] ata1.00: cmd 60/98:40:10:98:27/02:00:45:00:00/40 tag 8 ncq 339968 in

                        res 40/00:40:10:98:27/00:00:45:00:00/40 Emask 0x10 (ATA bus error)

[   31.430343] ata1.00: status: { DRDY }

[   31.430348] ata1: hard resetting link

[   31.466693] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)

[   31.485955] ERROR @wl_cfg80211_scan : WLC_SCAN error (-22)

[   31.736357] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   31.737990] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   31.738039] ata1.00: supports DRM functions and may not be fully accessible

[   31.738311] ata1.00: disabling queued TRIM support

[   31.739143] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   31.739201] ata1.00: supports DRM functions and may not be fully accessible

[   31.739411] ata1.00: disabling queued TRIM support

[   31.739790] ata1.00: configured for UDMA/133

[   31.739815] ata1: EH complete

[   31.824293] ata1: limiting SATA link speed to 3.0 Gbps

[   31.824298] ata1.00: exception Emask 0x10 SAct 0x380000 SErr 0x280100 action 0x6 frozen

[   31.824299] ata1.00: irq_stat 0x08000000, interface fatal error

[   31.824301] ata1: SError: { UnrecovData 10B8B BadCRC }

[   31.824304] ata1.00: failed command: READ FPDMA QUEUED

[   31.824307] ata1.00: cmd 60/00:98:c8:61:c7/08:00:0e:00:00/40 tag 19 ncq 1048576 in

                        res 40/00:a8:c8:71:c7/00:00:0e:00:00/40 Emask 0x10 (ATA bus error)

[   31.824309] ata1.00: status: { DRDY }

[   31.824310] ata1.00: failed command: READ FPDMA QUEUED

[   31.824313] ata1.00: cmd 60/00:a0:c8:69:c7/08:00:0e:00:00/40 tag 20 ncq 1048576 in

                        res 40/00:a8:c8:71:c7/00:00:0e:00:00/40 Emask 0x10 (ATA bus error)

[   31.824314] ata1.00: status: { DRDY }

[   31.824315] ata1.00: failed command: READ FPDMA QUEUED

[   31.824318] ata1.00: cmd 60/00:a8:c8:71:c7/08:00:0e:00:00/40 tag 21 ncq 1048576 in

                        res 40/00:a8:c8:71:c7/00:00:0e:00:00/40 Emask 0x10 (ATA bus error)

[   31.824319] ata1.00: status: { DRDY }

[   31.824322] ata1: hard resetting link

[   32.130411] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 320)

[   32.132113] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   32.132280] ata1.00: supports DRM functions and may not be fully accessible

[   32.132649] ata1.00: disabling queued TRIM support

[   32.133399] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   32.133450] ata1.00: supports DRM functions and may not be fully accessible

[   32.133691] ata1.00: disabling queued TRIM support

[   32.134074] ata1.00: configured for UDMA/133

[   32.134098] ata1: EH complete

```

----------

## Logicien

Are you sure that your hard drive is detected the same way than before you change the connector cable? If no, the hard drives and partitions numbers must have change what prevent a normal boot according to the previous configuration. You should do a Fsck on all filesystems of the hard drive.

----------

## Azimoth

Nope, not at all, and I don't know how to detect it properly. The PARTUUID revealed by blkid remained the same, but that's all I knew how to check.

Fsck revealed some orphaned files on the EFI partitions, but removing them did not help eventually. The other partitions did not give any output. :/

(I don't know for sure why. I assume it's caused by LUKS...)

My last approach now is that I removed the EFI partition (backing it up before), recreated it from scratch (using parted), copied back the Apple files from the backup and reconfigured the (now changed) PARTUUID for this partition and once again started recompiling.

Either it works, or I'll redo the whole system over the weekend. 

Hipp hipp hooray for available backups  :Wink: 

UNLESS... you have a better solution? (I'd really prefer fixing the existing system over creating a new one)

----------

## Azimoth

Apparently this solved my issue... I rebooted several times successfully now...

The error messages remain, but are reduced in their extend:

 *Quote:*   

> 
> 
> [  236.210120] ata1.00: exception Emask 0x10 SAct 0x6000000 SErr 0x280100 action 0x6 frozen
> 
> [  236.210131] ata1.00: irq_stat 0x08000000, interface fatal error
> ...

 

Is there a chance to fix this without rebuilding the system?

----------

## NeddySeagoon

Azimoth,

```
[   30.296248] ata1.00: exception Emask 0x10 SAct 0x8 SErr 0x280100 action 0x6 frozen

[   30.296253] ata1.00: irq_stat 0x08000000, interface fatal error

[   30.296256] ata1: SError: { UnrecovData 10B8B BadCRC }

[   30.296259] ata1.00: failed command: READ FPDMA QUEUED

[   30.296264] ata1.00: cmd 60/00:18:38:a4:95/0a:00:43:00:00/40 tag 3 ncq 1310720 in

                        res 40/00:18:38:a4:95/00:00:43:00:00/40 Emask 0x10 (ATA bus error) 
```

Something is very sick.  It appears to be SATA bus issue.

That means, its the drive, the SATA cable, the SATA port on the motherboard or the SATA controller on the motherboard.

There are a few more unlikely causes too but we will check out the easy ones first.

Try a new SATA cable. Try another SATA port on the motherboard and post your 

```
smartctl -x /dev/... 
```

for that drive.

You will need to emerge smartmontools if you don't have that command.

All this error recovery takes a lot of time, so the HDD is much slower than usual.

----------

## Azimoth

Well... I got stuck on the "white screen" again, but this time it recovered without recompilation...

I really don't know how to find the root of all this

Below is the output of "smartctl -x /dev/sda". 

I should mention, that I have TWO hard drives in my machine. And I don't know which one is referred to as "ata1.00" in the dmesg logs.

So MAYBE these errors are not caused by the SSD (/dev/sda), which is responsible for EFI and OS partitions, but by the non-SSD disk.

Which part is the important part?

```

smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.4.21-gentoo] (local build)

Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Family:     Samsung based SSDs

Device Model:     Samsung SSD 850 EVO 1TB

Serial Number:    S2RFNX0H512359V

LU WWN Device Id: 5 002538 d40f047aa

Firmware Version: EMT02B6Q

User Capacity:    1.000.204.886.016 bytes [1,00 TB]

Sector Size:      512 bytes logical/physical

Rotation Rate:    Solid State Device

Form Factor:      2.5 inches

Device is:        In smartctl database [for details use: -P show]

ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c

SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is:    Fri Oct 21 07:14:40 2016 CEST

SMART support is: Available - device has SMART capability.

SMART support is: Enabled

AAM feature is:   Unavailable

APM feature is:   Unavailable

Rd look-ahead is: Enabled

Write cache is:   Enabled

ATA Security is:  Disabled, frozen [SEC2]

Wt Cache Reorder: Enabled

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

General SMART Values:

Offline data collection status:  (0x00)   Offline data collection activity

               was never started.

               Auto Offline Data Collection: Disabled.

Self-test execution status:      (   0)   The previous self-test routine completed

               without error or no self-test has ever 

               been run.

Total time to complete Offline 

data collection:       (    0) seconds.

Offline data collection

capabilities:           (0x53) SMART execute Offline immediate.

               Auto Offline data collection on/off support.

               Suspend Offline collection upon new

               command.

               No Offline surface scan supported.

               Self-test supported.

               No Conveyance Self-test supported.

               Selective Self-test supported.

SMART capabilities:            (0x0003)   Saves SMART data before entering

               power-saving mode.

               Supports SMART auto save timer.

Error logging capability:        (0x01)   Error logging supported.

               General Purpose Logging supported.

Short self-test routine 

recommended polling time:     (   2) minutes.

Extended self-test routine

recommended polling time:     ( 512) minutes.

SCT capabilities:           (0x003d)   SCT Status supported.

               SCT Error Recovery Control supported.

               SCT Feature Control supported.

               SCT Data Table supported.

SMART Attributes Data Structure revision number: 1

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE

  5 Reallocated_Sector_Ct   PO--CK   100   100   010    -    0

  9 Power_On_Hours          -O--CK   099   099   000    -    1530

 12 Power_Cycle_Count       -O--CK   099   099   000    -    717

177 Wear_Leveling_Count     PO--C-   099   099   000    -    3

179 Used_Rsvd_Blk_Cnt_Tot   PO--C-   100   100   010    -    0

181 Program_Fail_Cnt_Total  -O--CK   100   100   010    -    0

182 Erase_Fail_Count_Total  -O--CK   100   100   010    -    0

183 Runtime_Bad_Block       PO--C-   100   099   010    -    0

187 Uncorrectable_Error_Cnt -O--CK   100   100   000    -    0

190 Airflow_Temperature_Cel -O--CK   075   049   000    -    25

195 ECC_Error_Rate          -O-RC-   200   200   000    -    0

199 CRC_Error_Count         -OSRCK   095   095   000    -    4627

235 POR_Recovery_Count      -O--C-   099   099   000    -    118

241 Total_LBAs_Written      -O--CK   099   099   000    -    7663253591

                            ||||||_ K auto-keep

                            |||||__ C event count

                            ||||___ R error rate

                            |||____ S speed/performance

                            ||_____ O updated online

                            |______ P prefailure warning

General Purpose Log Directory Version 1

SMART           Log Directory Version 1 [multi-sector log support]

Address    Access  R/W   Size  Description

0x00       GPL,SL  R/O      1  Log Directory

0x01           SL  R/O      1  Summary SMART error log

0x02           SL  R/O      1  Comprehensive SMART error log

0x03       GPL     R/O      1  Ext. Comprehensive SMART error log

0x06           SL  R/O      1  SMART self-test log

0x07       GPL     R/O      1  Extended self-test log

0x09           SL  R/W      1  Selective self-test log

0x10       GPL     R/O      1  SATA NCQ Queued Error log

0x11       GPL     R/O      1  SATA Phy Event Counters log

0x13       GPL     R/O      1  SATA NCQ Send and Receive log

0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log

0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log

0xa1           SL  VS      16  Device vendor specific log

0xa5           SL  VS      16  Device vendor specific log

0xce           SL  VS      16  Device vendor specific log

0xe0       GPL,SL  R/W      1  SCT Command/Status

0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (1 sectors)

No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error

# 1  Short offline       Completed without error       00%       471         -

# 2  Extended offline    Aborted by host               90%       471         -

SMART Selective self-test log data structure revision number 1

 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS

    1        0        0  Not_testing

    2        0        0  Not_testing

    3        0        0  Not_testing

    4        0        0  Not_testing

    5        0        0  Not_testing

  255        0    65535  Read_scanning was never started

Selective self-test flags (0x0):

  After scanning selected spans, do NOT read-scan remainder of disk.

If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3

SCT Version (vendor specific):       256 (0x0100)

SCT Support Level:                   1

Device State:                        Active (0)

Current Temperature:                     ? Celsius

Power Cycle Min/Max Temperature:      ?/ ? Celsius

Lifetime    Min/Max Temperature:     24/49 Celsius

Under/Over Temperature Limit Count:   0/0

SCT Temperature History Version:     2

Temperature Sampling Period:         1 minute

Temperature Logging Interval:        10 minutes

Min/Max recommended Temperature:      0/70 Celsius

Min/Max Temperature Limit:            0/70 Celsius

Temperature History Size (Index):    128 (37)

Index    Estimated Time   Temperature Celsius

  38    2016-10-20 10:00    30  ***********

  39    2016-10-20 10:10    30  ***********

  40    2016-10-20 10:20    30  ***********

  41    2016-10-20 10:30    29  **********

 ...    ..( 17 skipped).    ..  **********

  59    2016-10-20 13:30    29  **********

  60    2016-10-20 13:40    30  ***********

  61    2016-10-20 13:50    29  **********

 ...    ..(  4 skipped).    ..  **********

  66    2016-10-20 14:40    29  **********

  67    2016-10-20 14:50    28  *********

  68    2016-10-20 15:00    29  **********

 ...    ..(  5 skipped).    ..  **********

  74    2016-10-20 16:00    29  **********

  75    2016-10-20 16:10    33  **************

  76    2016-10-20 16:20    35  ****************

  77    2016-10-20 16:30     ?  -

 ...    ..(  2 skipped).    ..  -

  80    2016-10-20 17:00     ?  -

  81    2016-10-20 17:10    36  *****************

  82    2016-10-20 17:20     ?  -

  83    2016-10-20 17:30     ?  -

  84    2016-10-20 17:40    37  ******************

  85    2016-10-20 17:50     ?  -

  86    2016-10-20 18:00    36  *****************

  87    2016-10-20 18:10    37  ******************

  88    2016-10-20 18:20    37  ******************

  89    2016-10-20 18:30    40  *********************

  90    2016-10-20 18:40    39  ********************

  91    2016-10-20 18:50    38  *******************

  92    2016-10-20 19:00    38  *******************

  93    2016-10-20 19:10    37  ******************

  94    2016-10-20 19:20    38  *******************

  95    2016-10-20 19:30    38  *******************

  96    2016-10-20 19:40    39  ********************

  97    2016-10-20 19:50    39  ********************

  98    2016-10-20 20:00     ?  -

 ...    ..(  4 skipped).    ..  -

 103    2016-10-20 20:50     ?  -

 104    2016-10-20 21:00    37  ******************

 105    2016-10-20 21:10     ?  -

 106    2016-10-20 21:20    38  *******************

 107    2016-10-20 21:30    40  *********************

 108    2016-10-20 21:40    39  ********************

 109    2016-10-20 21:50    39  ********************

 110    2016-10-20 22:00    34  ***************

 111    2016-10-20 22:10    36  *****************

 112    2016-10-20 22:20    37  ******************

 ...    ..(  4 skipped).    ..  ******************

 117    2016-10-20 23:10    37  ******************

 118    2016-10-20 23:20    36  *****************

 119    2016-10-20 23:30    36  *****************

 120    2016-10-20 23:40    35  ****************

 121    2016-10-20 23:50    35  ****************

 122    2016-10-21 00:00    35  ****************

 123    2016-10-21 00:10     ?  -

 124    2016-10-21 00:20    34  ***************

 125    2016-10-21 00:30    39  ********************

 126    2016-10-21 00:40    39  ********************

 127    2016-10-21 00:50    36  *****************

   0    2016-10-21 01:00    34  ***************

   1    2016-10-21 01:10    31  ************

   2    2016-10-21 01:20    31  ************

   3    2016-10-21 01:30    33  **************

   4    2016-10-21 01:40     ?  -

 ...    ..(  2 skipped).    ..  -

   7    2016-10-21 02:10     ?  -

   8    2016-10-21 02:20    34  ***************

   9    2016-10-21 02:30    36  *****************

  10    2016-10-21 02:40     ?  -

 ...    ..(  3 skipped).    ..  -

  14    2016-10-21 03:20     ?  -

  15    2016-10-21 03:30    37  ******************

  16    2016-10-21 03:40    37  ******************

  17    2016-10-21 03:50     ?  -

  18    2016-10-21 04:00    39  ********************

  19    2016-10-21 04:10     ?  -

  20    2016-10-21 04:20    42  ***********************

  21    2016-10-21 04:30     ?  -

  22    2016-10-21 04:40    41  **********************

  23    2016-10-21 04:50    39  ********************

  24    2016-10-21 05:00    40  *********************

  25    2016-10-21 05:10    41  **********************

  26    2016-10-21 05:20    40  *********************

  27    2016-10-21 05:30    40  *********************

  28    2016-10-21 05:40    40  *********************

  29    2016-10-21 05:50    37  ******************

  30    2016-10-21 06:00    37  ******************

  31    2016-10-21 06:10    34  ***************

  32    2016-10-21 06:20    34  ***************

  33    2016-10-21 06:30    33  **************

  34    2016-10-21 06:40     ?  -

 ...    ..(  2 skipped).    ..  -

  37    2016-10-21 07:10     ?  -

SCT Error Recovery Control:

           Read: Disabled

          Write: Disabled

Device Statistics (GP/SMART Log 0x04) not supported

SATA Phy Event Counters (GP Log 0x11)

ID      Size     Value  Description

0x0001  2            0  Command failed due to ICRC error

0x0002  2            0  R_ERR response for data FIS

0x0003  2            0  R_ERR response for device-to-host data FIS

0x0004  2            0  R_ERR response for host-to-device data FIS

0x0005  2            0  R_ERR response for non-data FIS

0x0006  2            0  R_ERR response for device-to-host non-data FIS

0x0007  2            0  R_ERR response for host-to-device non-data FIS

0x0008  2            0  Device-to-host non-data FIS retries

0x0009  2            3  Transition from drive PhyRdy to drive PhyNRdy

0x000a  2            3  Device-to-host register FISes sent due to a COMRESET

0x000b  2            0  CRC errors within host-to-device FIS

0x000d  2            0  Non-CRC errors within host-to-device FIS

0x000f  2            0  R_ERR response for host-to-device data FIS, CRC

0x0010  2            0  R_ERR response for host-to-device data FIS, non-CRC

0x0012  2            0  R_ERR response for host-to-device non-data FIS, CRC

0x0013  2            0  R_ERR response for host-to-device non-data FIS, non-CRC

```

----------

## NeddySeagoon

Azimoth,

The important bit is

```
SMART Attributes Data Structure revision number: 1

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE

  5 Reallocated_Sector_Ct   PO--CK   100   100   010    -    0

  9 Power_On_Hours          -O--CK   099   099   000    -    1530

 12 Power_Cycle_Count       -O--CK   099   099   000    -    717

177 Wear_Leveling_Count     PO--C-   099   099   000    -    3

179 Used_Rsvd_Blk_Cnt_Tot   PO--C-   100   100   010    -    0

181 Program_Fail_Cnt_Total  -O--CK   100   100   010    -    0

182 Erase_Fail_Count_Total  -O--CK   100   100   010    -    0

183 Runtime_Bad_Block       PO--C-   100   099   010    -    0

187 Uncorrectable_Error_Cnt -O--CK   100   100   000    -    0

190 Airflow_Temperature_Cel -O--CK   075   049   000    -    25

195 ECC_Error_Rate          -O-RC-   200   200   000    -    0

199 CRC_Error_Count         -OSRCK   095   095   000    -    4627

235 POR_Recovery_Count      -O--C-   099   099   000    -    118

241 Total_LBAs_Written      -O--CK   099   099   000    -    7663253591 
```

If VALUE or WORST <= THRESH the parameter has failed.  The RAW_VALUE is often a bit packed field so it can show huge numbers that don't mean anything.  Its vendor or even device specific.

The test log is interesting

```
SMART Extended Self-test Log Version: 1 (1 sectors)

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error

# 1  Short offline       Completed without error       00%       471         -

# 2  Extended offline    Aborted by host               90%       471      
```

The extended test was started but never completed.

Why were you running the internal drive self tests?

The error log is empty.

```
SMART Extended Comprehensive Error Log Version: 1 (1 sectors)

No Errors Logged 
```

Taken together, all the information there suggests that its not an internal drive issue on that drive.

For completeness, post the same for your other drive.

----------

## Azimoth

 *Quote:*   

> Why were you running the internal drive self tests? 

 

I ran the self test because I was new to Linux, new to SSD and found out about the existence of smartctl.

Because I want my SSD to live as long as possible I tried to find every setting that might help with that.

I understand that Gentoo offers you the ability to take care of every detail there is.

But if you don't take care of every detail, noone does, so I tried not to miss anything important.

Since this test would have take three days iirc, so I waited a little whether the computer was serious about this expected value and then decided, it's not worth the wait.

In the mean time I booted WIN10 and ran the Samsung Magician, which concluded the drive is fine.

Although I never noticed any slowdown according to its read/write test, the drive reaches at most half of what the Magician claims to be the maximum. In the case of "random read (IOPS)" even only a value of 96xx (the number is only visible on the bar in the graph and since it was THAT short only "96" was visible, I assume  it was actually 9600).

by the way: the dmesg error grew in size again, but recompiling was not necessary anymore. Just a second try.

(and I avoided to restart the system but shut it down completely and pressed the power button to start it again)

```

[   35.591512] ata1.00: exception Emask 0x10 SAct 0x300000 SErr 0x280100 action 0x6 frozen

[   35.591517] ata1.00: irq_stat 0x08000000, interface fatal error

[   35.591520] ata1: SError: { UnrecovData 10B8B BadCRC }

[   35.591524] ata1.00: failed command: READ FPDMA QUEUED

[   35.591529] ata1.00: cmd 60/e0:a0:50:4e:03/09:00:44:00:00/40 tag 20 ncq 1294336 in

                        res 40/00:a0:50:4e:03/00:00:44:00:00/40 Emask 0x10 (ATA bus error)

[   35.591532] ata1.00: status: { DRDY }

[   35.591534] ata1.00: failed command: READ FPDMA QUEUED

[   35.591538] ata1.00: cmd 60/20:a8:30:bd:34/00:00:11:00:00/40 tag 21 ncq 16384 in

                        res 40/00:a0:50:4e:03/00:00:44:00:00/40 Emask 0x10 (ATA bus error)

[   35.591541] ata1.00: status: { DRDY }

[   35.591545] ata1: hard resetting link

[   35.896488] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   35.896698] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   35.896724] ata1.00: supports DRM functions and may not be fully accessible

[   35.896950] ata1.00: disabling queued TRIM support

[   35.897492] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   35.897520] ata1.00: supports DRM functions and may not be fully accessible

[   35.897704] ata1.00: disabling queued TRIM support

[   35.898046] ata1.00: configured for UDMA/133

[   35.898070] ata1: EH complete

[   37.827376] ata1.00: exception Emask 0x10 SAct 0x3fc00 SErr 0x280100 action 0x6 frozen

[   37.827382] ata1.00: irq_stat 0x08000000, interface fatal error

[   37.827385] ata1: SError: { UnrecovData 10B8B BadCRC }

[   37.827389] ata1.00: failed command: READ FPDMA QUEUED

[   37.827394] ata1.00: cmd 60/08:50:c8:b9:52/05:00:42:00:00/40 tag 10 ncq 659456 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827397] ata1.00: status: { DRDY }

[   37.827399] ata1.00: failed command: READ FPDMA QUEUED

[   37.827404] ata1.00: cmd 60/88:58:08:0b:74/05:00:42:00:00/40 tag 11 ncq 724992 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827406] ata1.00: status: { DRDY }

[   37.827408] ata1.00: failed command: READ FPDMA QUEUED

[   37.827413] ata1.00: cmd 60/20:60:e0:91:41/00:00:46:00:00/40 tag 12 ncq 16384 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827415] ata1.00: status: { DRDY }

[   37.827417] ata1.00: failed command: READ FPDMA QUEUED

[   37.827421] ata1.00: cmd 60/00:68:60:17:7e/08:00:13:00:00/40 tag 13 ncq 1048576 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827424] ata1.00: status: { DRDY }

[   37.827426] ata1.00: failed command: READ FPDMA QUEUED

[   37.827430] ata1.00: cmd 60/00:70:60:1f:7e/08:00:13:00:00/40 tag 14 ncq 1048576 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827433] ata1.00: status: { DRDY }

[   37.827435] ata1.00: failed command: READ FPDMA QUEUED

[   37.827439] ata1.00: cmd 60/00:78:60:27:7e/08:00:13:00:00/40 tag 15 ncq 1048576 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827441] ata1.00: status: { DRDY }

[   37.827443] ata1.00: failed command: READ FPDMA QUEUED

[   37.827448] ata1.00: cmd 60/e0:80:60:2f:7e/07:00:13:00:00/40 tag 16 ncq 1032192 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827450] ata1.00: status: { DRDY }

[   37.827452] ata1.00: failed command: READ FPDMA QUEUED

[   37.827456] ata1.00: cmd 60/20:88:80:e7:5d/00:00:0c:00:00/40 tag 17 ncq 16384 in

                        res 40/00:60:e0:91:41/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   37.827458] ata1.00: status: { DRDY }

[   37.827463] ata1: hard resetting link

[   38.132460] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   38.132701] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   38.132729] ata1.00: supports DRM functions and may not be fully accessible

[   38.132963] ata1.00: disabling queued TRIM support

[   38.133525] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   38.133551] ata1.00: supports DRM functions and may not be fully accessible

[   38.133733] ata1.00: disabling queued TRIM support

[   38.134057] ata1.00: configured for UDMA/133

[   38.134070] ata1: EH complete

[   38.192352] ata1: limiting SATA link speed to 3.0 Gbps

[   38.192359] ata1.00: exception Emask 0x10 SAct 0x800000 SErr 0x280100 action 0x6 frozen

[   38.192361] ata1.00: irq_stat 0x08000000, interface fatal error

[   38.192364] ata1: SError: { UnrecovData 10B8B BadCRC }

[   38.192369] ata1.00: failed command: READ FPDMA QUEUED

[   38.192374] ata1.00: cmd 60/c0:b8:40:3f:7e/07:00:13:00:00/40 tag 23 ncq 1015808 in

                        res 40/00:b8:40:3f:7e/00:00:13:00:00/40 Emask 0x10 (ATA bus error)

[   38.192376] ata1.00: status: { DRDY }

[   38.192381] ata1: hard resetting link

[   38.504358] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 320)

[   38.504670] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   38.504716] ata1.00: supports DRM functions and may not be fully accessible

[   38.505001] ata1.00: disabling queued TRIM support

[   38.505836] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   38.505886] ata1.00: supports DRM functions and may not be fully accessible

[   38.506111] ata1.00: disabling queued TRIM support

[   38.506519] ata1.00: configured for UDMA/133

[   38.506541] ata1: EH complete

[   40.390825] ------------[ cut here ]------------

```

here's the output of "smartctl -x /dev/sdb":

(didn't do much with it since I installed Gentoo, because I still look for a way to have an encrypted drive accessible from OSX/WIN10/Gentoo... but that's a different story.)

```

smartctl 6.4 2015-06-04 r4109 [x86_64-linux-4.4.21-gentoo] (local build)

Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===

Model Family:     HGST Travelstar 5K1500

Device Model:     HGST HTS541515A9E630

Serial Number:    DA4010DAG1EBWR

LU WWN Device Id: 5 000cca 74bc0a69c

Firmware Version: KA0OA500

User Capacity:    1.500.301.910.016 bytes [1,50 TB]

Sector Sizes:     512 bytes logical, 4096 bytes physical

Rotation Rate:    5400 rpm

Form Factor:      2.5 inches

Device is:        In smartctl database [for details use: -P show]

ATA Version is:   ATA8-ACS T13/1699-D revision 6

SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)

Local Time is:    Fri Oct 21 13:04:22 2016 CEST

SMART support is: Available - device has SMART capability.

SMART support is: Enabled

AAM feature is:   Unavailable

APM level is:     128 (minimum power consumption without standby)

Rd look-ahead is: Enabled

Write cache is:   Enabled

ATA Security is:  Disabled, frozen [SEC2]

Wt Cache Reorder: Enabled

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

General SMART Values:

Offline data collection status:  (0x00)   Offline data collection activity

               was never started.

               Auto Offline Data Collection: Disabled.

Self-test execution status:      (   0)   The previous self-test routine completed

               without error or no self-test has ever 

               been run.

Total time to complete Offline 

data collection:       (   45) seconds.

Offline data collection

capabilities:           (0x5b) SMART execute Offline immediate.

               Auto Offline data collection on/off support.

               Suspend Offline collection upon new

               command.

               Offline surface scan supported.

               Self-test supported.

               No Conveyance Self-test supported.

               Selective Self-test supported.

SMART capabilities:            (0x0003)   Saves SMART data before entering

               power-saving mode.

               Supports SMART auto save timer.

Error logging capability:        (0x01)   Error logging supported.

               General Purpose Logging supported.

Short self-test routine 

recommended polling time:     (   2) minutes.

Extended self-test routine

recommended polling time:     ( 332) minutes.

SCT capabilities:           (0x003d)   SCT Status supported.

               SCT Error Recovery Control supported.

               SCT Feature Control supported.

               SCT Data Table supported.

SMART Attributes Data Structure revision number: 16

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE

  1 Raw_Read_Error_Rate     PO-R--   100   100   062    -    0

  2 Throughput_Performance  P-S---   100   100   040    -    0

  3 Spin_Up_Time            POS---   129   129   033    -    2

  4 Start_Stop_Count        -O--C-   097   097   000    -    5986

  5 Reallocated_Sector_Ct   PO--CK   100   100   005    -    0

  7 Seek_Error_Rate         PO-R--   100   100   067    -    0

  8 Seek_Time_Performance   P-S---   100   100   040    -    0

  9 Power_On_Hours          -O--C-   072   072   000    -    12526

 10 Spin_Retry_Count        PO--C-   100   100   060    -    0

 12 Power_Cycle_Count       -O--CK   097   097   000    -    5653

191 G-Sense_Error_Rate      -O-R--   100   100   000    -    0

192 Power-Off_Retract_Count -O--CK   100   100   000    -    88408210

193 Load_Cycle_Count        -O--C-   001   001   000    -    1701316

194 Temperature_Celsius     -O----   176   176   000    -    34 (Min/Max 14/45)

196 Reallocated_Event_Count -O--CK   100   100   000    -    0

197 Current_Pending_Sector  -O---K   100   100   000    -    0

198 Offline_Uncorrectable   ---R--   100   100   000    -    0

199 UDMA_CRC_Error_Count    -O-R--   200   200   000    -    0

223 Load_Retry_Count        -O-R--   100   100   000    -    0

                            ||||||_ K auto-keep

                            |||||__ C event count

                            ||||___ R error rate

                            |||____ S speed/performance

                            ||_____ O updated online

                            |______ P prefailure warning

General Purpose Log Directory Version 1

SMART           Log Directory Version 1 [multi-sector log support]

Address    Access  R/W   Size  Description

0x00       GPL,SL  R/O      1  Log Directory

0x01           SL  R/O      1  Summary SMART error log

0x02           SL  R/O      1  Comprehensive SMART error log

0x03       GPL     R/O      1  Ext. Comprehensive SMART error log

0x06           SL  R/O      1  SMART self-test log

0x07       GPL     R/O      1  Extended self-test log

0x09           SL  R/W      1  Selective self-test log

0x10       GPL     R/O      1  SATA NCQ Queued Error log

0x11       GPL     R/O      1  SATA Phy Event Counters log

0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log

0xe0       GPL,SL  R/W      1  SCT Command/Status

0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (1 sectors)

No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)

No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1

 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS

    1        0        0  Not_testing

    2        0        0  Not_testing

    3        0        0  Not_testing

    4        0        0  Not_testing

    5        0        0  Not_testing

Selective self-test flags (0x0):

  After scanning selected spans, do NOT read-scan remainder of disk.

If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3

SCT Version (vendor specific):       256 (0x0100)

SCT Support Level:                   1

Device State:                        Active (0)

Current Temperature:                    34 Celsius

Power Cycle Min/Max Temperature:     34/34 Celsius

Lifetime    Min/Max Temperature:     14/45 Celsius

Lifetime    Average Temperature:        32 Celsius

Under/Over Temperature Limit Count:   0/0

SCT Temperature History Version:     2

Temperature Sampling Period:         1 minute

Temperature Logging Interval:        1 minute

Min/Max recommended Temperature:      0/60 Celsius

Min/Max Temperature Limit:           -40/65 Celsius

Temperature History Size (Index):    128 (125)

Index    Estimated Time   Temperature Celsius

 126    2016-10-21 10:57    38  *******************

 127    2016-10-21 10:58    39  ********************

 ...    ..(  7 skipped).    ..  ********************

   7    2016-10-21 11:06    39  ********************

   8    2016-10-21 11:07    38  *******************

   9    2016-10-21 11:08    38  *******************

  10    2016-10-21 11:09    38  *******************

  11    2016-10-21 11:10    37  ******************

  12    2016-10-21 11:11    37  ******************

  13    2016-10-21 11:12    36  *****************

 ...    ..(  3 skipped).    ..  *****************

  17    2016-10-21 11:16    36  *****************

  18    2016-10-21 11:17    37  ******************

 ...    ..(  4 skipped).    ..  ******************

  23    2016-10-21 11:22    37  ******************

  24    2016-10-21 11:23    38  *******************

 ...    ..( 11 skipped).    ..  *******************

  36    2016-10-21 11:35    38  *******************

  37    2016-10-21 11:36    37  ******************

  38    2016-10-21 11:37    37  ******************

  39    2016-10-21 11:38    36  *****************

  40    2016-10-21 11:39    36  *****************

  41    2016-10-21 11:40    36  *****************

  42    2016-10-21 11:41     ?  -

  43    2016-10-21 11:42     ?  -

  44    2016-10-21 11:43     ?  -

  45    2016-10-21 11:44    25  ******

  46    2016-10-21 11:45    25  ******

  47    2016-10-21 11:46    26  *******

 ...    ..(  3 skipped).    ..  *******

  51    2016-10-21 11:50    26  *******

  52    2016-10-21 11:51    27  ********

  53    2016-10-21 11:52    28  *********

  54    2016-10-21 11:53     ?  -

  55    2016-10-21 11:54    28  *********

 ...    ..(  5 skipped).    ..  *********

  61    2016-10-21 12:00    28  *********

  62    2016-10-21 12:01    29  **********

  63    2016-10-21 12:02    29  **********

  64    2016-10-21 12:03    29  **********

  65    2016-10-21 12:04    30  ***********

 ...    ..(  4 skipped).    ..  ***********

  70    2016-10-21 12:09    30  ***********

  71    2016-10-21 12:10    31  ************

 ...    ..(  3 skipped).    ..  ************

  75    2016-10-21 12:14    31  ************

  76    2016-10-21 12:15    32  *************

  77    2016-10-21 12:16    31  ************

  78    2016-10-21 12:17    31  ************

  79    2016-10-21 12:18    31  ************

  80    2016-10-21 12:19    32  *************

 ...    ..(  8 skipped).    ..  *************

  89    2016-10-21 12:28    32  *************

  90    2016-10-21 12:29    33  **************

 ...    ..(  4 skipped).    ..  **************

  95    2016-10-21 12:34    33  **************

  96    2016-10-21 12:35    32  *************

  97    2016-10-21 12:36    32  *************

  98    2016-10-21 12:37    32  *************

  99    2016-10-21 12:38    33  **************

 100    2016-10-21 12:39    32  *************

 101    2016-10-21 12:40    33  **************

 ...    ..(  2 skipped).    ..  **************

 104    2016-10-21 12:43    33  **************

 105    2016-10-21 12:44     ?  -

 106    2016-10-21 12:45     ?  -

 107    2016-10-21 12:46    33  **************

 108    2016-10-21 12:47    33  **************

 109    2016-10-21 12:48     ?  -

 110    2016-10-21 12:49    34  ***************

 111    2016-10-21 12:50     ?  -

 112    2016-10-21 12:51    34  ***************

 ...    ..( 12 skipped).    ..  ***************

 125    2016-10-21 13:04    34  ***************

SCT Error Recovery Control:

           Read: Disabled

          Write: Disabled

Device Statistics (GP/SMART Log 0x04) not supported

SATA Phy Event Counters (GP Log 0x11)

ID      Size     Value  Description

0x0001  2            0  Command failed due to ICRC error

0x0002  2            0  R_ERR response for data FIS

0x0003  2            0  R_ERR response for device-to-host data FIS

0x0004  2            0  R_ERR response for host-to-device data FIS

0x0005  2            0  R_ERR response for non-data FIS

0x0006  2            0  R_ERR response for device-to-host non-data FIS

0x0007  2            0  R_ERR response for host-to-device non-data FIS

0x0009  2            4  Transition from drive PhyRdy to drive PhyNRdy

0x000a  2            3  Device-to-host register FISes sent due to a COMRESET

0x000b  2            0  CRC errors within host-to-device FIS

0x000d  2            0  Non-CRC errors within host-to-device FIS

```

----------

## NeddySeagoon

Azimoth,

That looks OK too.  This looks odd but harmless.

```
193 Load_Cycle_Count        -O--C-   001   001   000   
```

The next step is to swap the two SATA data cables over and see if the message moves from ata1 to another SATA port.

That does mean you will need to do reads on both drives.

If the error stays on ata1, its probably not the drive nor the SATA cables.

----------

## Azimoth

I'm sorry, NeddySeagoon. I'm afraid I can't do that.

Since this is a Macbook Pro the cables are different in shape and the second drive is not connected via it's own SATA port but via an "adapter", which is shaped like the DVD drive that originally was connected in this slot.

What I tried over night: 

I made room on the second drive and used Clonezilla to make an image of the SSD drive. Then I ran "mklabel gpt" on the SSD drive and restored the drive image.

Now the log does not show any of the errors I had before, the only hard disk referenced dmesg entries I found were the following:

```

[    9.407910] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[    9.407945] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

[    9.408235] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.408332] ata1.00: supports DRM functions and may not be fully accessible

[    9.409079] ata1.00: disabling queued TRIM support

[    9.409088] ata1.00: ATA-9: Samsung SSD 850 EVO 1TB, EMT02B6Q, max UDMA/133

[    9.409095] ata1.00: 1953525168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA

[    9.409870] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.409968] ata1.00: supports DRM functions and may not be fully accessible

[    9.410219] ata1.00: disabling queued TRIM support

[    9.410642] ata1.00: configured for UDMA/133

[    9.410907] scsi 0:0:0:0: Direct-Access     ATA      Samsung SSD 850  2B6Q PQ: 0 ANSI: 5

[    9.411179] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)

[    9.411236] sd 0:0:0:0: [sda] Write Protect is off

[    9.411238] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

[    9.411256] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

[    9.412818]  sda: sda1 sda2 sda3 sda4 sda5

[    9.413168] sd 0:0:0:0: [sda] Attached SCSI disk

[    9.439618] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.440062] ata3.00: ATA-8: HGST HTS541515A9E630, KA0OA500, max UDMA/133

[    9.440071] ata3.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA

[    9.441586] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.442010] ata3.00: configured for UDMA/133

[    9.442283] scsi 2:0:0:0: Direct-Access     ATA      HGST HTS541515A9 A500 PQ: 0 ANSI: 5

[    9.442546] sd 2:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)

[    9.442550] sd 2:0:0:0: [sdb] 4096-byte physical blocks

[    9.442598] sd 2:0:0:0: [sdb] Write Protect is off

[    9.442602] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00

[    9.442623] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

```

Am I wrong to believe there should be errors remaining, if the cable or the port had a problem?

(I only just replaced the cable to ata1 last week. It said "New: A brand-new, unused, unopened,..." so I would believe that until proven otherwise)

EDIT: 

OK, after booting into OSX and back, the errors are back. :/ BUT no problems during reboots so far...

```

[   62.780655] ata1.00: exception Emask 0x10 SAct 0x3f80000 SErr 0x280100 action 0x6 frozen

[   62.780660] ata1.00: irq_stat 0x08000000, interface fatal error

[   62.780663] ata1: SError: { UnrecovData 10B8B BadCRC }

[   62.780667] ata1.00: failed command: READ FPDMA QUEUED

[   62.780672] ata1.00: cmd 60/00:98:b8:a6:43/08:00:33:00:00/40 tag 19 ncq 1048576 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780674] ata1.00: status: { DRDY }

[   62.780676] ata1.00: failed command: READ FPDMA QUEUED

[   62.780681] ata1.00: cmd 60/40:a0:b8:ae:43/02:00:33:00:00/40 tag 20 ncq 294912 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780683] ata1.00: status: { DRDY }

[   62.780685] ata1.00: failed command: READ FPDMA QUEUED

[   62.780689] ata1.00: cmd 60/20:a8:40:e6:1c/00:00:44:00:00/40 tag 21 ncq 16384 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780692] ata1.00: status: { DRDY }

[   62.780694] ata1.00: failed command: READ FPDMA QUEUED

[   62.780698] ata1.00: cmd 60/20:b0:e8:dd:1f/00:00:46:00:00/40 tag 22 ncq 16384 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780700] ata1.00: status: { DRDY }

[   62.780702] ata1.00: failed command: READ FPDMA QUEUED

[   62.780706] ata1.00: cmd 60/20:b8:b8:7a:bc/00:00:14:00:00/40 tag 23 ncq 16384 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780709] ata1.00: status: { DRDY }

[   62.780710] ata1.00: failed command: READ FPDMA QUEUED

[   62.780715] ata1.00: cmd 60/20:c0:e0:6c:5d/00:00:0c:00:00/40 tag 24 ncq 16384 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780717] ata1.00: status: { DRDY }

[   62.780719] ata1.00: failed command: READ FPDMA QUEUED

[   62.780723] ata1.00: cmd 60/20:c8:48:ad:63/00:00:12:00:00/40 tag 25 ncq 16384 in

                        res 40/00:b0:e8:dd:1f/00:00:46:00:00/40 Emask 0x10 (ATA bus error)

[   62.780725] ata1.00: status: { DRDY }

[   62.780729] ata1: hard resetting link

[   63.085724] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   63.087484] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   63.087530] ata1.00: supports DRM functions and may not be fully accessible

[   63.087794] ata1.00: disabling queued TRIM support

[   63.088509] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   63.088550] ata1.00: supports DRM functions and may not be fully accessible

[   63.088805] ata1.00: disabling queued TRIM support

[   63.089148] ata1.00: configured for UDMA/133

[   63.099694] ata1: EH complete

```

EDIT 2:

After booting into WIN10 and back the errors are gone again. (Still no problems rebooting)

```

[    9.377569] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

[    9.378999] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.379580] ata3.00: ATA-8: HGST HTS541515A9E630, KA0OA500, max UDMA/133

[    9.379582] ata3.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA

[    9.381208] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.381786] ata3.00: configured for UDMA/133

[    9.383527] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[    9.385188] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.385243] ata1.00: supports DRM functions and may not be fully accessible

[    9.385518] ata1.00: disabling queued TRIM support

[    9.385524] ata1.00: ATA-9: Samsung SSD 850 EVO 1TB, EMT02B6Q, max UDMA/133

[    9.385529] ata1.00: 1953525168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA

[    9.386400] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.386571] ata1.00: supports DRM functions and may not be fully accessible

[    9.386966] ata1.00: disabling queued TRIM support

[    9.387447] ata1.00: configured for UDMA/133

[    9.387631] scsi 0:0:0:0: Direct-Access     ATA      Samsung SSD 850  2B6Q PQ: 0 ANSI: 5

[    9.387881] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)

[    9.387968] sd 0:0:0:0: [sda] Write Protect is off

[    9.387972] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

[    9.387999] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

[    9.388009] scsi 2:0:0:0: Direct-Access     ATA      HGST HTS541515A9 A500 PQ: 0 ANSI: 5

[    9.388189] sd 2:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)

[    9.388192] sd 2:0:0:0: [sdb] 4096-byte physical blocks

[    9.388218] sd 2:0:0:0: [sdb] Write Protect is off

[    9.388219] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00

[    9.388228] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

[    9.389256]  sda: sda1 sda2 sda3 sda4 sda5

[    9.389536] sd 0:0:0:0: [sda] Attached SCSI disk

```

----------

## NeddySeagoon

Azimoth,

 *Quote:*   

> OK, after booting into OSX and back, the errors are back. :/ BUT no problems during reboots so far... 

 

Describe the reboot process.  In particular, did you power cycle the system or not?

I have seen network hardware get in a mess due to soft restarts (no power cycle).

I've also seen WiFi devices not work at all without a soft reboot from another OS. 

I've not seen that on storage devices ... yet. its worth a test.

----------

## NeddySeagoon

Azimoth,

 *Quote:*   

> OK, after booting into OSX and back, the errors are back. :/ BUT no problems during reboots so far... 

 

Describe the reboot process.  In particular, did you power cycle the system or not?

I have seen network hardware get in a mess due to soft restarts (no power cycle).

I've also seen WiFi devices not work at all without a soft reboot from another OS. 

I've not seen that on storage devices ... yet. its worth a test.  

-- edit --

Backing up and restoring a SSD probably doesn't do what you think it does.

The SSD wear levelling may have put the data in entirely different physical blocks on the SSD to the original.

As you say, the a backup and restore should have no effect on problem hardware.

----------

## Azimoth

 *Quote:*   

> 
> 
> Describe the reboot process.
> 
> 

 

Well... from my limited understanding, which I acquired via Google, in my case booting means the following:

1. A quick hardware check is performed and, if successful, confirmed by the characteristic startup sound (see WALL-E)

2. The EFI goes through it's list of bootable things (during this process the screen is all white)

3. The EFI boots the "top priority" OS (in my case Gentoo), unless I press the option key. (If OSX was booted, this is the moment when the Apple logo would appear on screen.)

4. The Kernel (either Linux or Mach, depending on OS) takes over and performs whatever he's designed to do (e.g. LUKS decryption). 

My kernel is an EFI stub kernel with LUKS decryption included in the initramfs. (I assume you probably have a better understanding of the details than I do.)

My theory how to explain my experience:

I think my (apparantly past) problem after replacing the hard drive cable was, that the EFI found the Linux kernel, but the kernel was unable to "introduce" itself properley, because the things it was looking for was not in the right place. So it depended on the error correction, whether booting took place or not. And as long as the error correction did not succeed the system waited for the kernel to be recognized properly, hence not showing anything but the white screen.

 *Quote:*   

> 
> 
> Did you power cycle the system or not? 
> 
> 

 

Before I mirrored and restored the whole SSD I think WITH power cycling everything worked better, yet not reliably.

After the process I noticed have not power cycled since and noticed no problem.

Rebooting from OSX without power cycling seems to lead to errors in the log.

```

[   20.071719] ata1.00: exception Emask 0x10 SAct 0x7c000 SErr 0x280100 action 0x6 frozen

[   20.072877] ata1.00: irq_stat 0x08000000, interface fatal error

[   20.074023] ata1: SError: { UnrecovData 10B8B BadCRC }

[   20.075150] ata1.00: failed command: READ FPDMA QUEUED

[   20.076268] ata1.00: cmd 60/f0:70:30:66:11/06:00:13:00:00/40 tag 14 ncq 909312 in

                        res 40/00:90:90:1b:b5/00:00:11:00:00/40 Emask 0x10 (ATA bus error)

[   20.078537] ata1.00: status: { DRDY }

[   20.079600] ata1.00: failed command: READ FPDMA QUEUED

[   20.080692] ata1.00: cmd 60/10:78:20:6d:11/09:00:13:00:00/40 tag 15 ncq 1187840 in

                        res 40/00:90:90:1b:b5/00:00:11:00:00/40 Emask 0x10 (ATA bus error)

[   20.082916] ata1.00: status: { DRDY }

[   20.084027] ata1.00: failed command: READ FPDMA QUEUED

[   20.085149] ata1.00: cmd 60/00:80:30:76:11/08:00:13:00:00/40 tag 16 ncq 1048576 in

                        res 40/00:90:90:1b:b5/00:00:11:00:00/40 Emask 0x10 (ATA bus error)

[   20.087467] ata1.00: status: { DRDY }

[   20.088547] ata1.00: failed command: READ FPDMA QUEUED

[   20.088551] ata1.00: cmd 60/e0:88:30:7e:11/07:00:13:00:00/40 tag 17 ncq 1032192 in

                        res 40/00:90:90:1b:b5/00:00:11:00:00/40 Emask 0x10 (ATA bus error)

[   20.088552] ata1.00: status: { DRDY }

[   20.088554] ata1.00: failed command: READ FPDMA QUEUED

[   20.088557] ata1.00: cmd 60/b8:90:90:1b:b5/02:00:11:00:00/40 tag 18 ncq 356352 in

                        res 40/00:90:90:1b:b5/00:00:11:00:00/40 Emask 0x10 (ATA bus error)

[   20.088558] ata1.00: status: { DRDY }

[   20.088563] ata1: hard resetting link

[   20.397719] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[   20.397912] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   20.397941] ata1.00: supports DRM functions and may not be fully accessible

[   20.398892] ata1.00: disabling queued TRIM support

[   20.399410] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[   20.399438] ata1.00: supports DRM functions and may not be fully accessible

[   20.400335] ata1.00: disabling queued TRIM support

[   20.400653] ata1.00: configured for UDMA/133

[   20.400662] ata1: EH complete

```

Regarding the wifi: 

I noticed that sometimes the 5Ghz band was available and used, whereas sometimes only 2,4Ghz were available. My impression is that power cycling rather supports the 5Ghu availability, yet I did not look for this in particular until now.

----------

## NeddySeagoon

Azimoth,

Lets test power cycling.

With your system powered off, boot into Gentoo and check for errors in dmesg.

If they are there, it not a power cycle issue.

If there are now errors, shutdown and power off.

Boot into windows.

Without powering off, change to Gentoo.  Check dmesg.

We are looking for a correlation between errors and power cycling or not power cycling.

----------

## Azimoth

I'm sorry for not responding for quite some time, it was a busy week.

I rebuilt my whole system from scratch and after that the system only hang once on boot. 

That time power cycling did "fix" the issue and now the dmesg output does not show any 

"ata" related errors. Maybe I should simply get used to power cycling by default...

```

[    9.283927] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)

[    9.284264] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.284363] ata1.00: supports DRM functions and may not be fully accessible

[    9.284812] ata1.00: disabling queued TRIM support

[    9.284838] ata1.00: ATA-9: Samsung SSD 850 EVO 1TB, EMT02B6Q, max UDMA/133

[    9.284845] ata1.00: 1953525168 sectors, multi 1: LBA48 NCQ (depth 31/32), AA

[    9.284914] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

[    9.285603] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.285697] ata1.00: supports DRM functions and may not be fully accessible

[    9.285897] ata1.00: disabling queued TRIM support

[    9.286252] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.286259] ata1.00: configured for UDMA/133

[    9.286460] scsi 0:0:0:0: Direct-Access     ATA      Samsung SSD 850  2B6Q PQ: 0 ANSI: 5

[    9.286578] ata3.00: ATA-8: HGST HTS541515A9E630, KA0OA500, max UDMA/133

[    9.286580] ata3.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA

[    9.286716] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)

[    9.286767] sd 0:0:0:0: [sda] Write Protect is off

[    9.286769] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00

[    9.286788] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

[    9.287973] ata3.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out

[    9.288284] ata3.00: configured for UDMA/133

[    9.288359]  sda: sda1 sda2 sda3 sda4 sda5

[    9.288400] scsi 2:0:0:0: Direct-Access     ATA      HGST HTS541515A9 A500 PQ: 0 ANSI: 5

[    9.288521] sd 2:0:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)

[    9.288524] sd 2:0:0:0: [sdb] 4096-byte physical blocks

[    9.288559] sd 2:0:0:0: [sdb] Write Protect is off

[    9.288562] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00

[    9.288579] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

[    9.288670] sd 0:0:0:0: [sda] Attached SCSI disk

[    9.312849] usb 1-1.1.1: new full-speed USB device number 6 using ehci-pci

[    9.358766]  sdb: sdb1 sdb2

[    9.359026] sd 2:0:0:0: [sdb] Attached SCSI disk

```

One thing I did notice tough: 

I installed Gentoo on a BTRFS partition and when I put " errors=remount-ro" into /etc/fstab it always mounted the system as readonly. Removing "errors=remount-ro" made everything boot up properly, yet there'se a message flashing by, which I have not located in any log yet, saying something about "unable to mount filesystem, trying 'auto' mount option". (This is not the exact message, but I think this is what it means. "sudo mount -a" does not produce any error.

----------

