From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AA2321382C5 for ; Sun, 21 Mar 2021 21:05:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB70EE087A; Sun, 21 Mar 2021 21:05:39 +0000 (UTC) Received: from isp1.netcon.at (isp1.netcon.at [85.31.17.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 422FAE0825 for ; Sun, 21 Mar 2021 21:05:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by isp1.netcon.at (Postfix) with ESMTP id 4F80018E6B56 for ; Sun, 21 Mar 2021 22:05:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at isp1.netcon.intern Received: from isp1.netcon.at ([127.0.0.1]) by localhost (isp1.netcon.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gXLdGvbuoqqF for ; Sun, 21 Mar 2021 22:05:34 +0100 (CET) Received: from puchmayr.linznet.at (be-9b-bb-d-c3.91-142-26-35.cust.kabelspeed.at [91.142.26.35]) by isp1.netcon.at (Postfix) with ESMTPS id D39DF18E6B4B for ; Sun, 21 Mar 2021 22:05:34 +0100 (CET) Received: (qmail 20652 invoked from network); 21 Mar 2021 21:04:00 -0000 Received: from zeus.local (HELO zeus.localnet) (192.168.1.2) by mail.local with SMTP; 21 Mar 2021 21:04:00 -0000 From: Alexander Puchmayr To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Weird harddisk problem: AHCI disks sometimes not found Date: Sun, 21 Mar 2021 22:05:34 +0100 Message-ID: <2712592.Icojqenx9y@zeus> In-Reply-To: <4230296.kQq0lBPeGt@zeus> References: <4230296.kQq0lBPeGt@zeus> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Archives-Salt: 623e6b15-2f80-42fd-9f9d-a4c64656e808 X-Archives-Hash: ada21f6394b5b6ff3c675ccc624d2627 Hi there, Thanks for all suggestions and answers so far. I'm pretty sure it is not a hardware problem, because=20 * Exchanging SATA cables does not affect the problem * Using different SATA slots on the mainboard does not affect the problem * Using different SATA power connectors does not affect the problem I continued to experiment with different kernel versions and configs: * Ubuntu-5.4.0-48-generic works * sys-kernel/gentoo-sources-5.4.60 [self compiled and configured for a simi= lar=20 machine some time ago]: WORKS * sys-kernel/gentoo-kernel-5.4.97 [default config] FAILS * sys-kernel/gentoo-kernel-bin-5.4.97 FAILS * sys-kernel/vanilla-sources-5.4.102 [same config as with 5.4.60] WORKS * sys-kernel/gentoo-kernel-5.10.20 [default config] FAILS * sys-kernel/gentoo-sources-5.10.20 [same config as with 5.4.60] WORKS The common thing seems to be that my self-configured kernels work and the=20 default dist-kernels fail. I checked the differences in the configs (/usr/s= rc/ linux/.config) related to SATA or AHCI, and one candidate was=20 CONFIG_SATA_MOBILE_LPM_POLICY, which was set to 3 (medium power save) in=20 distkernel's config and 0 (keep seetings from firmware) in my self compiled= =20 kernels. SOLUTION: Adding CONFIG_SATA_MOBILE_LPM_POLICY=3D0 to /etc/kernel/config.d and recomp= iling=20 the gentoo-kernel actually solved the problem.=20 I assume the reason is an incompatibility between the link power modes (mod= e=20 3) and the drives making the link to appear to be down. Alex Am Donnerstag, 11. M=E4rz 2021, 20:39:04 CET schrieb Alexander Puchmayr: > Hi there, >=20 > I have a weird harddisk detection problem which rises the questio: what d= oes > the gentoo-kernel make differently than the ubuntu kernel? >=20 > The system in question has 2 identical SSDs (Kingston SV300S3 60GB) and t= wo > identical HDDs (older Maxtor7V300F0 300GB) , all connected to SATA/AHCI > ports; the HDDs are combined to a LVM-raid1 volume. SATA controller is a > onboard SB7x on an Asus M3A78 mainboard in AHCI mode. >=20 > Only one of the two SSDs is attached at the same time to the system, the > other one is disconnected. One contains a gentoo installation (just updat= ed > yesterday), the other one an Ubuntu LTS 20.04. This allows dual-.boot by > switching connection cables. >=20 > When I connect the gentoo-SSD and boot it, BIOS finds all HDDs and the SS= D, > and starts booting; but gentoo does not recognize at least one of the HDDs > (/dev/ sdc missing, dmesg shows link down on Sata-Interface > . Going back to the bios shows that even BIOS does not recognize the disk > anymore. A full powercycle (pressing reset button is not sufficent) to ma= ke > BIOS to recognize the disks again. >=20 > Doing the same with the Ubuntu-Disk works absolutely fine, all HDDs are > recognized and the raid is working fine, not a single time that one of the > disks was not recognized. >=20 > Without the Ubuntu observation I'd say its a hardware problem and the old > HDDs are simply beyond their age, but why are they working in ubuntu and > not in gentoo? And what is it doing with BIOS/Harddisk that even Bios does > not find it anymore? I need a full powercycle to make bios find it again. > This indicates a gentoo kernel problem, and I have no idea where to start > looking, and AFAIK there's nothing much to configure a SATA/AHCI drive. >=20 > Any ideas? >=20 > Thanks > Alex >=20 > PS: > Sys-kernel/gentoo-kernel-5.4.97, default configuration > Hardware: > 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS780 Host Bridge > 00:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to > PCI bridge (int gfx) > 00:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI > bridge (PCIE port 2) > 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8= x0/ > SB9x0 SATA Controller [AHCI mode] > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x= 0/ > SB9x0 USB OHCI0 Controller > 00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB > OHCI1 Controller > 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x= 0/ > SB9x0 USB EHCI Controller > 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x= 0/ > SB9x0 USB OHCI0 Controller > 00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB > OHCI1 Controller > 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x= 0/ > SB9x0 USB EHCI Controller > 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Control= ler > (rev 3a) > 00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/ > SB9x0 IDE Controller > 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia > (Intel HDA) > 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB= 9x0 > LPC host controller > 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to P= CI > Bridge > 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x= 0/ > SB9x0 USB OHCI2 Controller > 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 > [Athlon64/Opteron] HyperTransport Technology Configuration > 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 > [Athlon64/Opteron] Address Map > 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 > [Athlon64/Opteron] DRAM Controller > 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 > [Athlon64/Opteron] Miscellaneous Control > 01:05.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] > RS780 [Radeon HD 3200] > 01:05.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RS780 HDMI > Audio [Radeon 3000/3100 / HD 3200/3300] > 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)