2

Full disclosure: I am not tech savvy. I've found quite a few links related to this topic but as someone who has never used terminal before I don't know where to begin.

Essentially, my webcam isn't working so I've gathered from other posts that I need to install a webcam driver. A lot of the directions in the linked posts are like a foreign language to me (i.e., "Dependencies for make are curl, xzcat and cpio").

Cannot install macbook webcam driver on Ubuntu 20.04

https://victorleungtw.com/2020/04/24/install-ubuntu-20-04-lts-on-macbookpro141/

https://github.com/patjak/facetimehd/wiki/Get-Started

Any guidance is appreciated!

  • I am tech-savvy and I've been unable to get on a the webcam working (reliably) on a "2015 - 15" macbook pro". I did some work a few years to try to create a "turn-key" debian/ubuntu package, but stopped when I realised the device wasn't stable (stopped working). I could revisit this, since the driver has been updated recently, but for the non-tech savvy this would be a problem - as no-one has worked through the packaging issues. – Greg Jan 06 '22 at 01:41
  • @Greg so what you're saying is I'm SOL? Can I work around this by purchasing a webcam? Or will I run into the same issues?

    It's really bumming me out because using Ubuntu gave my computer a second life negating my need to buy a new computer. But I need to have a working webcam mainly when interviewing for jobs.

    – responsible-staff-45 Jan 22 '22 at 21:32
  • Of course you can work around it by buying a webcam - any usb device should work out of the box - I assumed you wanted the built-in device to work (as I do). I'm going to have a poke around at the current state of play - see what's working, what isn't. – Greg Jan 23 '22 at 06:56
  • This worked: https://askubuntu.com/a/1432776/925128 – cipricus Sep 28 '22 at 17:40

1 Answers1

1

OK - I've fiddled around a little bit and done some smoke-testing - a few apps - cheese, teams - and reopening after suspend and seem to have had some success.

but as someone who has never used terminal before

OK - I'm writing part of this for you, part of this for more technical users - for internet posterity - ie google finds this page for them. If anything is unclear please ask.

So I've divided this into sections with details, then another section with some commands to run - if you don't understand anything I'm saying, just try following the steps in "Simplified Steps"

Note when you open a terminal (hit start (or cmd) - PS - you can remap the apple command and option keys to be in the normal "PC" position - a tale for another askubuntu question) and type terminal select the app that comes up - you should be facing a prompt which says your name which directory you are in and ends in a $. You type commands at that point. In my example commands below I have included the $ so it looks similar. You don't need to type the $.

Each of the commands I've included below may output some information or ask for confirmation - I've not included that in the output below to keep things smaller.

Any guidance is appreciated!

Here goes.

Status

I've tested this on 20.04 running the original "5.4" series kernels - your 20.04 may be running a later version. Please let me know if you have any problems. These steps should probably also work on 18.04 if you're also running the 5.4 (HWE) kernels. (you can check your kernel version by running uname -r - paste it into a comment if things go badly - it might help me help you)

I've forked the original repo from github to add steps to simplify installation and cleanup and to ensure it updates correctly when your kernel updates (DKMS). See caveat below in case this you're reading this years down the track.

Simplified steps

  1. Open a terminal and install some required tools:

    $ sudo apt install git debhelper dkms build-essential fakeroot cpio curl xz-utils
    

    (let me know if anything fails later on - this line might be missing some things you need, but I already had installed). If this is your first time on the terminal sudo asks for your local password - its used for running "administrator commands".

  2. Create a directory for working in (you'll create a bunch of files so this keeps things cleaner)

    $ mkdir -p work/facetimehd
    $ cd work/facetimehd
    $ git clone https://github.com/whitty/facetimehd
    $ git clone https://github.com/patjak/facetimehd-firmware
    

    (note whitty/facetimehd is my fork of patjak/facetimehd - see my caveat below)

  3. We're going to build the two packages:

    $ make -C facetimehd-firmware/ deb 
    $ cp facetimehd-firmware/debian/*.deb .
    $ cd facetimehd/
    $ dpkg-buildpackage -us -uc
    $ cd ..
    $ ls -la *.deb
    

    At this point you should have created two debs in the directory work/facetimehd - ls should return something like:

    -rw-r--r-- 1 greg greg  30904 Jan 23 20:51 facetimehd-dkms_0.5.7-1_amd64.deb
    -rw-r--r-- 1 greg greg 489544 Jan 23 20:49 facetimehd-firmware_0.1-1.deb
    
  4. Install the packages you just created

    $ sudo apt install ./facetimehd*.deb
    

    (don't skimp on the ./ even if you think you know what you're doing)

  5. Reboot - I'm not sure if this is required - but the wiki suggests it might be

  6. Test the webcam - eg open up cheese or any teleconferencing app (I used MS teams) and go to the video test page. Or you can try a web test page like this one.

    Note the simplest way to test test webcams is usually vlc, however for me vlc didn't work (the light goes on, but no video shows).

  7. Check the wiki for known issues.

Uninstalling

  1. We installed everything as .debs so you just uninstall the packages like any other ubuntu package:
    $ sudo apt remove facetimehd-dkms facetimehd-firmware
    
  2. you don't need to keep any of the files you created in the installation steps above if you don't want to - even if you keep using the packages we just built. Consider just deleting those directories we created. Maybe keep the .debs around in case you want to reinstall, but you could just follow these steps above to recreate them.

Caveat

I've forked the original repo from github to add steps to simplify installation and cleanup and to ensure it updates correctly when your kernel updates (DKMS). Caveat this means if you're reading this long into the future these instructions might not be building the absolute latest version. I'll try to keep my fork up to date - or get the changes merged back into the main project.

Hopefully I'll remember to post updated here if required.

If you want to use the latest code from github replace the clone of the whitty/facetimehd with one directed at https://github.com/patjak/facetimehd/. You won't be able to use dpkg-buildpackage so you'll have to follow the install instructions in the wiki, but the issues there are:

  1. when your kernel is updated you may have to repeat the installation steps
  2. there's no clean uninstall steps.
Greg
  • 1,413
  • Thank you so much for taking the time to create such a detailed and easy to follow guide!! I followed all of the steps and ran into 3 issues (After the first issue I continued to follow your steps just to see if it would still work).

    First issue after make -C facetimehd-firmware/ deb it said make: * ** [Makefile:36: AppleCameraInterface] Error 1make: Leaving directory '/home/ubuntu/work/facetimehd/facetimehd-firmware'`

    Then I typed cp facetimehd-firmware/debian/*.deb . to which it said cp: cannot stat 'facetimehd-firmware/debian/*.deb' : No such file or directory

    – responsible-staff-45 Jan 24 '22 at 00:44
  • Second issue after ld -la *.deb i got only one response (whereas you listed two) The response was -rw-r--r-- 1 ubuntu ubuntu 32378 Jan 23 18:!7 facetimehd-dkms_0.5.7-1_amd64.deb – responsible-staff-45 Jan 24 '22 at 00:52
  • Third issue after typing $ sudo apt install ./facetimehd*.deb it said DKMS: install completed. N: Download is performed unsandboxed as root as file '/home/ubuntu/work/facetimehd/facetimehd-dkms_0.5.7-1_amd64.deb' couldn't be accessed by user '_apt". - pkg Acquire::Run (13: Permission denied) – responsible-staff-45 Jan 24 '22 at 00:57
  • Also my kernel version is 5.13.0-19-generic – responsible-staff-45 Jan 24 '22 at 00:59
  • make -C facetimehd-firmware/ deb - that step failed (if in doubt - stop after any step that looks like a failure ;) )

    The only thing we need to fix now is fix facetimehd-firmware - in the meantime i recommend you uninstall facetimehd-dkms (sudo apt remove facetimehd-dkms) and potentially reboot - none of this is technically necessary - but I don't want any confusion and would feel safer to install both debs together - in case the hardware gets pissed off about being half-configured without firmware.

    – Greg Jan 24 '22 at 08:21
  • FYI - I've updated the first sudo apt install line - as I said some packages were missing (but I already had them - and you don't). If you're in a hurry just sudo apt install fakeroot cpio should get you going, then continue from step 3. If you don't have two deb packages at the point I highlight stop and get back to me. – Greg Jan 24 '22 at 08:34
  • So everything went well until after I completed step 4. It said Download is performed unsandboxed as root as file '/home/ubuntu/work/facetimehd/facetimehd-dkms_0.5.7-1_am64.deb' couldn't be acessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) A few lines above that it said This system doesn't support Secure Boot Secure Boot not enabled on this system. Done – responsible-staff-45 Jan 24 '22 at 23:37
  • I'll note that I did steps 1-4. Perhaps I was supposed to skip step 2? I wasn't sure... It might be important to know that I'm using ubuntu via a usb trial (mainly because I wanted to work out all of the issues before taking the plunge and have the option to go back to my old janky OS if need be). So perhaps this issue is that in order for this to work I have to reboot which doesn't work in this case because a reboot wipes the settings... – responsible-staff-45 Jan 24 '22 at 23:40
  • you can ignore the Download is performed unsandboxed as root .... acessed by user '_apt'.... (13: Permission denied) - that's specific to either encrypted home directory or usb-boot and isn't a problem its just saying it couldn't copy the deb to cache it for later use. – Greg Jan 25 '22 at 08:41
  • you can ignore the Secure Boot comments too. – Greg Jan 25 '22 at 08:42
  • You're right about rebooting. You can try the device without rebooting - however the docs suggest it may more may not work. – Greg Jan 25 '22 at 08:45
  • I tried without rebooting and it didn't work. I feel like I've been using the trial Ubuntu long enough to work out most of the kinks so perhaps it is time I take the plunge and fully install Ubuntu as my OS. Fingers crossed this fix works. Thanks for all of your help! – responsible-staff-45 Jan 28 '22 at 03:29
  • I finally replaced my OSX with ubuntu and attempted to follow these steps (now that I can restart) but after the first step it says Package 'git' has no installation candidate (for git, dephelper and curl). Please advise! – responsible-staff-45 Mar 02 '22 at 20:48
  • Sorry you're having problems here - the issue won't be related to this firmware, but something's funny with your package repostitories. I'd recommend looking for a specific answer on askubuntu. General suggests are run sudo apt update to ensure you have access to all packages, and apt policy git to tell you what gits are available - should say something like Installed: (none)... Candidate: 1:2.25.1-1ubuntu3.2 and then list where it would get the package from. – Greg Mar 20 '22 at 04:26