Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install the kernal module required for the facetimehd camera to work on Linux
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
cd $temp_dir
git clone https://github.com/patjak/facetimehd-firmware.git
git clone https://github.com/patjak/bcwc_pcie.git
cd $temp_dir/facetimehd-firmware
pwd
make
make install
cd $temp_dir/bcwc_pcie
pwd
make
make install
rm -rf $temp_dir
if [ ! -d "/etc/modules-load.d" ]; then
mkdir -p "/etc/modules-load.d"
fi
cat > "/etc/modules-load.d/facetimehd.conf" << EOL
videobuf2-core
videobuf2_v4l2
videobuf2-dma-sg
facetimehd
EOL
echo "Adding kernel modules"
sudo modprobe -r bdc_pci
sudo modprobe facetimehd
echo "Install complete"
@ukn

This comment has been minimized.

Copy link
Owner Author

ukn commented Jul 3, 2020

It works on my Macbook Pro 13" 2015 and Linux Mint 19.3 (kernel 5.4.0-40-generic)

@ba2sai

This comment has been minimized.

Copy link

ba2sai commented Jul 29, 2020

It worked like a charm on a MacBook Pro 2015 and Ubuntu 20.04.1 LTS. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.