Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Camera / bluetooth not working on yogamsc branch #57

Closed
Charlyo opened this issue Nov 16, 2020 · 22 comments
Closed

Camera / bluetooth not working on yogamsc branch #57

Charlyo opened this issue Nov 16, 2020 · 22 comments
Labels
bug Something isn't working

Comments

@Charlyo
Copy link

Charlyo commented Nov 16, 2020

Hi @EETagent!

Thank you for all your work.

Currently I've gotten a T480 (i5 8350U) and installed your yoga smc branch since I wanted to have YogaSMC.

However, despite having all the necessary USB ports in the XHC.aml file, at least the camera and bluetooth (from a bradcom 4352z) are not working. Both devices work with USBInjectAll.

Let me know if changes have to be made!

Best regards!

@EETagent
Copy link
Owner

Hi @Charlyo

Thanks for testing experimental branch. I actually did not test webcam and Bluetooth since moving to SSDT-XHC, Bluetooth tray icon on Big Sur is not crossed out when unavailable unlike on Catalina so this change went undetected :) I already edited draft's false description. For now you can remove this patch and add USBMap/USBPorts back.

@benbender
image

HS08, HS07 and SS03 are undetected and neither of them works. How we can help to solve this?

Current HS08 config looks OK to me

0xFF - Port is enabled
0xFF - Internal connector type
Zero, 
Zero

@Charlyo
Copy link
Author

Charlyo commented Nov 16, 2020

Thanks for the update @EETagent!!

Actually, if you think it through, only the "internal" ports fail.

@benbender
Copy link

benbender commented Nov 16, 2020

@EETagent It seems that you copied my config from the X1C6 but it differs from the T480. F.e. S03 is internal and SDCard on the T480 because the T480 only has one TB-port.

Edit: proposed my config in #58

@EETagent
Copy link
Owner

Thanks @benbender,

sadly the situation has not changed. These 3 USB devices still does not work.

@benbender
Copy link

benbender commented Nov 17, 2020

A bit more info would be nice :) IOReg-dump? Logs? Is the SSDT applied? Rename for _UPC to XUPC in place?

PS: The SSDT itself and those devices are working as I'm running it right now on my T480.

@benbender
Copy link

benbender commented Nov 17, 2020

If your config.plist from the YogaSMC-branch is complete, you are missing the needed patch:

			<dict>
				<key>Comment</key>
				<string>XHC: _UPC to XUPC</string>
				<key>Count</key>
				<integer>0</integer>
				<key>Enabled</key>
				<true/>
				<key>Find</key>
				<data>X1VQQw==</data>
				<key>Limit</key>
				<integer>0</integer>
				<key>Mask</key>
				<data></data>
				<key>OemTableId</key>
				<data>UHJvalNzZHQ=</data>
				<key>Replace</key>
				<data>WFVQQw==</data>
				<key>ReplaceMask</key>
				<data></data>
				<key>Skip</key>
				<integer>0</integer>
				<key>TableLength</key>
				<integer>6103</integer>
				<key>TableSignature</key>
				<data>U1NEVA==</data>
			</dict>

This patch renames all USB-port-definitions in ACPI and redoes them. Today I refined my XHC-SSDT for the X1C6. It may be worth to adapt those changes. This patch may need adaption for the table-length to get applied.

For the future: please check if patches you adapt from me are cleanly applied. In this case they can't be without that patch as the _UPC-definitions collide. Check with a search for AE_ in log show --last boot.

@EETagent
Copy link
Owner

No _UPC to XUPC rename ...

Will fix that and report back

@EETagent
Copy link
Owner

EETagent commented Nov 17, 2020

For the future: please check if patches you adapt from me are cleanly applied. In this case they can't be without that patch as the _UPC-definitions collide. Check with a search for AE_ in log show --last boot.

It does not seem so ( With _XUPC rename in place )

image

@benbender
Copy link

benbender commented Nov 17, 2020

You are patching a SSDT. This is different from patching DSDT as it needs the correct Table-signature and length to be applied because there can (and will) be multiple SSDT's on the system. Both values can be found in the header of the SSDT to be patched. View the original XHC-SSDT with MacIASL and adapt the patch accordingly. As said above, the patch is taken from my X1C6 as I only have that at hand.

Additionally, grep'ing for AE_ only shows that there are errors. To see the message, grep after AppleACPIPlatform in the logs. The actual error-messages are below the lines starting with AE_.

PS: I urgently need to do a writeup on how to do basic ACPI-debugging :)

@EETagent
Copy link
Owner

image

PS: I urgently need to do a writeup on how to do basic ACPI-debugging :)

Yes, that would be great :)

@benbender
Copy link

As I said - The patch isn't applied because OpenCore can't find the table.

				<key>TableLength</key>
				<integer>6103</integer>

Probably only the length needs to be adapted. Please switch the value with the one found in the original SSDT for the T480 in MacIASL.

@EETagent
Copy link
Owner

Length replaced, SSDT still does not run
image

@Charlyo
Copy link
Author

Charlyo commented Nov 17, 2020

@EETagent have you changed OemTableId to the actual file one?

@EETagent
Copy link
Owner

@EETagent have you changed OemTableId to the actual file one?

Well, no. Currently there is ProjSsdt, will replace it with _XHC

@Charlyo
Copy link
Author

Charlyo commented Nov 17, 2020

Not sure if necessary, just felt weird (at least to me).

@EETagent
Copy link
Owner

EETagent commented Nov 17, 2020

 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x0000064E (1614)
 *     Revision         0x02
 *     Checksum         0x9D
 *     OEM ID           "T480"
 *     OEM Table ID     "_XHC"
 *     OEM Revision     0x00001000 (4096)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20200925 (538970405)
 */
  • OemTableId _XHC (5F584843)
  • TableLenght 1614
  • TableSignature SSDT (53534454)

Rename still does not apply.

@benbender
Copy link

benbender commented Nov 17, 2020

Length replaced, SSDT still does not run
image

Thats the length of your SSDT, not the original. The original is ProjSsdt as @Charlyo said and should be longer.

@EETagent
Copy link
Owner

EETagent commented Nov 17, 2020

Length replaced, SSDT still does not run

Thats the length of your SSDT, not the original. The original is ProjSsdt as @Charlyo said and should be longer.

I am idiot, will fix it immediately

@EETagent
Copy link
Owner

OK, so length of ProjSsdt is 5692

@EETagent
Copy link
Owner

Webcam, Bluetooth and SD Card finally works! Thanks @benbender for all your help

@EETagent
Copy link
Owner

@Charlyo Fixed in 4ef5625

Please try and report back

@Charlyo
Copy link
Author

Charlyo commented Nov 17, 2020

Working perfectly on last commit!

@Charlyo Charlyo closed this as completed Nov 17, 2020
@EETagent EETagent added the bug Something isn't working label Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants