Bizzaro / x230-osx

Thinkpad x230 running OS X 100% natively
GNU General Public License v3.0
141 stars 53 forks source link

Could you have a detail fix the audio guide? #4

Open leolicai opened 7 years ago

leolicai commented 7 years ago

I have patched the DSDT with your repo dsdt patches. And what the next do? If modify the AppleHDA.kext, where need edited? Thanks so much!

BTW The Fn + F8/F9 patch is error patch!

chuckhacker commented 7 years ago

Yes, more information would be helpful. I would like to be able to patch my own AppleHDA kext in Sierra. I see there is a utility to patch Apple HDA included in this repo, and I ran it, and it looked like it succeeded, but I wasn't sure where the output files ended up?

For now, I am using VoodooHDA.

chuckhacker commented 7 years ago

I also noticed that there is no ALC297VC_v3 -- I only see a ALC297VC_v2 -- was this a typo? Google doesn't return any search results for v3 either.

pcmantinker commented 7 years ago

I have the x230t and haven't been able to get audio working without VoodooHDA. I read something about dumping your audio codec using Linux and then patching accordingly, but I was unsuccessful on the macOS side. From the audio codec dump in Linux, my codec is actually an ALC269VC v2. Your codec may vary depending on your laptop. My audio layout is 13 so injected using Clover, but no sound devices were detected. I'd prefer a Clover approach or some other approach that doesn't involve patching AppleHDA as I don't want to have to do that after every update.

pcmantinker commented 7 years ago

This may be of some help, but I've not been able to get working with my ALC269VC v2: https://github.com/insanelydeepak/cloverHDA-for-Mac-OS-Sierra-10.12/tree/master/Laptop

chuckhacker commented 7 years ago

Maybe @Bizzaro could give us some pointers?

chuckhacker commented 7 years ago

@leolicai For Fn+F8/F9 patch, see this issue:

6

Syntax has slightly changed for ACPI 6.0, from what I understand.

TheKnightCoder commented 7 years ago

Has anyone figured this out yet? I am trying to get sound working on Sierra? How do I get the sound to work?

chuckhacker commented 7 years ago

I still haven't figured it out. I tried doing the "DSDT patch HDEF + IRQ (layout-id is in hex)" again today, and even with both patches, and after patching AppleHDA.kext with the ALC269VC v2 codec from https://github.com/Mirone/AppleHDAPatcher

I am still the greyed out speaker. I'd strongly prefer not to use VoodooHDA, even though it is a working band-aid (bad background noise, no autodetection of headphones plugged in, etc.).

Any ideas? Maybe @Bizzaro can help point us all in the right direction?

chuckhacker commented 7 years ago

Update: I got headphone out working (but not microphone in and internal built-in speaker out). Details soon to follow.

TheKnightCoder commented 7 years ago

Thats great @chuckhacker looking forward to the details

nouatzi commented 7 years ago

For the audio use cloverHDA.
Select Laptop, then unzip ALC269VC_v1/v2/v3.zip. You try between v1 v2 and v3. v1 worked for me.

Don't forget CodecCommander.kext.
This method works without touching the vanilla AppleHDA.kext. If you did modified the vanilla AppleHDA.kext, you'll need to restore it. You can found it too in the link above.
Sometime, after sleep, there is no sound, so I use this script in a terminal:
alias reloadcodeccommander='sudo kextunload /System/Library/Extensions/CodecCommander.kext && sleep 3 && sudo kextload /System/Library/Extensions/CodecCommander.kext'
You can put permanently in you .bash_profile.
And you're good to go!

mgraham commented 7 years ago

I must be doing something wrong - I haven't been able to get audio working on 10.11.6 using cloverHDA or Mirone's AppleHDA Patcher (using DSDT+clover's plist, or directly patching the AppleHDA kext).

I've gotten to the point where I can see the device in system information, but not in the sound preferences pane.

Is there any way of telling whether my x230 is using v1, v2 or v3 based on my linux codec dump? Whenever I try a new strategy, it involves 3 reboots per method to see if it works - it's such a slow process of trial and error.

nouatzi commented 7 years ago

@mgraham , did you installed CodecCommander.kext from Rehabman ? It seems v1, v2 and v3 are working in Sierra (latest).

ymuns commented 7 years ago

@mgraham, Can I see the dsdt you use?

mgraham commented 7 years ago

Ok, I just tried again with the DSDT+CloverHDA+CodeCommander, using ALC269VC_v1. No luck.

@nouatzi: Thank you for the nudge to install CodeCommander. I was waiting to install it until after I got audio working - I knew it was necessary for audio after sleep, etc. I didn't realize that it was necessary for audio to work at all. Anyway, I've installed it now, but I didn't add any DSDT config for it specific to ALC269VC. Should I?

@ymuns Here is my DSDT.dsl:

https://gist.github.com/mgraham/d510b5e3bdeab924723cf1e0e059983f

nouatzi commented 7 years ago

@mgraham , I haven't found a way to properly configure CodecCommander, so for now I use it as it is. So I believe you've updated your clover config.plist in order to add what's in config-cloverHDA.plist ? There are 2 things in config.plist to add:

take a look at my config PS: I use Clover Configurator app to edit my config.plist

mgraham commented 7 years ago

@nouatzi - Yup, I did update clover's config.plist. but I did it manually (copying and pasting in two xcode windows). So I may have made a mistake.

Thanks very much for your config - I will do a text diff on them tonight!

mgraham commented 7 years ago

@nouatzi - you're using a vanilla AppleHDA.kext, right?

edit - sorry - I see that you mentioned that in your original post.

ymuns commented 7 years ago

@mgraham - i fix your dsdt<_IRC, HDEF, and think vantage button (if you press think vantage key, the fan speed change max or normal ) and led patch too

first. clover config.plist Devices -> Audio -> Inject : 28 Kernel and Kext Patches -> KextsToPatch: 3 AppleHDA patches to apply

second. you use kextutility S/L/E (AppleHDARealtekALC269.kext) and Never delete it(Applehda)

I hope to hear good news for you

mgraham commented 7 years ago

@ymuns - thank you! I installed your config.plist and your DSDT.aml and the kext, but there were still no audio devices in the Sound Preferences Panel.

Would you mind giving me the source patches you made? I disassembled your DSDT.aml and tried diffing with my own DSDT.dsl, but there are too many irrelevant differences to see the patches you made.

mgraham commented 7 years ago

@nouatzi - I tried installing your clover plist and your DSDT.aml file and the cloverHDA.kext, and still not working :(

Thanks for sharing your config.

ymuns commented 7 years ago

@mgraham you should save as .aml and then efi>clover>acpi>patch

i think hda patcher affected your original applehda trying again (original had.kext -10.11.6 version )

  1. s/l/e(original applehda.kext + alc269.kext)

  2. check my config.plist(device audio layout id 28 and kernel and kext to patch) and match your config.plist

  3. you should cashe rebuild open terminal sudo touch /System/Library/Extensions && sudo kextcache -u /

  4. reboot

mgraham commented 7 years ago

@ymuns - still not working. :(

Thanks for giving me a vanilla AppleHDA.kext - I was beginning to wonder if that was the problem. Does not seem to make a difference, though.

I did the following: $ mkdir /Volumes/efi $ sudo mount -tmsdos /dev/disk0s2 /Volumes/efi

Ran: $ sudo touch /System/Library/Extensions && sudo kextcache -u /

Rebooted.

System Information shows Audio-> Devices -> Intel High Definition Audio -> Audio ID: 28

Sound Preference Pane shows:

I am getting the following messages in the console - not sure if they're relevant:

2017-06-07 2:12:50.000 AM kernel[0]: CodecCommander: Version 2.6.3 starting on OS X Darwin 15.6.
2017-06-07 2:12:50.000 AM kernel[0]: Sound assertion in AppleHDAController at line 567
2017-06-07 2:12:50.000 AM kernel[0]: Sound assertion in AppleHDAController at line 421
nouatzi commented 7 years ago

My method is for Sierra.
However from the same user, there is another repository for ElCapitan. Did you tried this one ?

ymuns commented 7 years ago

@mgraham Could you give me efi / clover folders and a list of using kext?

ymuns commented 7 years ago

@mgraham

trying again (more compile original dsdt x230)

mgraham commented 7 years ago

@noatzi - I don't know how I missed that! I tried with the ElCapitan repo and still no joy.

BUT - @ymuns - your last compile worked!!! I have sound!!!

Thank you both for helping me get this working! It has been a lot of sleep-deprived nights for me!

mgraham commented 7 years ago

@ymuns - Could you please give me the uncompiled source for the DSDT? I'd like to figure out why it worked when nothing else did.

Also, where did AppleHDARealtekALC269.kext come from? Did you make it yourself? How does it work?

By the way, this time I did exactly the same as last time - copied your DSDT.aml and config.plist onto the EFI partition, installed the AppleHDARealtekALC269.kext, cleaned the cache and rebooted. I didn't install any of the other kexts you supplied.

(Although CodecCommander.kext is still installed from before).

mgraham commented 7 years ago

Also, @ymuns, I tried your fix with my own config.plist (after copying in your KextsToPatch section).

It still works great. So it was something with my DSDT file, I think.

ymuns commented 7 years ago

@mgraham I think something patch you applied affects HDA, so dsdt.aml does not work and I seek the original x230 dsdt.aml and patched them in order. I also experienced your situation and no one helped me so I wanted to help you

My source _ rehabman laptop patch and alc269.kext( https://www.tonymacx86.com/threads/guide-lenovo-t430-el-capitan.175935/)

I know that once the driver is loaded, it will work before the big changes happen. anyway, I'm glad you got the sound. Have a good day

mgraham commented 7 years ago

@ymuns - That was definitely the right approach - I should have tried rebuilding my DSDT.aml from scratch myself!

Thanks very much for your help! Sorry you didn't get help when you needed it.

mgraham commented 7 years ago

I was able to get audio working from scratch, by starting with a fresh DSDT (as suggested by @ymuns) and then: