tomsom / yoga-linux

Run Linux on the Lenovo Yoga 7 14 (14ARB7) with AMD Ryzen 6800U (Rembrand).
https://github.com/tomsom/yoga-linux/wiki
57 stars 2 forks source link

Samsung SSD removed when resuming from s2idle #9

Closed 0x9fff00 closed 1 year ago

0x9fff00 commented 1 year ago

Documenting this in case anyone else has this issue:

The Samsung PM9B1 512G SSD found in some units reports eui as 0001000200030004 when resuming from s2idle, causing the device to be removed with this error in dmesg:

nvme nvme0: identifiers changed for nsid 1

I’ve submitted an initial patch for this here: https://lore.kernel.org/all/20221116171727.4083-1-git@augustwikerfors.se/T/

Kernel Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217649

Edit: see https://lore.kernel.org/all/20230731185103.18436-1-mario.limonciello@amd.com/ for a more general patch rejected due to concerns about data corruption for other devices, use the quirk patch instead

0x9fff00 commented 1 year ago

Update on this: @superm1’s patch was rejected due to concerns that it could cause data corruption for other devices, however my original quirk patch was applied instead and should be in 6.5:

https://lore.kernel.org/all/ZMlrGNw5OMW3yxId@kbusch-mbp.dhcp.thefacebook.com/ https://git.infradead.org/nvme.git/commit/688b419c57c13637d95d7879e165fff3dec581eb

It would of course still be ideal if Lenovo released the firmware update to fix the root cause, but at least now we’ll get suspend working with the upstream kernel

Okazakee commented 1 year ago

Update on this: @superm1’s patch was rejected due to concerns that it could cause data corruption for other devices, however my original quirk patch was applied instead and should be in 6.5:

https://lore.kernel.org/all/ZMlrGNw5OMW3yxId@kbusch-mbp.dhcp.thefacebook.com/ https://git.infradead.org/nvme.git/commit/688b419c57c13637d95d7879e165fff3dec581eb

It would of course still be ideal if Lenovo released the firmware update to fix the root cause, but at least now we’ll get suspend working with the upstream kernel

now that i changed ssd lmao, thanks a lot for your work anyway!

stuarthayhurst commented 1 year ago

New firmware for the PM9B1 posted by Lenovo:

The update via fwupd seems to have no interest in my device, I haven't tried the Windows tool yet. If nobody else fancies trying it, I can try when I get back from holiday :D

EDIT: tried it anyway, doesn't detect the SSD, as the SSD has -00BL2 at the end of the model number, that the models supported by the updater don't have.

stuarthayhurst commented 1 year ago

Update on this: @superm1’s patch was rejected due to concerns that it could cause data corruption for other devices, however my original quirk patch was applied instead and should be in 6.5:

https://lore.kernel.org/all/ZMlrGNw5OMW3yxId@kbusch-mbp.dhcp.thefacebook.com/ https://git.infradead.org/nvme.git/commit/688b419c57c13637d95d7879e165fff3dec581eb

It would of course still be ideal if Lenovo released the firmware update to fix the root cause, but at least now we’ll get suspend working with the upstream kernel

Seems it's been pulled into mainline Linux now, thanks :D

It would be nice if Lenovo released the firmware update for the Lenovo specific variant, but I guess that's somewhere on the way when they fix whatever issue they found.

Does this mean this issue can finally be closed?

EnderMk9 commented 1 year ago

Any idea when is it going to reach mainline distros?

stuarthayhurst commented 1 year ago

6.5-rc6 will be released tomorrow with this, so 6.5 will probably release in either a week or 2 weeks. After that, it depends on your distro. Arch, Debian Experimental and other rolling release distros should get it within days to weeks, stable distros will take months.

If Lenovo release the firmware update, as soon as you can apply it you won't need the kernel patch.

0x9fff00 commented 1 year ago

The patch has also been queued up for the 6.4 and 6.1 stable kernels which should be released next week: https://lore.kernel.org/all/2023081258-marital-idly-e4da@gregkh/

EnderMk9 commented 1 year ago

Thanks!

0x9fff00 commented 1 year ago

Fixed in 6.5-rc6, 6.4.11 and 6.1.46

Jalopy-Tech commented 1 year ago

I have model MZAL41T0HBLB-00BL2. I have tried kernels 6.5-rc6 and 6.4.11: suspend and wake up work without a problem.

Notes: I used the application Mainline Kernels to install the kernels. I use Open Razer. I had to install gcc-13 to avoid a clash with 6.5-rc6.

favelanky commented 1 year ago

I have model SAMSUNG MZVL4512HBLU-00BTW. Was on 4.6.10 (arch linux), after updating to 4.6.11 the problem was gone.

Thanks a lot!