daliansky / XiaoMi-Pro-Hackintosh

XiaoMi NoteBook Pro Hackintosh
BSD Zero Clause License
2.61k stars 471 forks source link

SD card reader #36

Open Space-Cadet0 opened 6 years ago

Space-Cadet0 commented 6 years ago

Is it possible to get the built in SD card reader to work, at the moment it does not function.

stevezhengshiqi commented 6 years ago

I am sorry to say that SD card reader has no driver currently. Our SD card model is RTS5129, connected by USB. I have tried every possible kext, injected id, used official kext from Realtek, but none of them worked.

Space-Cadet0 commented 6 years ago

@stevezhengshiqi Thank you for the quick reply. It sounds like you have tried everything, shame the SD reader won't work.

By the way - thank you for all of your work.

Delitants commented 6 years ago

What's the patch provided here? http://www.realtek.com.tw/Downloads/downloadsView.aspx?Conn=3&DownTypeID=3&Level=4&PFid=25&PNid=15#7

stevezhengshiqi commented 6 years ago

@Neolo Already tried. This driver is what I have said "official kext from Realtek".

stevezhengshiqi commented 6 years ago

I list what I have done so far:

None of them or combinations of them can make the reader work. I found a driver which is better but still not working: https://www.insanelymac.com/forum/topic/237068-usb-card-reader-apple-optimized-legacy-driver-1065106610671068/ . This driver will fake our reader to a native one. After installing, the System Information.app - USB - USB2.0-CRW shows Apple.Inc. But it still doesn't work. No information show up at System Information.app - Card Reader.

After all, I disabled the SD Card reader port in SSDT-USB.aml to save power.

Delitants commented 6 years ago

Well, maybe we should try ask people to help in those threads? It's not necessarily to be recognized in that section https://www.tonymacx86.com/threads/how-to-make-a-generic-driver-for-any-card-reader.74471/page-5#post-1734822

I wrote to Realtek support, will see if they can help =)

andy7z commented 5 years ago

5250S The GTX edition's card reader is RTS5250S. It's a PCIe Gen2 hardware. Can it be driven?

Menchen commented 5 years ago

I think that maybe we can get sd card reader working by passing it to a guest Linux VM that share folder to host OS(macOs). Similar to Intel Bluetooth, should be fine as an emergency card reader...(non GTX one have speed cap of 30 MB/S I think..)

jackreeves commented 4 years ago

hey @Menchen . after success with bluetooth think that this would be actually possible in a similar way?

Menchen commented 4 years ago

It would be impossible without writing a driver for sdcard, or keeping vm alive. With Bluetooth the only missing part is firmware uploads, the rest is “native” in macOS (Bluetooth standard).

Cr0wTom commented 4 years ago

Hello guys, anyone tried this: https://www.noobsplanet.com/index.php?threads/fix-internal-external-card-reader-hackintosh-guide.32/

Seems to me a bit different from the approaches you mentioned. I will try it when I'll find some more time.

I list what I have done so far:

None of them or combinations of them can make the reader work. I found a driver which is better but still not working: https://www.insanelymac.com/forum/topic/237068-usb-card-reader-apple-optimized-legacy-driver-1065106610671068/ . This driver will fake our reader to a native one. After installing, the System Information.app - USB - USB2.0-CRW shows Apple.Inc. But it still doesn't work. No information show up at System Information.app - Card Reader.

After all, I disabled the SD Card reader port in SSDT-USB.aml to save power.

stevezhengshiqi commented 4 years ago

@Cr0wTom I don’t see much difference from https://www.tonymacx86.com/threads/how-to-make-a-generic-driver-for-any-card-reader.74471/, but worth trying.

whatnameisit commented 4 years ago

How far did you get with making RTS5129 work? I injected idProduct and idVendor to AppleUSBHostCompositeDevice, then that and Bulk-In, Bulk-Out, Interface@0 to show on IOReg, but I can't seem to go any further than that. IOUSBMassStorageInterfaceNub and all the lower services seem to load at boot, but they are immediately terminated. I assumed the way to make 0129 work was the same as native 0138. Archive.zip

stevezhengshiqi commented 4 years ago

@whatnameisit Only id injection won’t work. Need a firmware uploader to load supported firmware for SD Card reader. A well-experienced IOKit developer is welcome.

whatnameisit commented 4 years ago

@stevezhengshiqi I just thought 0129 might be compatible with whatever firmware 0138 was using. And I'm not a well-experienced IOKit developer, so... :/ Thanks for the fast reply :) I'll just delete the SD card entry in my USBPorts.kext XD

0xFireWolf commented 3 years ago

If you are still interested in the SD card reader, please join the beta testing : ). https://www.insanelymac.com/forum/topic/348130-realtek-pcieusb-card-reader-driver-for-macos/

stevezhengshiqi commented 3 years ago

That's a wonderful news! Would you guys mind having a test on that? @Menchen @ManuGithubSteam Driver link:https://github.com/0xFireWolf/RealtekCardReader/releases/tag/v0.9.5

ManuGithubSteam commented 3 years ago

@stevezhengshiqi

That is wonderful news!

I tried to use the Realtekcardreader and RealteckcardreaderFriend. I put both kext into the OC/Kext folder and set the values in the plist to true. However the driver seems not to be loading after reboot. Do i miss something ?

Thanks!

stevezhengshiqi commented 3 years ago

@ManuGithubSteam Realtekcardreader requires Lilu v1.5.5 or higher. Also don't forget to unblock SD port in SSDT-USB. v1.5.9 release have both of them

ManuGithubSteam commented 3 years ago

@stevezhengshiqi I used the latest (1.59) as base and replaced the Lilu kext with the new one (did not enable this in plist, figured it should be enabled anyway) I used the SSDT-USB from that and also tried to use my old one where i know it should work but it does not.

Do i need to enable the SD port in the SSDT-USB file ?

It would be supportet with the latest version 0.9.5 does support: As of v0.9.5, USB-based RTS5129, RTS5139 and RTS5179 are supported.

As far as i can think of, I installed the kext correctly and did the correct plist edit. Did you get it to work on your machine ?

Under Card Reader there is nothing displayed but in USB there is a USB2.0CRW device i assume this could be the card reader but if i plug in a card nothing happens..

I fear it has to do with this: https://www.insanelymac.com/forum/topic/348130-realtek-pcie-card-reader-driver-for-macos/?do=findComment&comment=2765003

It seems this kext has still some issues. But its good that its been worked on. I hope in a month or so it will have improved and i try again.

I will try the beta build when i have more time..

stevezhengshiqi commented 3 years ago

@ManuGithubSteam

Do i need to enable the SD port in the SSDT-USB file ?

Since you have USB2.0CRW shown up, you don't need to. That means SD port is enabled.

Under Card Reader there is nothing displayed

I guess the reason is that you didn't use the kexts compiled from the latest commit. The latest release on https://github.com/0xFireWolf/RealtekCardReader/releases is out of date. You can use this one I attached. Archive.zip

0xFireWolf commented 3 years ago

@ManuGithubSteam Try the latest 0.9.6 release at here. Your card reader should be working now.

stevezhengshiqi commented 3 years ago

@0xFireWolf Thanks for the new release! It did improve a lot. However, in my case, after long sleep(about half an hour), all my USB ports are dead except SD port, e.g. camera, bluetooth. They do not show in ioreg and System Information. Tell me if you need any log. I would say it's more like an IOUSB issue.

UPDATE: I got a crash panic after sleep: Wake transition timed out after 180 seconds while calling power state change callbacks. Suspected bundle: com.apple.iokit.IOUSBHostFamily. Here's the detailed crash log. rtsx_log_Aug28.txt

ManuGithubSteam commented 3 years ago

Hi @0xFireWolf and @stevezhengshiqi i tested the new release and the sd card reader works in a short test. That is very cool!

However after like a few minutes after detaching the sd card, my mac osx became very sluggish and i could not work in a vm anymore because it became slow and i could not attach USB devices anymore vmware said: It could not load the appropriate driver and would try any driver it could but this did not work for my usb stick (ntfs format). However the main thing was that the whole mac os (Big Sur) was feeling very sluggish.. After a reboot it was gone.