Jump to content
173 posts in this topic

Recommended Posts

15 minutes ago, kushwavez said:

how could I forgot that, sorry

it's v0.9.5

You don't need kext to get that card reader working. RTS5138 working out of the box. In your IOreg screenshot you can see it. 

 

5129, 5137 and 5179 (USB-based) need a custom driver to work. Any other USB based Realtek is working out of box with default and native Apple drivers

Edited by b0ltun
Link to comment
Share on other sites

5 minutes ago, b0ltun said:

You don't need kext to get that card reader working. RTS5138 working out of the box. In your IOreg screenshot you can see it. 

 

5129, 5137 and 5179 (USB-based) need a custom driver to work. Any other USB based Realtek is working out of box with default and native Apple drivers

Yah, now I notice his ioreg, apple officially supports rts5138 from Big Sur (no support until Catalina)

Link to comment
Share on other sites

ouch

I feel pretty dumb now. 

 

Sorry then, you're right, I removed the kext and it does work. 

I was pretty convinced that it doesn't work since I tried it on Catalina and it did nothing. Looks like I was wrong. Well, it is a good news for me tho, thank you.

 

oopsie

Link to comment
Share on other sites

On 7/18/2021 at 12:59 AM, Austere.J said:

A quick summary of known issues with USB card readers.

 

RTS5129:

Problem:

Non-UHS-I SD cards become unresponsive and commands are timed out after the driver sets the bus clock to 25MHz (Default Speed Mode) or 50MHz (High Speed Mode). The same issue also occurs on PCIe-based RTS5227 as reported on Github.

User Observation:

The card is not recognized and does not appear on desktop.

 

USB Common:

Problem:

The driver starts the card initialization sequence only if the card is present in the card slot while the system boots.

The periodic polling function that monitors the card status is not working at this moment. (IOTimerEventSource)

User Observation:

Nothing happens when one insert the card after the system boots.

 

Problem:

System Information does not list the USB card reader properly under the tab "Card Reader".

User Observation:

Device details are blank under the tab.

 

The latest commits should have solved these issues.

You can find compiled kexts under the Artifacts in each action (e.g., https://github.com/0xFireWolf/RealtekCardReader/actions/runs/1152407458).

 

For those who have USB-based card readers, your card should be able to show up on the desktop now and you can see the files on the card.

However, file transfers are problematic (extremely slow) due to pipe stalls and timed out commands after a DMA transfer.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Austere.J said:

 

The latest commits should have solved these issues.

You can find compiled kexts under the Artifacts in each action (e.g., https://github.com/0xFireWolf/RealtekCardReader/actions/runs/1152407458).

 

For those who have USB-based card readers, your card should be able to show up on the desktop now and you can see the files on the card.

However, file transfers are problematic (extremely slow) due to pipe stalls and timed out commands after a DMA transfer.

Thank you sir, I will try and tell if there is any issue

Link to comment
Share on other sites

5 hours ago, Austere.J said:

 

The latest commits should have solved these issues.

You can find compiled kexts under the Artifacts in each action (e.g., https://github.com/0xFireWolf/RealtekCardReader/actions/runs/1152407458).

 

For those who have USB-based card readers, your card should be able to show up on the desktop now and you can see the files on the card.

However, file transfers are problematic (extremely slow) due to pipe stalls and timed out commands after a DMA transfer.

 

I tried the newer variant - 04c5dbf (debug version), there are some minor and major issues.

Minor issues:

1. The mac couldn't differentiate between microsd card (attached via sdcard reader) and a sdcard (icon wise, as other kext like sinetex-rtsx including native apple supported readers can differentiate it - I know this is a silly issue but it is an issue)

2. Unlike native apple supported card readers, this kext couldn't report sdcard details to system information, as a result it is not showing card details under usb2.0-crw and in card reader section in system information

Major issues:

1. This kext doesn't eject the card, if I click eject it shows either "failed to unmount" error (same error while trying to format too) or the whole system or just finder gets hanged (gets stuck).

2. If I force eject the card or remove without ejecting/unmounting, then if I insert the card again (while the system is running only condition, after boot) my system couldn't detect the card reader, i.e., the card reader kext works card reader inserted before boot as well as first time hotplug after boot, but not multiple hotplugs (with/without ejecting - like 851ede2 variant kext (it has other various issues as I posted in my earlier posts 😅)). One more thing, if I remove without ejecting/unmounting, then the card doesn't disappear from the system, I can still open the folder of sdcard after removing (but not access the files in it tho)

3. This kext now works good with both uhs and non-uhs but only working with mbr partition table, not gpt/guid partition table. Please check that. I tried various types of guid cards but none of them could read/open my card and gives error as filesystem couldn't be recognized. But I'm sure mac knew guid partition table and those guid cards are opening with some external usb card reader (I mean the "external" one available in the market, I think you understood what I am telling).

All related log files, screenshots, ioreg are attached below.

Please don't think me wrong that I am telling these many issues after the long developments, I know this kext is still in beta mode and I thought it's better to report these problems, you are doing great sir @Austere.J and I know these problems will be fixed soon. Thanks.

rtsx-04c5dbf.7z

  • Confused 1
Link to comment
Share on other sites

I tested your kext on my T440, unfortunately the card reader doesn't work. It is showing up in System Manager, but it doesn't recognize the card inserted.

Attaching logs/ioreg, produced right after the card is inserted.

 

In the log, I see a bunch of error messages like these:

[...]
[   97.200542]: RTSX: IOReturn RealtekCardReaderController::endCommandTransfer(UInt32, UInt32) Error: Failed to transfer host commands. Error = 0xe00002d6.
[   97.205570]: RTSX: virtual void RealtekPCICardReaderController::clearCardError() Soft Assertion Failed: Failed to clear the card error.
[   97.205626]: RTSX: IOReturn RealtekSDXCSlot::runSDCommand(RealtekSDCommand &, UInt32) Error: Failed to terminate the command transfer session. Error = 0xe00002d6.
[   97.311091]: RTSX: virtual IOReturn RealtekPCICardReaderController::writeChipRegister(UInt16, UInt8, UInt8) Error: Timed out when writing 0x44 with mask 0x44 to the chip register at 0xfd54.
[   97.311099]: RTSX: virtual void RealtekPCICardReaderController::clearCardError() Soft Assertion Failed: Failed to clear the card error.
[...]

seems like all end up failing with 0xe00002d6.

 

The card reader is an RTS5227 PCI Express Card Reader

Spoiler

1729079718_Kpernyfot2021-08-23-15_25_57.thumb.png.a8f59e3fcc30a3c6b436dbd16b9a2703.png

Tested different cards, same.

 

latest DEBUG kext (v0.9.5), OS: macOS Monterey Beta 5, Clover v5138

logs.zip

Link to comment
Share on other sites

Okay tried the latest with the latest commits, but the card still isn't recognized, same kind of errors as mentioned above, all end up with error code 0xe00002d6

 

rtsx_0.9.6_04c5dbf_T440.log

 

EDIT: I restarted the system, and now the card appeared in Disk Utility, but with Unknown FS and table, can't format, can't mount. After removing the card it is still showing up in Disk Utility, any other card inserted after that isn't recognized. 

 

Edited by kushwavez
Link to comment
Share on other sites

3 hours ago, kushwavez said:

EDIT: I restarted the system, and now the card appeared in Disk Utility, but with Unknown FS and table, can't format, can't mount. After removing the card it is still showing up in Disk Utility, any other card inserted after that isn't recognized. 

 

Yah, it is one of the issue I posted in my lengthy previous post in this page. Is your sd card formatted in guid/gpt partition table or mbr partition table?

Edited by gnpaone
Link to comment
Share on other sites

On 8/23/2021 at 7:09 AM, kushwavez said:

Okay tried the latest with the latest commits, but the card still isn't recognized, same kind of errors as mentioned above, all end up with error code 0xe00002d6

 

rtsx_0.9.6_04c5dbf_T440.log 69.91 kB · 2 downloads

 

EDIT: I restarted the system, and now the card appeared in Disk Utility, but with Unknown FS and table, can't format, can't mount. After removing the card it is still showing up in Disk Utility, any other card inserted after that isn't recognized. 

 

 

Your kernel log is incomplete. Refer to the FAQs.

Link to comment
Share on other sites

Posted (edited)
On 8/20/2021 at 10:31 PM, gnpaone said:

1. The mac couldn't differentiate between microsd card (attached via sdcard reader) and a sdcard (icon wise, as other kext like sinetex-rtsx including native apple supported readers can differentiate it - I know this is a silly issue but it is an issue)

 

As far as I know, neither Sinetex-rtsx nor AppleSDXC has this feature.

From the perspective of the driver, both full-size and micro-size cards are "SD cards".

And as a matter of fact, Apple does not provide the icon for micro-SD cards (at least under macOS Big Sur).

 

On 8/20/2021 at 10:31 PM, gnpaone said:

2. Unlike native apple supported card readers, this kext couldn't report sdcard details to system information, as a result it is not showing card details under usb2.0-crw and in card reader section in system information

 

This feature is not implemented for USB-based card readers yet.

 

On 8/20/2021 at 10:31 PM, gnpaone said:

1. This kext doesn't eject the card, if I click eject it shows either "failed to unmount" error

 

On 8/20/2021 at 10:31 PM, gnpaone said:

3. This kext now works good with both uhs and non-uhs but only working with mbr partition table, not gpt/guid partition table.

 

These issues are related to timed out DMA transfers, and the latest version should fix them.

 

On 8/20/2021 at 10:31 PM, gnpaone said:

the card reader kext works card reader inserted before boot as well as first time hotplug after boot, but not multiple hotplugs

 

There is a polling thread that monitors card events every 500ms but was temporarily disabled to debug the DMA issue.

The latest version have turned it on but you can disable it by the boot argument `-rtsxsppp`.

 

On 8/20/2021 at 10:31 PM, gnpaone said:

Please don't think me wrong that I am telling these many issues after the long developments, I know this kext is still in beta mode and I thought it's better to report these problems

 

I really appreciate your bug reports as I don't own any Realtek USB card readers and cannot test the driver by myself.

Support for USB-based card readers is relatively new and immature, and as a result, you are joining the alpha testing club.

 

--------------------------------------------------------------------------------------------------------------------------------

 

So, for those who have USB-based card readers, please focus on the following areas when you are testing the latest version:

Always backup your important files on the card before testing the driver.

1) Check if your card can be initialized properly and show up on your desktop.

2) Check if you can copy files from/to the card properly. (e.g., Verify the MD5 checksum of the original and the copied file.)

3) Check if the read and write speed is reasonable and if so test the speed with the RELEASE version.

4) Check if the card is ejected and then attached while you are transferring files from/to the card.

5) Check if your UHS-I SDXC cards work under the above scenarios. (I received a bug report that SDXC cards were not responding to CMD18 properly.)

Edited by Austere.J
  • Thanks 1
Link to comment
Share on other sites

14 hours ago, Austere.J said:

 

Your kernel log is incomplete. Refer to the FAQs.

I did boot with debug version and with msgbuf=10485760, but after executing sudo dmesg | grep RTSX > ~/Desktop/rtsx.log , the log was empty (Also tried with DebugEnhancer)

The only log I can produce is when inserting a card, and immediately after that do a dmesg. 

Maybe it's because of Monterey, idk.

Link to comment
Share on other sites

16 hours ago, Austere.J said:

I really appreciate your bug reports as I don't own any Realtek USB card readers and cannot test the driver by myself.

Support for USB-based card readers is relatively new and immature, and as a result, you are joining the alpha testing club.

Thank you sir ☺️

 

I tested the latest 7920898 build of the kext (debug version). I found that few bugs that are previously present still exists and remaining previous bugs especially major bugs got solved and few major bugs (not considered as that big major bug but it's still can be listed under major bug) arised. 

 

Major bugs:

Firstly, everything (all functions similar to original Mac/original supported Apple Card readers) works fine and upto the mark for a standard user and could not be complained and is almost perfect.

1. After multiple hotplugs (both short interval between hotplugs as well as long intervals - less likely this issue occurs like 20-25 times for long interval case (here "interval" in the sense consists time gap between removing sdcard from reader and inserting, as well as inserting sdcard for a long time and removing the sdcard and inserting sdcard again - both cases) like 8-10 times, the card reader fails to detect the card, so now I removed the card and inserted back and it detects card in IOReg alongwith partitions but disk utility and Mac doesn't show up partitions to open, read and write; now I again removed my card and inserted, only now it detects as normal. This happens for every some number of hotplugs. (I uploaded my logs below but I am not sure if you can figure out that number of hotplugs to find the issue, nevertheless it's the 5th or 6th insertion (from last) of card into the reader)

2. After multiple number of hotplugs, the card reader shows signs of degradation type (kind of - I forgot the exact word to describe it 😅). I mean it takes milliseconds to seconds time for my files to appear in my sdcard folder after I insert my card after multiple hotplugs, until then it appears empty, also it takes nearly a minute to eject (that's a considerable amount of time and also is a significant jump in time interval between clicking eject to ejecting the card as compared to "the before hotplug (insertion and ejecting) to current hotplug").

 

Note: Here I cycled between various types & models of sdcards for each hotplug as well as inserted same sdcard for 2-3 times in-between to check the performance and did various tests too.

 

Not solved bugs:

2nd one in minor bugs of my previous post

On 8/21/2021 at 11:01 AM, gnpaone said:

Minor issues:

2. Unlike native apple supported card readers, this kext couldn't report sdcard details to system information, as a result it is not showing card details under usb2.0-crw and in card reader section in system information

 

17 hours ago, Austere.J said:

This feature is not implemented for USB-based card readers yet.

 

Fixed bugs:

On 8/21/2021 at 11:01 AM, gnpaone said:

Major issues:

1. This kext doesn't eject the card, if I click eject it shows either "failed to unmount" error (same error while trying to format too) or the whole system or just finder gets hanged (gets stuck).

2. If I force eject the card or remove without ejecting/unmounting, then if I insert the card again (while the system is running only condition, after boot) my system couldn't detect the card reader, i.e., the card reader kext works card reader inserted before boot as well as first time hotplug after boot, but not multiple hotplugs (with/without ejecting - like 851ede2 variant kext (it has other various issues as I posted in my earlier posts 😅)). One more thing, if I remove without ejecting/unmounting, then the card doesn't disappear from the system, I can still open the folder of sdcard after removing (but not access the files in it tho)

3. This kext now works good with both uhs and non-uhs but only working with mbr partition table, not gpt/guid partition table. Please check that. I tried various types of guid cards but none of them could read/open my card and gives error as filesystem couldn't be recognized. But I'm sure mac knew guid partition table and those guid cards are opening with some external usb card reader (I mean the "external" one available in the market, I think you understood what I am telling).

 

18 hours ago, Austere.J said:

These issues are related to timed out DMA transfers, and the latest version should fix them.

 

 

On 8/21/2021 at 11:01 AM, gnpaone said:

Minor issues:

1. The mac couldn't differentiate between microsd card (attached via sdcard reader) and a sdcard (icon wise, as other kext like sinetex-rtsx including native apple supported readers can differentiate it - I know this is a silly issue but it is an issue)

 

17 hours ago, Austere.J said:

As far as I know, neither Sinetex-rtsx nor AppleSDXC has this feature.

From the perspective of the driver, both full-size and micro-size cards are "SD cards".

And as a matter of fact, Apple does not provide the icon for micro-SD cards (at least under macOS Big Sur).

I am sorry 😔, I downloaded AppleSDXC and sinetek rtsx kexts like 7 months back and I remember seeing different .icns key for microsd and sdcard in info.plist from some user long back and didn't check if it's legit, my mistake (I couldn't find that downloaded kexts now, probably I deleted it).

 

17 hours ago, Austere.J said:

There is a polling thread that monitors card events every 500ms but was temporarily disabled to debug the DMA issue.

The latest version have turned it on but you can disable it by the boot argument `-rtsxsppp`.

I think this -rtsxsppp boot argument is not needed (maybe) as multiple hotplugs are working fine now but you please suggest sir @Austere.J after seeing the logs uploaded below if I should test it sir. Thanks

 

17 hours ago, Austere.J said:

1) Check if your card can be initialized properly and show up on your desktop.

2) Check if you can copy files from/to the card properly. (e.g., Verify the MD5 checksum of the original and the copied file.)

3) Check if the read and write speed is reasonable and if so test the speed with the RELEASE version.

4) Check if the card is ejected and then attached while you are transferring files from/to the card.

5) Check if your UHS-I SDXC cards work under the above scenarios. (I received a bug report that SDXC cards were not responding to CMD18 properly.)

1) Yes, all models/varieties of sdhc card(including mbr & gpt, microsd and sdcard) is initialised and showing in desktop.

2) The files are getting transferred from/to sd card fine (including formatting the card).

3) As far as speed is concerned, the transfer speeds are pretty decent, it's almost equal to original card speeds so no problem with it (tested high end high speed cards too).

4) The card is ejecting and inserting good (both via formally ejecting using disk utility/right click menu as well as forcibly removing sdcard while idle or while some operation going on).

5) Mm sorry I don't have SDXC card but I will test that too soon and edit this post if any issues exists (or create a new post 😋).

rtsx-7920898.zip

  • Thanks 1
Link to comment
Share on other sites

Did test for pre-beta 0.9.6 which is gonna be released soon

My RTS5129 is fully working now (reading, writing). Speeds are good, no issues appeared, except one, which is known by @Austere.J and he will fix it, once he have time for that. 

Driver itself is very stable. Really happy that USB-based readers from Realtek are working on macOS now! 

 

Thank you again so much for that work!

Screenshot 2021-08-28 at 02.17.05.png

Edited by b0ltun
add
  • Thanks 1
Link to comment
Share on other sites

On 8/26/2021 at 8:19 AM, gnpaone said:

the card reader fails to detect the card, so now I removed the card and inserted back and it detects card in IOReg alongwith partitions but disk utility and Mac doesn't show up partitions to open, read and write

 

On 8/26/2021 at 8:19 AM, gnpaone said:

After multiple number of hotplugs, the card reader shows signs of degradation type

 

Your kernel log did not reveal or capture such behaviors.

I didn't find any error messages in the log.

Note that the kernel buffer has a limited capacity thus cannot capture everything after a long run.

 

On 8/26/2021 at 8:19 AM, gnpaone said:

Not solved bugs:

2nd one in minor bugs of my previous post

 

You don't need to repeat what have not yet been implemented, as I have a list that keeps track of everything. :)

The latest release has added support for USB-based card readers.

 

On 8/26/2021 at 8:19 AM, gnpaone said:

I think this -rtsxsppp boot argument is not needed (maybe) as multiple hotplugs are working fine now

 

This boot argument is for debugging purposes only and has been removed.

  • Like 1
Link to comment
Share on other sites

v0.9.6 comes with a bunch of fairly important bug fixes and enhancements.

Downloads are available at the release page.

 

In short, the driver is pretty stable now.

USB-based card readers should be working properly, while PCIe-based ones should work even better than before.

Please refer to the changelog for a list of changes since the previous 0.9.5 release.

 

I would like to acknowledge the following members, @b0ltun, @Sherlocks, @whatnameisit, and @gnpaone, for testing early, unstable builds and reporting issues for USB-based card readers.

This release won't be possible without their support.

Thank you every much. :thumbsup_anim:

  • Like 5
Link to comment
Share on other sites

  • Austere.J changed the title to Realtek PCIe/USB SD Card Reader Driver for macOS
13 minutes ago, Austere.J said:

v0.9.6 comes with a bunch of fairly important bug fixes and enhancements.

Downloads are available at the release page.

 

In short, the driver is pretty stable now.

USB-based card readers should be working properly, while PCIe-based ones should work even better than before.

Please refer to the changelog for a list of changes since the previous 0.9.5 release.

 

I would like to acknowledge the following members, @b0ltun, @Sherlocks, @whatnameisit, and @gnpaone, for testing early, unstable builds and reporting issues for USB-based card readers.

This release won't be possible without their support.

Thank you every much. :thumbsup_anim:

 

perfect working.!!

thank you for hard work.

now my laptop is everything working.

1646592094_2021-08-2810_43_07.png.6c970691a334b7386c8f6c1e518fa32e.png

  • Haha 1
Link to comment
Share on other sites

×
×
  • Create New...