Jump to content

AppleHDA Realtek Audio


  • Please log in to reply
12 replies to this topic

#1
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

AppleHDA Realtek Audio

Realtek ALC/Desktop: 885, 887, 888, 892, 898, 1150 and 1220 on board audio

Supports macOS: 10.13, 10.12, 10.11, 10.10, 10.9 and 10.8 

 

Enables macOS Realtek ALC on board audio for Intel desktop motherboards. This guide provides files and instructions for enabling native macOS AppleHDA Realtek audio. Codec specific script edits binaries and installs specific files. Depending on user requirements, select one AppleHDA Realtek Audio Installation Method.

 

Recommendations:

  1. cloverALC: detects audio codec, verifies audio configuration and installs codec specific files enabling persistent macOS Realtek desktop motherboard HD audio (native AppleHDA and Clover required).
  2. AppleALC: open source kernel extension enabling persistent macOS HD audio without file system modifications (native AppleHDA required).

Change Log

v1.3: 10/9/17 - 10.13 Support, Kaby Lake/200 Series support, realtekALC pikeralphaALC and NUC/BRIX deprecated

v1.2: 7/29/17 - X299  Support, see VII. Unsupported/Non-working/Non-native ... 2. X299

v1.1: 7/5/17 - Initial High Sierra Desktop/Realtek AppleHDA Audio (install one method only)

v1.0: 6/20/17 - Supports all versions of macOS, 10.8 to current

 

macOS/Desktop/Realtek Audio Success/First Steps

macOS has not natively supported any Realtek audio codecs since the MacPro3,1. Codec specific BIOS and OS binary edits enable nearly native macOS audio. There are many macOS audio solutions, however, all solutions require HDEF and Audio ID. This guide identifies the necessary steps to ensure macOS audio success on the first try.

 

Before You Install Audio (All methods, all macOS versions, 10.8 and newer)

  1. Remove previous installed methods (clean install recommended)
    • VIII. Uninstall AppleHDA Realtek Audio
    • Other methods, contact Developer
  2. Native AppleHDA (skip if clean install)
    • IX. Tools/5. Restore native AppleHDA.kext [Guide]
  3. Disable SIP/Restart (10.11 and newer, if enabled)
    • Clover: config.plist/RtVariables/CsrActiveConfig/0x3 or 0x67
  4. Mount EFI partition (Clover only)
    • Search: mac mount efi partition
  5. IOReg/HDEF
    • IX. Tools/1. IORegistryExplorer/Search/HDEF (verify supported) 
  6. Realtek codec (required for AppleHDA8series only)
    • IX. Tools/1. IORegistryExplore/Search: CodecDevice (note codec id)
    • III. Realtek Codecs and Applications (verify support)
  7. Audio_ID (determine Audio ID, set Audio ID Injection, restart, verify)
    • IV. Audio IDs (1 recommended, 2, or 3)
    • V. Audio ID Injection (ssdt recommended)
    • IX. Tools/3. audio_codecdetect.command (verify support) 
  8. Ready to install audio

AppleHDA Realtek Audio Installation Methods

Select one method; uninstall to try another method

 

I. cloverALC script

II. AppleALC kext

Repo downloads: select link, select View Raw, double click Downloads/audio . . . command

 

I. cloverALC script

  1. Download script (select one script, Download/View Raw)
    1. audio_cloverALC.command.zip
      • USER: set Audio ID/layout-id (1, 2, or 3)
      • patch kernel cache
      • no edits to any native AppleHDA.kext file
      • 2-4 files added to Resources folder
      • Clover only
  2. Double Click Downloads/audio_. . .ALC-x0. . .command
  3. Enter Password
  4. Answer questions (y/n)
  5. Restart

II. AppleALC kext

  1. vit9696/AppleALC - AppleALC
    1. Downloads
    2. See Supported codecs · vit9696/AppleALC Wiki · GitHub

    3. USER: set Audio ID/layout-id (1, 2, or 3)
    4. Install Downloads/AppleALC.kext and Lilu.kext to EFI/CLOVER/kexts/Other
    5. Restart
    6. Chameleon, Clover, Osmosis, others

III. Realtek Codecs and Applications (Codec/Device_ID/Application/Audio ID(s)/Audio Devices)

  1. ALC885/0x10ec0885/Desktop/1/All
    • ​​ALC889A/same as ALC885 
  2. ALC887/0x10ec0887_v003002/Desktop/1 or 2 or 3/All
    • ALC887-L/0x10ec0887_v002002Desktop/1 or 2/All
      • ALC888B/same as ALC887  
  3. ALC888/0x10ec0888_v003002/Desktop/1 or 2 or 3/All
    • ALC888-L/0x10ec0888_v002002Desktop/1 or 2/All
      • ALC888S/same as ALC888  
  4. ALC889/0x10ec0889/Desktop/1 or 2/All
  5. ALC892/0x10ec0892/Desktop/1 or 2 or 3/All
  6. ALC898/0x10ec0899/Desktop/1 or 2 or 3/All
  7. ALC1150/0x10ec0900/Desktop/1 or 2/All
  8. ALC1220 
    • 1220A/0x10ec1168/Desktop/1 or 2/All
    • 1220/0x10ec11220/Desktop/1 or 2/All

IV. Audio IDs

  1. Audio ID: 1 (motherboard with 3, 5 or 6 audio ports)
    • Stereo (2 inputs, 4 outputs), 5.1 analog surround (3 outputs) and 5.1 digital surround (optical)
      • Front Panel: Pink & Green
      • Motherboard: Pink, Blue, Green, Orange, Black and SPDIF
  2. Audio ID: 2 (motherboard with 3 audio ports, enables analog surround sound))
    • Stereo (1 input, 4 outputs), 5.1 analog surround (3 outputs) and 5.1 digital surround (optical)
      • Front Panel: Pink & Green
      • Motherboard: Green, Pink (> Orange), Blue (> Black) and SPDIF
  3. Audio ID: 3 (enables HD3000/HD4000 HDMI audio only)
    • Stereo (2 inputs, 3 outputs) and 5.1 digital surround (optical)
      • Front Panel: Pink & Green
      • Motherboard: Pink, Blue, Green, Black and SPDIF
        • No Orange support
        • if required, see More Info/2. Customization guide (below) 

V. Audio ID Injectionaudio_ALCInjection

  • HDEF/dsdt/layout-id = Audio_ID
  • HDEF/ssdt/layout-id = Audio_ID, see ssdt_hdef
  • HDEF/Clover/config.plist/Devices/Audio/Inject/Audio_ID
  • HDEF/Chameleon/Extra/org.chameleon.Boot.plist
    • HDAEnabler = Yes
    • HDEFLayoutID = 01000000 or 02000000 or 0300000 

VI. Requirements

  1. macOS (10.10 and newer boot flags)
    1. 10.13/10.12/10.11 and newer/Boot flags (install/edit kexts and rebuild cache)
      • CLOVER/config.plist/
        • ACPI/DSDT/Fixes/NO (all or remove)
        • BooterConfig/0x28
        • CsrActiveConfig/0x3
      • Chameleon - Extra/org.chameleon.Boot.plist
        • CsrActiveConfig=3
    2. ​​10.10 and newer/Boot flags
      • Clover/config.plist/
        • ACPI/DSDT/Fixes/NO (all or remove)
        • Boot/Arguments/kext-dev-mode=1
      • Chameleon/Extra/org.chameleon.Boot.plist
        • Kernel Flags//kext-dev-mode=1
  2. Intel Desktop motherboards
    1. Desktop
      • 200 Series - Z270, H270, B250 ...
      • 100 Series - Z170, H170, B150 ...
      • 9 Series - Z97, H97, B95
      • 8 Series - Z87, H87, B85, H81 ...
      • 7 Series - Z77, H77, B75 ...
      • 6 Series - Z68, P67, H67, H61 ...
      • 5 Series - P55, H55 ...
    2. Workstation
      • X299
      • X99
      • X79
      • X58
  3. Native AppleHDA (Restore native AppleHDA [Guide].pdf)
  4. Audio codec/ALC Injection, see Tools 3. (below), confirms:
    • Supported Codecs, see Realtek Codecs and Applications (below)
    • Supported Audio IDs, see Audio IDs (below)
    • Working Audio ID Injection, Audio ID Injection (below)

VII. Unsupported/Non-working/Non-native AppleHDA Realtek Audio

  1. 100/200 Series/Intel High Definition Audio (Workaround requires 1, 2, 3 and 4)
    1. Rename dsdt/HDAS to HDEF  (Select one method)
    2. Restart
    3. Install AppleHDA Realtek Audio (see I. or II., above)

      • ​​​200 Series/10.12.x only HD Audio device_id
    4. Restart
  2. X299/Intel High Definition Audio  (Workaround requires 1, 2, 3 and 4), 10.12+/credit BJY1991
    1. Rename dsdt/CAVS to HDEF (Select one method)
      1. Clover: Download/config-audio_cloverALC-x299.plist.zip
        • Add config.plist/ACPI/DSDT/Patches/Item 0 (Rename CAVS to HDEF)
      2. ssdt injection (any bootloader):
    2. Restart
    3. Install AppleHDA Realtek Audio (see I. or II., above)

      1. X299/10.12.x only HD Audio device_id (Select one method)
    4. Restart
  3. X99/Intel High Definition Audio  (Workaround requires 1, 2, 3, 4 and 5), 10.11+/credit bOLEMO
    1. Rename dsdt/ALZA to HDEF (Select one method)
    2. Restart
    3. Install Realtek ALC Audio (see Realtek ALC Installation Methods)
    4. Add x99 HD Audio device_id (Select one method)
    5. Restart
  4. 887_v100101 and earlier
    • Workaround: try 887 Legacy (v100201)
  5. 888_v100101 and earlier
    • Workaround: try 888 Legacy (v100201)
  6. Asus P67H67 3xxx BIOS: Phantom codec
    • Workaround: 2xxx BIOS downgrade, 7/8 Series motherboard upgrade
  7. MSI motherboards, pre Sandy Bridge
    • Workaround: 6/7/8 Series motherboard upgrade
  8. AC97 (Front Panel)
    • Workaround: HD Audio Front panel

VIII. Uninstall AppleHDA Realtek Audio

  1. cloverALC, remove:
    1. S/L/E/AppleHDA.kext and install the native AppleHDA.kext
      • or S/L/E/AppleHDA.kext/Contents/Resources/layout1.zml.zlib, layout2.zml.zlib, layout3.zml.zlib, Platforms.zml.zlib
    2. config.plist/.../KextsToPatch/AppleHDA (3x)
    3. EFI/CLOVER/kexts/10.xx or other/realtekALC.kex 
  2. pikeralphaALC, remove:
    1. L/E/AppleHDA8xx.kext
    2. config.plist/.../KextsToPatch/AppleHDA (3x)
  3. realtekALC, remove:
    1. S/L/E/AppleHDA.kext and install the native AppleHDA.kext
  4. AppleALC,kext, remove:
    1. EFI/CLOVER/kexts/10.xx or other/AppleALC.kext
    2. EFI/CLOVER/kexts/10.xx or other/Lilu.kext
  5. pikeralpha AppleHDA8Series, remove:
    1. S/L/E/AppleHDA8xx.kext or L/E/AppleHDA8xx.kext

IX. Tools (Repo downloads: select link, select View Raw, double click ...)

  1. IORegistryExplorer_v2.1.zip (select View Raw, double click)
  2. DPCIManager
  3. Audio/ALC Injection: audio_codecdetect.command.zip (select View Raw, double click)
  4. MaciASL
  5. Restore native AppleHDA [Guide].pdf
  6. Clover Wiki: Home

X. Problem Reporting (Post to this thread, attach all requested files)

  1. Description of audio problem
  2. OS X version/motherboard model/BIOS version/processor/graphics
  3. Procedure/Guide Used
  4. Audio/ALC Injection (Tools 3.)
    1. Double click/Downloads/audio_codecdetect.command
    2. Terminal/Shell/File/Export Text As.  
  5. Copy of IOReg - IOReg_v2.1/File/Save a Copy As…, verify file (Tools 1.)
  6. Copy Of Console/All Messages  (last boot)/File/Save a Copy As..
  7. Installed S/L/E/AppleHDA.kext or AppleHDA8Series AppleHDAxxx kext
  8. Screen shots:
    1. DPCIManager/Status (Tools 2.)
    2. System Information/Hardware/Audio/Intel High Definition Audio (not Devices) 
  9. Terminal/Shell/Export Test As. . .  (if script used)
    • audio_realtekALC-100.command
    • AppleHDA8Series.sh
    • audio_cloverALC-100.command 
  10. Chameleon (if installed)
    1. Extra/org.chameleon.Boot.plist
    2. DPCIManager/Misc/Boot Log (Tools 2.)
    3. Extra/dsdt.aml (if installed)
    4. Extra/ssdt.aml (if installed 
  11. Clover (if installed)
    1. EFI/Clover/config.plist
    2. DPCIManager/Misc/Boot Log (Tools 2.)
    3. EFI/Clover/ACPI/Patched/dsdt.aml (if installed)
    4. EFI/Clover/ACP Patched/ssdt.aml (if installed) 

XI. More Information audio_ALC_guides

  1. Capabilities - Realtek ALC AppleHDA_v2 [Guide].pdf
    • Audio_ID Configurations, Surround sound, audio popping, USB start up problem 
  2. Customization - Realtek ALC AppleHDA_v2 [Guide].pdf
    • Manual speaker and headphone selection, Substitute SPDIF-2 Wire Output 
  3. Screenshots - Realtek ALC AppleHDA_v2.pdf
    • System Information/Audio/Intel High Definition Audio, System Preferences/Sound/Output 
  4. No Audio Devices - Realtek ALC AppleHDA [Guide].pdf
    • No audio devices, no sound, no codec 
  5. No Sound - Realtek ALC AppleHDA [Guide].pdf
    • Audio devices present, no sound when selected 
  6. No Audio After Sleep/Wake - Realtek ALC AppleHDA [Fixes].pdf
    • No audio devices on wak 
  7. Surround Sound - Realtek ALC - AppleHDA [Guide].pdf
    • Players, analog, optical

XII. Deprecated Methods (No 10.13 support)

 

AppleHDA Realtek Scripts

 

  1. Download script (select one script, Download/View Raw)
    1. ​​​audio_realtekALC.command.zip
      • ​patch kext in place
      • edits AppleHDA.kext binaries and adds files
      • run script after Software Update
      • Chameleon, Clover, Osmosis, others
    2. audio_pikeralphaALC.command.zip
      • patch kernel cache
      • native AppleHDA.kext (signed)
      • installs AppleHDAxxx.kext (ex., L/E/AppleHDA892.kext)
      • Not supported: ALC269, ALC283, ALC1220
      • Clover only
  2. Double Click Downloads/audio_. . .ALC-1x0. . .command
  3. Enter Password
  4. Answer questions (y/n)
  5. Restart

Additional AppleHDA Realtek Methods

 

  1. Piker-Alpha/AppleHDA8series Script - AppleHDA8Series.sh
    1. Download script (see README)
      • Piker-Alpha/AppleHDA8Series.sh (10.10 working, 10.11/10.12 fix, see below)
        • patch alias
        • no edits to any native AppleHDA.kext file
        • installs AppleHDAxxx.kext (ex., S/L/E/AppleHDA892.kext)
        • Chameleon, Clover, Osmosis, Revoboot, others
    2. Terminal (Select one method)
      • Clover/ALC audio
        • $ ./AppleHDA8Series.s
      • ALC audio:
        • $ ./AppleHDA8Series.sh -b AppleHDA
      • ALC audio and HD4600 HDMI audio:
        • $ ./AppleHDA8Series.sh -b AppleHDA -b AppleHDAController
    3. Enter Password
    4. ... choose desired codec: (1-7)
    5. ... layout-id (y/n)
    6. Answer questions (y/n)
    7. 10.11 fix, see Credit/lisai9093 (below)
    8. Restart
    9. Not supported: ALC269, ALC283, ALC1220
    10. Chameleon, Clover, Osmosis, others

 

Credit

bOLEMO, post #196, El Capitan: Realtek ALC AppleHDA Audio

lisai9093, Post #5, AppleHDA for El Capitan discussion

THe KiNG [HOW TO] Patch AppleHDA - Knowledge Base - Project OS X Forums (archived).

PikeRAlpha New style of AppleHDA.kext patching for Yosemite | Pike's Universum

abxite  http://applelife.ru/...06/#post-353647

TimeWalker75a, Post # 20, No sound after waking from sleep

RevoGirl



#2
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

v1.1: 7/5/17 Initial High Sierra Desktop/Realtek AppleHDA Audio, see Post #1



#3
fabiosun

fabiosun

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,533 posts
  • Gender:Male

Hi Toleda, script is working also in my rig (10.13 beta2 update 1)

I have had to add this line in clover/KextToPatch section:

 

AppleHDAController 

find

a08c

replace

208d


Edited by fabiosun, 06 July 2017 - 09:32 AM.


#4
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

had to add this line in clover/KextToPatch section:

Noted: Post #1/VII. Unsupported/Non-working Realtek ALC AppleHDA/2. X99/Intel High Definition Audio/4. Add x99 HD Audio device_id



#5
cecekpawon

cecekpawon

    InsanelyMac Legend

  • Developers
  • 899 posts
  • Gender:Male

Hello guru,

 

I recently bookmarked some old tuts while being addicted to manually patching AppleHDA while ago:

 

 - THe KiNG [HOW TO] Patch AppleHDA - Knowledge Base - Project OS X Forums (archived).

 - Master Chief [How To] Pinconfig (in case you forgot to mention, or simply ignore this).



#6
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

recently bookmarked some old tuts

Thanks. Post #1, updated.



#7
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

v1.2: 7/29/17 X299  Support, see Post #1



#8
iLeopard_PC

iLeopard_PC

    Geek

  • Members
  • PipPipPipPipPipPip
  • 400 posts
  • Gender:Male
Hi Toleda,
first of all I'm sorry for my bad english.

Since last osx update, I used well your old script audio_cloverALC.command.zip (from http://www.insanelym...da-audio/page-1 ). After last osx update, audio isn't working.

According to your recommendation, i found this new script. So I try to unistall the old one:

VIII. Uninstall Realtek ALC AppleHDA
cloverALC, remove:
S/L/E/AppleHDA.kext and install the native AppleHDA.kext
or
S/L/E/AppleHDA.kext/Contents/Resources/layout1.zml.zlib, layout2.zml.zlib, layout3.zml.zlib, Platforms.zml.zlib
config.plist/.../KextsToPatch/AppleHDA (3x)
EFI/CLOVER/kexts/10.xx or other/realtekALC.kex

Than I reboot my PC (for my mistake without replace AppleHDA) to run your newest script but now my Hackintosh won't boot anymore (not even with -x) because pc hangs at boot or sometimes screen goes black. What can I do?

THX for support

Edit: it hangs here for minutes, than screen goes black
Attached File  IMG_20170802_155829.jpg   131.98KB   0 downloads

#9
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

it hangs here for minutes, than screen goes black

To rerun cloverALC, no need to uninstall cloverALC.

The sound assertions/AppleHDA mean audio is not configured for the installed codec, expected

AppleHDA does not cause boot/hangs or graphics failures/black screen

Uninstalling cloverALC files simply returns AppleHDA.kext to native; same as installing native.

 

Suggestions, boot:

backup

emergency Clover USB

macOS install USB



#10
grandosegood

grandosegood

    InsanelyMac Protégé

  • Members
  • Pip
  • 49 posts

can I do the ACPI patch if I only use SSDTs?



#11
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

can I do the ACPI patch if I only use SSDTs?

what ACPI patch are you inquiring?



#12
toleda

toleda

    InsanelyMac Deity

  • Gurus
  • 2,041 posts
  • Gender:Male

v1.3: 10/16/17 - 10.13 Support, Kaby Lake/200 Series support. realtekALC pikeralphaALC and NUC/BRIX deprecated



#13
pkdesign

pkdesign

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 184 posts
  • Gender:Male

This method worked perfectly in El Capitan and continues to work today. But after installing High Sierra I can not get this script to run.

 

I made sure to delete anything from an earlier installation but I get the following everytime I run it:

 

File: audio_cloverALC-130.command_v0.3
Release Mode
Password:
EFI partition is mounted
System Integrity Protection status: disabled.

OK to patch

No audio codec detected

 

EDIT:

I got this to work! I had moved a clean copy of AppleHDA into the S/L/E folder but hadn't fixed permissions and updated the cache. Once I did that the codec was seen and I was ablt to run the cloverALC script. Now I have working sound!

 

Thanks toleda!


Edited by pkdesign, 14 November 2017 - 03:53 PM.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy