Updated to OC 0.6.6
This commit is contained in:
+2
-6
@@ -2,12 +2,8 @@
|
||||
|
||||
This is where I'll store useful but optional hacks for the laptop
|
||||
|
||||
## alc_fix
|
||||
This is a fix for Headphone jack not working after sleep. To install this, cd into the repository, then:
|
||||
|
||||
- `sudo spctl --master-disable`
|
||||
- `cd alc_fix`
|
||||
- `./install.sh`
|
||||
## alc_fix_swift
|
||||
This folder contains instructions to install the new swift version of alc_fix which doesn't rely on `hda-verb`, `alc-verb` or `CodecCommander` kext. The installation process is in the folder.
|
||||
|
||||
## DW1820A
|
||||
This folder contains instructions and kexts needed to run DW1820A which enables native WiFi/Bluetooth as well as Airdrop, Instant Hotspot, Hand-off and Continuity.
|
||||
|
||||
Binary file not shown.
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>Label</key>
|
||||
<string>good.win.ALCPlugFix</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/ALCPlugFix</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>ServiceIPC</key>
|
||||
<false/>
|
||||
<!--Shuold be directory that hda-verb at-->
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/usr/local/bin/</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DAEMON_PATH=/Library/LaunchDaemons/
|
||||
BIN_PATH=/usr/local/bin/
|
||||
DAEMON_FILE=good.win.ALCPlugFix.plist
|
||||
VERB_FILE=hda-verb
|
||||
FIX_FILE=ALCPlugFix
|
||||
|
||||
echo "Installing ALCPlugFix v1.7"
|
||||
|
||||
# check if the directory "usr/local/bin" exist, if not then create the directory
|
||||
|
||||
if [ ! -d "$BIN_PATH" ] ; then
|
||||
mkdir "$BIN_PATH" ;
|
||||
fi
|
||||
|
||||
# stop the daemon if it's already running
|
||||
if sudo launchctl list | grep --quiet ALCPlugFix; then
|
||||
echo "Stopping existing ALCPlugFix daemon."
|
||||
sudo launchctl unload $DAEMON_PATH$DAEMON_FILE
|
||||
fi
|
||||
|
||||
# copy over the files to their respective locations (overwrite automatically if files exist)
|
||||
|
||||
sudo cp -f ALCPlugFix $BIN_PATH
|
||||
sudo cp -f hda-verb $BIN_PATH
|
||||
sudo cp -f good.win.ALCPlugFix.plist $DAEMON_PATH
|
||||
|
||||
# set permissions and ownership
|
||||
sudo chmod 755 $BIN_PATH$FIX_FILE
|
||||
sudo chown $USER:admin $BIN_PATH$FIX_FILE
|
||||
sudo chmod 755 $BIN_PATH$VERB_FILE
|
||||
sudo chown $USER:admin $BIN_PATH$VERB_FILE
|
||||
sudo chmod 644 $DAEMON_PATH$DAEMON_FILE
|
||||
sudo chown root:wheel $DAEMON_PATH$DAEMON_FILE
|
||||
|
||||
# load and start the daemon
|
||||
sudo launchctl load -w $DAEMON_PATH$DAEMON_FILE
|
||||
|
||||
echo "Done!"
|
||||
exit 0
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string>Enable combo jack mic detection</string>
|
||||
<key>Enabled</key>
|
||||
<true/>
|
||||
<key>Node ID</key>
|
||||
<string>0x1a</string>
|
||||
<key>On Boot</key>
|
||||
<true/>
|
||||
<key>On Connect</key>
|
||||
<true/>
|
||||
<key>On Disconnect</key>
|
||||
<false/>
|
||||
<key>On Mute</key>
|
||||
<false/>
|
||||
<key>On Sleep</key>
|
||||
<false/>
|
||||
<key>On Unmute</key>
|
||||
<false/>
|
||||
<key>On Wake</key>
|
||||
<false/>
|
||||
<key>Param</key>
|
||||
<string>0x24</string>
|
||||
<key>Verb</key>
|
||||
<string>SET_PIN_WIDGET_CONTROL</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
||||
Executable
BIN
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
### Audio
|
||||
|
||||
ALCPlugFIx is required to fix static noise on headphones, however Black-Dragon74 released a Swift version that doesn't require `hda-verb`, `alc-verb` or `CodecCommander` kext.
|
||||
|
||||
**Note: If you are using the old non-swift alc_fix please uninstall it first;**
|
||||
```bash
|
||||
sh uninstall_old.sh
|
||||
```
|
||||
|
||||
**Installation**:
|
||||
|
||||
- Open terminal and type following commands one by one on the listed order:
|
||||
```bash
|
||||
sudo spctl --master-disable`
|
||||
sudo mkdir /usr/local/bin/`
|
||||
cd to the ALCPlugFix dictionary`
|
||||
sudo cp -R ALC3232.plist /usr/local/bin/`
|
||||
./install.sh
|
||||
```
|
||||
- Now the installer will ask you to drop the `ALC3232.plist` into the terminal window.
|
||||
- Open a new finder window and press `Shift + Cmd(Alt) + G` to open a new `go to folder:` window
|
||||
- Now type: `/usr/local/bin/`
|
||||
- Drag the `ALC3232.plist` from the `/usr/local/bin` folder into the terminal window and press enter.
|
||||
- Done
|
||||
|
||||
```text
|
||||
Note: Please disable the kext CodecCommander.kext from config if you're using this version of alc_fix
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>Label</key>
|
||||
<string>com.black-dragon74.ALCPlugFix</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/ALCPlugFix</string>
|
||||
<string>/usr/local/bin/ALC3232.plist</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>ServiceIPC</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
Executable
+77
@@ -0,0 +1,77 @@
|
||||
#!/bin/bash
|
||||
|
||||
# install.sh
|
||||
# ALCPlugFix-Swift
|
||||
#
|
||||
# Created by Nick on 10/14/20.
|
||||
#
|
||||
|
||||
# Get hold of actual directory
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
pledit=/usr/libexec/PlistBuddy
|
||||
|
||||
# Clean up old installs
|
||||
function cleanUpOldInstall() {
|
||||
# Remove codec commander based ALCPlugFix
|
||||
sudo launchctl unload /Library/LaunchAgents/good.win.ALCPlugFix.plist
|
||||
sudo rm -rf /Library/LaunchAgents/good.win.ALCPlugFix.plist
|
||||
|
||||
# Remove any existing alc-verb install
|
||||
sudo launchctl unload /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
|
||||
sudo rm -rf /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
|
||||
}
|
||||
|
||||
# Function that exits with an error code and message
|
||||
function abort() {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "** **"
|
||||
echo "** Installing ALCPlugFix (AppleALC variant) **"
|
||||
echo "** **"
|
||||
|
||||
echo ""
|
||||
read -p "Please drag your config file to the terminal: " inputFile
|
||||
|
||||
# Verify the input file
|
||||
if [[ ! -z $inputFile && -f $inputFile ]]; # If input exists and is of type 'file'
|
||||
then
|
||||
# Verify if it is a correct PLIST file
|
||||
if /usr/bin/plutil "$inputFile" | grep -q "OK";
|
||||
then
|
||||
# Plist is valid, write the inputfile path to it
|
||||
$pledit -c "Set ProgramArguments:1 $inputFile" ./com.black-dragon74.ALCPlugFix.plist || abort "Failed to write to launchd plist"
|
||||
else
|
||||
abort "The provided file is not a valid plist"
|
||||
fi
|
||||
else
|
||||
abort "Invalid input."
|
||||
fi
|
||||
|
||||
# Set the logs to be ~/Library/Logs
|
||||
#$pledit -c "Set StandardOutPath ${HOME}/Library/Logs/alcplugfix_stdout.log" ./com.black-dragon74.ALCPlugFix.plist || abort "Failed to write STDOUT logpath to plist"
|
||||
#$pledit -c "Set StandardErrorPath ${HOME}/Library/Logs/alcplugfix_stderr.log" ./com.black-dragon74.ALCPlugFix.plist || abort "Failed to write STDERR logpath to plist"
|
||||
|
||||
echo ""
|
||||
|
||||
echo "** Removing old installs **"
|
||||
cleanUpOldInstall 2>/dev/null
|
||||
|
||||
echo "** Copying new files **"
|
||||
sudo cp "$DIR/ALCPlugFix-Swift" /usr/local/bin/ALCPlugFix || abort "Failed to copy ALCPlugFix"
|
||||
sudo cp "$DIR/com.black-dragon74.ALCPlugFix.plist" /Library/LaunchAgents || abort "Failed to copy launchd plist file"
|
||||
|
||||
echo "** Setting permissions **"
|
||||
sudo chmod 755 /usr/local/bin/ALCPlugFix
|
||||
sudo chmod 644 /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
|
||||
|
||||
sudo chown root:wheel /usr/local/bin/ALCPlugFix
|
||||
sudo chown root:wheel /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
|
||||
|
||||
echo "** Loading launch daemon **"
|
||||
sudo launchctl load /Library/LaunchAgents/com.black-dragon74.ALCPlugFix.plist
|
||||
|
||||
echo "** **"
|
||||
echo "** All done. Enjoy! **"
|
||||
echo "** **"
|
||||
Reference in New Issue
Block a user