GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
346 stars 11 forks source link

FIX INSIDE: SD card slot is unable to read UHS Cards - PARROT / galliumos-sandyivy #564

Closed Hurricos closed 4 years ago

Hurricos commented 4 years ago

This is possibly a reopening https://github.com/GalliumOS/galliumos-distro/issues/206.

The BCM57765 in an Acer C710 ('PARROT') has ASPM issues. (Thanks Broadcom). Commit 3492821 in the galliumos-sandyivy repo ostensibly fixed it, except it didn't -- I don't have the time to search for it, but perhaps at some point since then there became a requirement that files under /etc/modprobe.d/ end in .conf in order to actually be treated as conf files.

Anyways, I manually ran:

rmmod sdhci-pci
rmmod sdhci

then ran

modprobe sdhci debug_quirks2=4
modprobe sdhci

... and my UHS-capable card could read fine.

I was incredibly confused since this option is obviously already in the modprobe conf file, so ran

mv /etc/modprobe.d/sdhci /etc/modprobe.d/sdhci.conf

... and then pulled and reinserted my SDXC card, ran rmmod ... ; modprobe ... ; modprobe ..., and reinsterted the card, and it worked fine.

TODO: Wait a sec so I can make a merge request which moves this file.

Hurricos commented 4 years ago

If you spin up a complete build for me I can test on my Acer C710.

ghost commented 4 years ago

I already tested it on mine and it still doesn't work.

Hurricos commented 4 years ago

What?

That doesn't make any sense. I just tested it on mine and it worked. Let me boot from a fresh install and test.

Hurricos commented 4 years ago

Tested again. It works on a live install.

Hurricos commented 4 years ago

I'll dump dmesg and specific details about the system and card after I'm done making dinner, so you can compare.

ghost commented 4 years ago

Testing it by unloading and reloading the kernel modules isn't terribly effective because /etc/modprobe.d is loaded at boot. Well, actually it's only loaded during initrd generation, so I just had to run update-initramfs and it works now. Thanks for pointing this out.

Hurricos commented 4 years ago

Unloading / reloading sdhci and sdhci-pci works for me, but potatoes/potatoes.

I'm glad I found this; searching shows that there's plenty of folks with this issue outstanding (including everyone I've sold an Acer C710 to.)

ghost commented 4 years ago

It works during that one particular boot, but it goes back to not working next time you reboot. The whole point of /etc/modprobe.d is that it allows you to configure specific kernel modules at boot, without having to unload and reload them.

Hurricos commented 4 years ago

Yes, of course.

Hurricos commented 4 years ago

Oh, damnit. I see what you meant regarding update-initramfs. Obviously the kernel must be loaded with drivers before the filesystem can be mounted.

sherip99 commented 4 years ago

Just commenting that there is still an issue. I have an Acer C710-2833. Just loaded MrChromebox firmware, downloaded the GalliumOS 3.1 image for Sandy/Ivy and burned to an sd card using a windows laptop. But I was unable to install to the Chromebook using the sd card in C710's sd slot. I finally found an old USB sd card reader and got it installed. The built in sd slot still wasn't working, and searching brought me here. Tried above commands and got the drive recognized, but it was lost after rebooting. Further searching took me to this page, which is not specific to Gallium or Acer C710:

https://gist.github.com/samgooi4189/2e6e18fd1d562acaf39246e5e386d7cb#file-bcm57765or57785fix-L21

I now have the slot getting recognized on reboots. I think the operative part is to run:

sudo update-initramfs -u -k all

Hurricos commented 4 years ago

Yeah, as @coltondrg mentioned you need to propagate the driver options into the initramfs so that when modules get loaded (which happens before fully mounting everything) you have the options all set there.

I don't know why the fix hasn't been propagated. Has the galliumos-sandyivy package not been rebuilt for the repo?

apt show galliumos-sandyivy

perhaps also because the galliumos-sandyivy package is already there by default and so you don't get the transaction happening that updates the initramfs?

Not sure.