24

I have recently installed Ubuntu 16.04 on a Macbook Pro, everything works fine except the camera does not work/ is not found. Both Google Hangouts and the Cheese application say "no device found".

Anything I can install to get it working?

fosslinux
  • 3,831
user1658053
  • 512
  • 1
  • 3
  • 12

3 Answers3

28

As at 8/3/2020 follow the instructions Here. They come in two parts, make sure you also follow the ones for your platform. They are a bit jumbled on the site so I have included them below.

I'm running 18.04 LTS (Bionic) on a 2013 Macbook Pro. The instructions that worked for me were as follows:

sudo apt-get install git
sudo apt-get install curl xzcat cpio
git clone https://github.com/patjak/facetimehd-firmware.git
cd facetimehd-firmware
make
sudo make install
cd ..
sudo apt-get install kmod libssl-dev checkinstall
git clone https://github.com/patjak/bcwc_pcie.git
cd bcwc_pcie
make
sudo make install
sudo depmod
sudo modprobe -r bdc_pci
sudo modprobe facetimehd
sudo nano /etc/modules
**add line "facetimehd", write out (ctl+o) & close**

Most of those steps will need to be repeated every time the kernel is upgraded.

I also followed the instructions here prior to testing the colors of the camera.

theYnot
  • 649
  • 5
    on 18.04, I had to install xz-utils instead of xzcat as the latter was not found. Otherwise perfect. Thanks! – Jarad Downing Mar 20 '20 at 03:46
  • I got this error on the "make" command:Checking dependencies for driver download... /usr/bin/xzcat /bin/cpio Makefile:34: recipe for target 'AppleCameraInterface' failed make: *** [AppleCameraInterface] Error 1 – John Dee Mar 20 '20 at 20:08
  • I'm not sure and I'm not about to replicate the error but this has some ideas. Also xz-utils might work instead of xzcat. As I said this is what worked for might and there may be variations between different Mac models. – theYnot Mar 21 '20 at 11:45
  • 1
    "patjak"'s source code is just the way we like it. Simple. Sober. Efficient. Reliable. A project I'd happily donate to (if there was a donate button). – Déjà vu Aug 01 '20 at 06:28
  • 2
    I had the following issue upon running the second sudo make install: certs/signing_key.pem: No such file or directory. I solved it using this superuser answer. – Reinstate Monica 2331977 Nov 04 '20 at 10:41
  • I get this error at the make install stage for bcwc_pcie unfortunately: :~/bcwc_pcie$ sudo make install make -C /lib/modules/4.15.0-123-generic/build M=/home/MYHOME/bcwc_pcie modules_install make[1]: Entering directory '/usr/src/linux-headers-4.15.0-123-generic' INSTALL /home/MYHOME/bcwc_pcie/facetimehd.ko At main.c:160:
    • SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
    • SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79

    sign-file: certs/signing_key.pem: No such file or directory

    – funkypitt Nov 19 '20 at 08:07
  • @funkypitt - see my comment above. – Reinstate Monica 2331977 Nov 24 '20 at 07:52
  • 1
    If you want these changes to persist after kernel update you need to setup dkms according to these instructions: https://github.com/patjak/bcwc_pcie/wiki/Get-Started#setting-up-dkms-auto-compile-on-kernal-update-1 – krumpelstiltskin Dec 01 '20 at 10:28
  • incase you run into this error: make: *** [Makefile:36: AppleCameraInterface] Error 1. try: sudo apt-get install curl. because the script checks "which curl" and without manual install curl it returns nothing. – Aiden Zhao Mar 14 '21 at 15:04
  • 1
    This works, even on jammy / 22.04. Note xzcat is in xz-utils package now. I had it in base desktop install. – mcint Aug 02 '23 at 00:00
17

I followed the instructions here(under the section "webcam drivers") and it is working now.

git clone https://github.com/patjak/bcwc_pcie.git
cd bcwc_pcie/firmware
make
sudo make install
cd ..
make
sudo make install
sudo depmod
sudo modprobe -r bdc_pci
sudo modprobe facetimehd
David Foerster
  • 36,264
  • 56
  • 94
  • 147
user1658053
  • 512
  • 1
  • 3
  • 12
  • 2
    After I shutdown my laptop, when I next turned it on, camera no longer works again. – user1658053 Jan 02 '18 at 22:46
  • 4
    just add facetimehd to your /etc/modules file. – artsin Apr 12 '18 at 08:08
  • Maybe I should replace $ sudo install into $ sudo make install? – Galaxy Sep 09 '18 at 08:09
  • It's generally not an awesome idea to run make as root. Security isn't as huge of a deal as some might say, since a malicious script could just as easily be malicious during "make install". But you end up with a bunch of root-owned files in that directory, even though the git clone was run as non-root. That can be annoying later. – dannysauer Oct 16 '18 at 16:29
  • @dannysauer if you don't you may run into this error mv: cannot stat 'System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS/AppleCameraInterface': No such file or directory. – trendsetter37 Oct 18 '18 at 15:28
  • @trendsetter37 That mv command happens after a curl piped through cpio. If you get that error, it's a result of failing to download or extract a file. Most likely, either there's an Internet issue, or you did the git clone as root and created a repository structure that you can't write to. IMO, the path should not be /etc/local/src to begin with, but I assume that's why someone would run the clone as a user other than themselves. Edit to remove the initial cd /etc pending. :) – dannysauer Oct 18 '18 at 16:45
  • Yea, I actually used /opt/src as a personal preference and ran into a similar issue. Also you instructions above do not seem to work for Ubuntu 18.04 on the Macbook Pro 14,3 model fyi @dannysauer – trendsetter37 Oct 18 '18 at 16:55
  • I see why. During the sudo make install step it's copying into a non-existent folder Copying firmware into '//lib/firmware/facetimehd' – trendsetter37 Oct 18 '18 at 17:09
  • The /lib/firmware directory is created on my Ubuntu 18.04 system by a number of packages, including linux-firmware. But even if it didn't exist, the install command should create any necessary parent directories because of the -D argument. I'm not sure what's broken for you, @trendsetter37 (I use OpenSUSE on my macbook), but keep digging. :) – dannysauer Oct 19 '18 at 14:55
  • the second make install command gave me an error saying a folder didn't exist ....but .... it worked. Camera working perfectly now. – wayneeusa Oct 28 '18 at 07:37
  • Thank you for this! I installed Ubuntu 18.04 on a Macbook pro A1398 early 2013 model and your answer fixed the camera problem. – Miguel Mota Sep 18 '19 at 05:01
2

+1 for selected answer. Below is modified version for what worked as at Dec 11, 2021 here's what worked for me on Ubuntu 21.10

sudo apt-get install git curl cpio kmod libssl-dev checkinstall
git clone https://github.com/patjak/facetimehd-firmware.git
cd facetimehd-firmware
make
sudo make install
cd ..
sudo depmod
sudo modprobe facetimehd
sudo nano /etc/modules
**add line "facetimehd", write out (ctl+o) & close**
Shekhar
  • 181