Gentoo Archives: gentoo-user

From: Alexander Puchmayr <alexander.puchmayr@×××××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Weird harddisk problem: AHCI disks sometimes not found
Date: Sun, 21 Mar 2021 21:05:46
Message-Id: 2712592.Icojqenx9y@zeus
In Reply to: [gentoo-user] Weird harddisk problem: AHCI disks sometimes not found by Alexander Puchmayr
1 Hi there,
2
3 Thanks for all suggestions and answers so far.
4
5 I'm pretty sure it is not a hardware problem, because
6 * Exchanging SATA cables does not affect the problem
7 * Using different SATA slots on the mainboard does not affect the problem
8 * Using different SATA power connectors does not affect the problem
9
10 I continued to experiment with different kernel versions and configs:
11 * Ubuntu-5.4.0-48-generic works
12 * sys-kernel/gentoo-sources-5.4.60 [self compiled and configured for a similar
13 machine some time ago]: WORKS
14 * sys-kernel/gentoo-kernel-5.4.97 [default config] FAILS
15 * sys-kernel/gentoo-kernel-bin-5.4.97 FAILS
16 * sys-kernel/vanilla-sources-5.4.102 [same config as with 5.4.60] WORKS
17 * sys-kernel/gentoo-kernel-5.10.20 [default config] FAILS
18 * sys-kernel/gentoo-sources-5.10.20 [same config as with 5.4.60] WORKS
19
20 The common thing seems to be that my self-configured kernels work and the
21 default dist-kernels fail. I checked the differences in the configs (/usr/src/
22 linux/.config) related to SATA or AHCI, and one candidate was
23 CONFIG_SATA_MOBILE_LPM_POLICY, which was set to 3 (medium power save) in
24 distkernel's config and 0 (keep seetings from firmware) in my self compiled
25 kernels.
26
27 SOLUTION:
28 Adding CONFIG_SATA_MOBILE_LPM_POLICY=0 to /etc/kernel/config.d and recompiling
29 the gentoo-kernel actually solved the problem.
30
31 I assume the reason is an incompatibility between the link power modes (mode
32 3) and the drives making the link to appear to be down.
33
34 Alex
35
36 Am Donnerstag, 11. März 2021, 20:39:04 CET schrieb Alexander Puchmayr:
37 > Hi there,
38 >
39 > I have a weird harddisk detection problem which rises the questio: what does
40 > the gentoo-kernel make differently than the ubuntu kernel?
41 >
42 > The system in question has 2 identical SSDs (Kingston SV300S3 60GB) and two
43 > identical HDDs (older Maxtor7V300F0 300GB) , all connected to SATA/AHCI
44 > ports; the HDDs are combined to a LVM-raid1 volume. SATA controller is a
45 > onboard SB7x on an Asus M3A78 mainboard in AHCI mode.
46 >
47 > Only one of the two SSDs is attached at the same time to the system, the
48 > other one is disconnected. One contains a gentoo installation (just updated
49 > yesterday), the other one an Ubuntu LTS 20.04. This allows dual-.boot by
50 > switching connection cables.
51 >
52 > When I connect the gentoo-SSD and boot it, BIOS finds all HDDs and the SSD,
53 > and starts booting; but gentoo does not recognize at least one of the HDDs
54 > (/dev/ sdc missing, dmesg shows link down on Sata-Interface
55 > . Going back to the bios shows that even BIOS does not recognize the disk
56 > anymore. A full powercycle (pressing reset button is not sufficent) to make
57 > BIOS to recognize the disks again.
58 >
59 > Doing the same with the Ubuntu-Disk works absolutely fine, all HDDs are
60 > recognized and the raid is working fine, not a single time that one of the
61 > disks was not recognized.
62 >
63 > Without the Ubuntu observation I'd say its a hardware problem and the old
64 > HDDs are simply beyond their age, but why are they working in ubuntu and
65 > not in gentoo? And what is it doing with BIOS/Harddisk that even Bios does
66 > not find it anymore? I need a full powercycle to make bios find it again.
67 > This indicates a gentoo kernel problem, and I have no idea where to start
68 > looking, and AFAIK there's nothing much to configure a SATA/AHCI drive.
69 >
70 > Any ideas?
71 >
72 > Thanks
73 > Alex
74 >
75 > PS:
76 > Sys-kernel/gentoo-kernel-5.4.97, default configuration
77 > Hardware:
78 > 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS780 Host Bridge
79 > 00:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to
80 > PCI bridge (int gfx)
81 > 00:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI
82 > bridge (PCIE port 2)
83 > 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
84 > SB9x0 SATA Controller [AHCI mode]
85 > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
86 > SB9x0 USB OHCI0 Controller
87 > 00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB
88 > OHCI1 Controller
89 > 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
90 > SB9x0 USB EHCI Controller
91 > 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
92 > SB9x0 USB OHCI0 Controller
93 > 00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB
94 > OHCI1 Controller
95 > 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
96 > SB9x0 USB EHCI Controller
97 > 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller
98 > (rev 3a)
99 > 00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
100 > SB9x0 IDE Controller
101 > 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia
102 > (Intel HDA)
103 > 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0
104 > LPC host controller
105 > 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI
106 > Bridge
107 > 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/
108 > SB9x0 USB OHCI2 Controller
109 > 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8
110 > [Athlon64/Opteron] HyperTransport Technology Configuration
111 > 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8
112 > [Athlon64/Opteron] Address Map
113 > 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8
114 > [Athlon64/Opteron] DRAM Controller
115 > 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8
116 > [Athlon64/Opteron] Miscellaneous Control
117 > 01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
118 > RS780 [Radeon HD 3200]
119 > 01:05.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RS780 HDMI
120 > Audio [Radeon 3000/3100 / HD 3200/3300]
121 > 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
122 > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)