You are not logged in.
Please try this:
sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-v6.8.r5402.g57aaf91-1-x86_64.pkg.tar.zst
Offline
6.8.0-1-mainline-05402-g57aaf9134c03 the drive doesn't work
Offline
Please try the following:
sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-v6.8.rc3.r9.gf2b70a2-1-x86_64.pkg.tar.zst
Offline
6.8.0-rc3-1-mainline-00009-gf2b70a264b44 the drive doesn't work
Offline
Please try the following package:
sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-v6.8.rc3.r4.g45b96d6-1-x86_64.pkg.tar.zst
Offline
6.8.0-rc3-1-mainline-00004-g45b96d65ec68 the drive works
Offline
Please try the following:
sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-v6.8.rc3.r6.gae1f3db-1-x86_64.pkg.tar.zst
Offline
6.8.0-rc3-1-mainline-00006-gae1f3db006b7 the drive works
Offline
Please try:
sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-v6.8.rc3.r8.g7edbb60-1-x86_64.pkg.tar.zst
Offline
6.8.0-rc3-1-mainline-00008-g7edbb6059274 the drive doesn't work
Offline
Please try:
sudo pacman -U https://pkgbuild.com/\~gromit/linux-bisection-kernels/linux-mainline-v6.8.rc3.r7.g7627a0e-1-x86_64.pkg.tar.zst
Offline
6.8.0-rc3-1-mainline-00007-g7627a0edef54 the drive doesn't work
Offline
We have found a alledgedly offending commit:
7627a0edef548c4c4dea62df51cc26bfe5bbcab8 is the first bad commit
commit 7627a0edef548c4c4dea62df51cc26bfe5bbcab8 (HEAD)
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue Feb 6 22:13:46 2024 +0100
ata: ahci: Drop low power policy board type
The low power policy board type was introduced to allow systems
to get into deep states reliably. Before it was introduced `min_power`
was causing problems for a number of drives. New power policies
`min_power_with_partial` and `med_power_with_dipm` have been introduced
which provide a more stable baseline for systems.
Tested-by: Damien Le Moal <dlemoal@kernel.org>
Tested-by: Jian-Hong Pan <jhp@endlessos.org>
Acked-by: Jian-Hong Pan <jhp@endlessos.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
[cassel: rebase patch and fix trivial conflicts]
Signed-off-by: Niklas Cassel <cassel@kernel.org>
This is the bisect log:
git bisect start
# status: waiting for both good and bad commits
# good: [e8f897f4afef0031fe618a8e94127a0934896aba] Linux 6.8
git bisect good e8f897f4afef0031fe618a8e94127a0934896aba
# status: waiting for bad commit, 1 good commit known
# bad: [a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6] Linux 6.9
git bisect bad a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6
# bad: [480e035fc4c714fb5536e64ab9db04fedc89e910] Merge tag 'drm-next-2024-03-13' of https://gitlab.freedesktop.org/drm/kernel
git bisect bad 480e035fc4c714fb5536e64ab9db04fedc89e910
# good: [9187210eee7d87eea37b45ea93454a88681894a4] Merge tag 'net-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
git bisect good 9187210eee7d87eea37b45ea93454a88681894a4
# good: [119b225f01e4d3ce974cd3b4d982c76a380c796d] Merge tag 'amd-drm-next-6.9-2024-03-08-1' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
git bisect good 119b225f01e4d3ce974cd3b4d982c76a380c796d
# bad: [6cdebf62a159f31351946685b02941c968b96e49] Merge tag 'spi-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
git bisect bad 6cdebf62a159f31351946685b02941c968b96e49
# bad: [aa7d6513d68bad539142f9d6c3e2faa629bc27d8] Merge tag 'tag-chrome-platform-firmware-for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
git bisect bad aa7d6513d68bad539142f9d6c3e2faa629bc27d8
# good: [8c9c2f851b5a58195ed7ebd67d7c59683d1a02bc] Merge tag 'iommu-updates-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
git bisect good 8c9c2f851b5a58195ed7ebd67d7c59683d1a02bc
# good: [50944062f7d2a61c7dc8787563f233823115c249] dm vdo block-map: rename page state name from "UDS_FREE" to "FREE"
git bisect good 50944062f7d2a61c7dc8787563f233823115c249
# good: [3584240b9ce4adf63c3a985a730eb3f75806c26d] dm vdo logger: change from uds_ to vdo_ namespace
git bisect good 3584240b9ce4adf63c3a985a730eb3f75806c26d
# bad: [57aaf9134c033dc5caaaf70facac529bb9d3d20b] Merge tag 'ata-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
git bisect bad 57aaf9134c033dc5caaaf70facac529bb9d3d20b
# bad: [f2b70a264b44a6c3952fadbcc3e6711deed8458f] ahci: rename board_ahci_nosntf
git bisect bad f2b70a264b44a6c3952fadbcc3e6711deed8458f
# good: [45b96d65ec68f625ad26ee16d2f556e29f715005] ata: ahci: a hotplug capable port is an external port
git bisect good 45b96d65ec68f625ad26ee16d2f556e29f715005
# good: [ae1f3db006b71b78f2cae848b3a1446b02818ca7] ata: ahci: do not enable LPM on external ports
git bisect good ae1f3db006b71b78f2cae848b3a1446b02818ca7
# bad: [7edbb6059274c0ee997947978a46d91664c64983] ahci: clean up intel_pcs_quirk
git bisect bad 7edbb6059274c0ee997947978a46d91664c64983
# bad: [7627a0edef548c4c4dea62df51cc26bfe5bbcab8] ata: ahci: Drop low power policy board type
git bisect bad 7627a0edef548c4c4dea62df51cc26bfe5bbcab8
# first bad commit: [7627a0edef548c4c4dea62df51cc26bfe5bbcab8] ata: ahci: Drop low power policy board type
Do you want to write the bug report for the kernel people or should I take care of that?
Last edited by gromit (2025-01-06 14:00:21)
Offline
Does changing the links power management policy setting with the kernel parameter ahci.mobile_lpm_policy=1 or # echo "max_performance" > /sys/class/scsi_host/host3/link_power_management_policy have any effect?
Offline
In parallel I have also contacted the developer of the Patch and they said that it is most likely fixable with a quirk:
Christian Heusel | gromit (14:58)
@Mario I have just bisected an issue with a certain blue ray player to commit 7627a0edef54 ("ata: ahci: Drop low power policy board type") of yours ? Can this be solved by a quirk?Mario | (14:59)
Yes probably
Bring it up on the storage mailing list or a bugzilla
Or if you want to try to come up with a quirk, I think there are a few examples already
Offline
Do you want to write the bug report for the kernel people or should I take care of that?
Yes please, you can take care of the report.
Offline
Add an entry to the __ata_dev_quirks array with ATA_QUIRK_NOLPM https://github.com/torvalds/linux/blob/ … re.c#L3947 something like:
{ "HL-DT-ST BD-RE BU40N", NULL, ATA_QUIRK_NOLPM },
Not sure on the device ID.
Offline
Does changing the links power management policy setting with the kernel parameter ahci.mobile_lpm_policy=1 or # echo "max_performance" > /sys/class/scsi_host/host3/link_power_management_policy have any effect?
Adding the kernel parameter ahci.mobile_lpm_policy=1 fixes the issue.
Offline
linux 6.12.8-arch1 with the following patch applied:
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c085dd8..ef01ccd 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4118,6 +4118,9 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = {
{ "SAMSUNG MZ7TD256HAFV-000L9", NULL, ATA_QUIRK_NOLPM },
{ "SAMSUNG MZ7TE512HMHP-000L1", "EXT06L0Q", ATA_QUIRK_NOLPM },
+ /* Hitachi-LG Data Storage models with LPM issues */
+ { "HL-DT-ST BD-RE BU40N", NULL, ATA_QUIRK_NOLPM },
+
/* devices that don't properly handle queued TRIM commands */
{ "Micron_M500IT_*", "MU01", ATA_QUIRK_NO_NCQ_TRIM |
ATA_QUIRK_ZERO_AFTER_TRIM },
linux-6.12.8.arch1-1.1-x86_64.pkg.tar.zst/linux-headers-6.12.8.arch1-1.1-x86_64.pkg.tar.zst
If the patch does not work please post the output of the following from a kernel where the device works:
# hdparm -i /dev/sr0
Offline
linux 6.12.8-arch1 with the following patch applied:
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c085dd8..ef01ccd 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4118,6 +4118,9 @@ static const struct ata_dev_quirks_entry __ata_dev_quirks[] = { { "SAMSUNG MZ7TD256HAFV-000L9", NULL, ATA_QUIRK_NOLPM }, { "SAMSUNG MZ7TE512HMHP-000L1", "EXT06L0Q", ATA_QUIRK_NOLPM }, + /* Hitachi-LG Data Storage models with LPM issues */ + { "HL-DT-ST BD-RE BU40N", NULL, ATA_QUIRK_NOLPM }, + /* devices that don't properly handle queued TRIM commands */ { "Micron_M500IT_*", "MU01", ATA_QUIRK_NO_NCQ_TRIM | ATA_QUIRK_ZERO_AFTER_TRIM },
It doesn't work with that patch.
/dev/sr0:
Model=HL-DT-ST BD-RE BU40N, FwRev=1.03, SerialNo=
Config={ Fixed Removable DTR<=5Mbs DTR>10Mbs nonMagnetic }
RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=unknown, MaxMultSect=0
CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 udma6
AdvancedPM=no
Drive conforms to: unknown: ATA/ATAPI-3,4,5,6,7
* signifies the current active mode
Offline
Adding the kernel parameter ahci.mobile_lpm_policy=1 fixes the issue.
I second this, My BU40N works fine after adding the Kernel parameter.
Last edited by slayerking (2025-01-07 02:02:12)
Offline
@gromit any thoughts on why the patch did not work as expected?
Offline
A couple of things I have noticed since putting "ahci.mobile_lpm_policy=1" in is my BU40N reads CD's again but also my Bluetooth starts enabled again, It hasn't done this for a few months.
If I remove the parameter the BU40N will NOT read CD's again but WILL read blurays (ripping one as I type this without the kernel parameter) and Bluetooth starts disabled again. If I put a cd in it just won't spin up, It acknowledges that a disc was inserted but then just stops and the program ie:Ripperx, Strawberry, says there is no disc in the drive.
My BU40N is in a "Vantec USB 3.0 Slim SATA Optical Drive Enclosure (NST-510S3-BK)" my motherboard is Asus tuf x670e plus wifi if this helps
Last edited by slayerking (2025-01-08 00:33:44)
Offline
@slayerking, @Alesar1 could you retry the patched build from @loqs? Just to be sure that that patch actually does not work ...
On test please remove any other possible fixes such as the command line parameter mentioned above.
Offline
@slayerking, @Alesar1 could you retry the patched build from @loqs? Just to be sure that that patch actually does not work ...
On test please remove any other possible fixes such as the command line parameter mentioned above.
I tried again, but I can't get it to work with loqs' patch.
~ ❯ uname -r
6.12.8-arch1-1.1
~ ❯ cat /proc/cmdline
initrd=\intel-ucode.img initrd=\initramfs-linux.img root=/dev/nvme0n1p1 rw
Offline