Package Details: bcwc-pcie-git 0.5.7.r1.gf85a604-1

Git Clone URL: https://aur.archlinux.org/bcwc-pcie-git.git (read-only, click to copy)
Package Base: bcwc-pcie-git
Description: Reverse engineered Linux driver for the Broadcom 1570 PCIe webcam.
Upstream URL: https://github.com/patjak/bcwc_pcie
Keywords: driver facetime macbook webcam
Licenses: GPL2
Provides: bcwc-pcie, bcwc-pcie-dkms
Replaces: bcwc-pcie, bcwc-pcie-dkms
Submitter: whynothugo
Maintainer: ivladak
Last Packager: ivladak
Votes: 34
Popularity: 1.13
First Submitted: 2015-12-23 14:14 (UTC)
Last Updated: 2021-08-13 20:58 (UTC)

Latest Comments

Zodigram commented on 2022-06-03 23:02 (UTC)

Thanks for making it work on 5.18

ledisthebest commented on 2022-05-29 15:21 (UTC) (edited on 2022-06-03 23:15 (UTC) by ledisthebest)

For those of you can't make on kernel version 5.18+, try https://github.com/ledisthebest/facetimehd instead. I added some fixes, works on my own Macbook Air 2013.

Edit(2022-06-03): Kudos to patjak, it just got fixed upstream, so my fix is no longer required: https://github.com/patjak/facetimehd/commit/75a2a5800aa46cbd679847b4d0863a5e3cef3b9e

ivladak commented on 2021-08-13 21:09 (UTC)

Hi @kauron, thanks for the suggestion; done!

kauron commented on 2021-07-26 11:43 (UTC)

Hi there! Just a small suggestion for this package: the license could be set to GPL-2, according to the copyright headers in the source files. Thanks for maintaining this package!

Aetf commented on 2021-01-10 02:21 (UTC)

Disown as I no longer have this hardware

graphicmist commented on 2020-04-17 19:25 (UTC)

as mentioned by @hali this worked for me. Thanks a lot.

Note this doesn't compile on 6.0 kernel due to this bug: https://github.com/patjak/bcwc_pcie/issues/205

As mentioned there (until fixed upstream) you can change the 3 ioremap_nocache() calls to ioremap() in /usr/src/bcwc-pcie-r242.ea832ac/fthd_drv.c and run sudo dkms install bcwc-pcie/r242.ea832ac and it is OK.

joegrammer commented on 2020-04-16 15:00 (UTC) (edited on 2020-04-16 15:02 (UTC) by joegrammer)

I'm trying to build on 5.6.4-arch1-1. I changed the ioremap_nocache calls but I still get a number of errors, ie.

/home/joe/.cache/yay/bcwc-pcie-git/src/bcwc-pcie-git/fthd_drv.c: In function ‘buf_t2h_handler’:
/home/joe/.cache/yay/bcwc-pcie-git/src/bcwc-pcie-git/fthd_drv.c:164:30: error: passing argument 1 of ‘fthd_buffer_return_handler’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  164 |   fthd_buffer_return_handler(dev_priv, address & ~3, request_size);
      |                              ^~~~~~~~
      |                              |
      |                              struct fthd_private *

I see that repeated for several uses of the struct fthd_private * parameter. I get this error whether I run sudo dkms install ... or just make in my aur helper's cache directory (with the ioremap changes applied to the source).

rberaldo commented on 2020-04-14 13:20 (UTC)

Thanks, @hali!

hali commented on 2020-04-02 16:32 (UTC) (edited on 2020-04-02 16:35 (UTC) by hali)

Note this doesn't compile on 6.0 kernel due to this bug: https://github.com/patjak/bcwc_pcie/issues/205

As mentioned there (until fixed upstream) you can change the 3 ioremap_nocache() calls to ioremap() in /usr/src/bcwc-pcie-r242.ea832ac/fthd_drv.c and run sudo dkms install bcwc-pcie/r242.ea832ac and it is OK.

eschwartz commented on 2019-12-15 22:48 (UTC)

Thanks for the prompt response. :)

Aetf commented on 2019-12-15 22:45 (UTC) (edited on 2019-12-16 02:38 (UTC) by Aetf)

@eschwartz thanks for pointing out the --devel flag. The last time I check it didn't work for some reason. Now it works quite well.

I'm updating all my AUR packages.

Edit: Done ;)

eschwartz commented on 2019-12-15 16:53 (UTC)

@Aetf

Speaking with my official TU hat on, you are required to stop using pkgver=0.0.0, effective immediately, on all AUR packages you maintain.

Users who wish to update AUR VCS-based packages with an AUR helper are expected to use the commonly implemented --devel flag to check VCS packages for updates. Adding an infinitely high pkgver= and relying on the pkgver() function to reset it is NOT acceptable, as this constantly spams users to update even when there is no update available. Furthermore, the pkgrel= is reset to 1 upon the pkgver() function successfully modifying the pkgver=, so it doesn't do anything.

VKen commented on 2019-12-14 02:44 (UTC)

@Aetf: Thanks for the explanation of intended behavior.

Thank you for maintaining the package and I can understand the current setup offloads the maintainer from needing to update the pkgver for every git upstream update.

Indeed there's no rebuild from the output below.

However, it is a matter of my tooling usage and the dissonance compared to my usual experience up to now. The AUR helper usually (with the majority of the small number of git AUR packages I use) will not be flagged for update via yay -Syu.

I will probably need to find a way for myself to configure the AUR helper or augment my usage behavior for: 1. unable to know whether I need to update, since the AUR helper can't tell due to version difference as it overwrites the PKGBUILD with the latest pkgver=0.0.0 to be mismatched from the current installed r242.ea832ac-1. (intended behavior) 2. Although rebuilding is stopped, I need to stop the auto-reinstall if there's no package rebuild. (re-install is probably unintended. A tooling behavior issue to check)

% yay -Syu
...
...
:: 1 Packages to upgrade.
1  aur/bcwc-pcie-git  r242.ea832ac-1 -> 0.0.0-4
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
==> 
...
...
==> Starting pkgver()...
==> Updated version: bcwc-pcie-git r242.ea832ac-1
==> Sources are ready.
==> Making package: bcwc-pcie-git r242.ea832ac-1 (Sat 14 Dec 2019 10:15:04 AM +08)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Sources are ready.
==> bcwc-pcie-git-r242.ea832ac-1 already made -- skipping build
==> Found git repo: github.com/patjak/bcwc_pcie.git
loading packages...
warning: bcwc-pcie-git-r242.ea832ac-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) bcwc-pcie-git-r242.ea832ac-1

Total Installed Size:  0.16 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n]
...
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms remove bcwc-pcie/r242.ea832ac -k 5.4.2-arch1-1
:: Processing package changes...
(1/1) reinstalling bcwc-pcie-git [###]100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Install DKMS modules
==> dkms install bcwc-pcie/r242.ea832ac -k 5.4.2-arch1-1

Aetf commented on 2019-12-13 02:03 (UTC)

@VKen That's the intended behavior. I deliberately set pkgver=0.0.0 on AUR. So AUR helpers will always remind you to update the package.

For this particular package, the PKGBUILD is unlikely to change in a long time, so the pkgver can get out-of-sync with the latest git version. (In general, I don't think it's useful to update PKGBUILD just to bump the git version)

So this workaround forces AUR helpers to download and check the latest git version. If the latest git version matches what you have locally installed, no package will be built.

VKen commented on 2019-12-13 01:37 (UTC)

@Aetf: The declared version pkgver=0.0.0 does not coincide with the output of:

pkgver() {
  cd "$srcdir/$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

During makepkg the execution modifies PKGBUILD file's declaration of pkgver=0.0.0 to the output of pkgver() == 'r242.ea832ac'.

On my AUR helper "yay", it continually keeps trying to update, rebuild, install, every time I run yay -Syu.

Do you experience this update/install with every run as well?

This package depends on upstream git branch. I've taken a look at other similar git packages like "networkmanager-git"

Their declared pkgver coincides with the output of pkgver(). Their package doesn't trigger the self-update on every invocation of package sync update of the AUR helper.

Aetf commented on 2019-12-10 19:36 (UTC)

@GusevAG it's the same. master is the default branch anyway.

GusevAG commented on 2019-12-10 19:26 (UTC) (edited on 2019-12-10 19:28 (UTC) by GusevAG)

@Aetf it works perfectly! before I read your comment, I added #branch=master after the source to the PKGBUILD btw (no idea was it successful or not, but it works)

Aetf commented on 2019-12-10 18:45 (UTC)

@adbjesus thanks for pointing out. I just updated the PKGBUILD to use the master branch.

@GusevAG please try the latest version.

PS. I updated the version number on AUR to always be 0.0.0, making it in line with other git packages I manage on AUR. This way the package will always be shown as updated when using AUR helpers so you can pull the latest changes from the upstream. When building, makepkg will derive the correct version number.

GusevAG commented on 2019-12-10 15:34 (UTC) (edited on 2019-12-10 15:38 (UTC) by GusevAG)

@adbjesus wow, that is very important point! thank you for pointing at it! I had no clue about different branches and I have no idea how to change it to master in PKGBUILD could you please give me an example or a picture of what to change exactly and where? I will really appreciate it!

UPD: is it just about changing to

source=("$pkgname::git+https://github.com/patjak/bcwc_pcie.git#branch=master"

?

adbjesus commented on 2019-12-10 09:20 (UTC) (edited on 2019-12-10 09:21 (UTC) by adbjesus)

I was having trouble using this for linux-lts and reported it upstream, https://github.com/patjak/bcwc_pcie/issues/193

The owner of the repo suggested using the master branch instead of the mainline and also that the master branch should work fine for all kernels. I quickly tested it and it seems to work fine on both linux and linux-lts so it might be worth updating the PKGBUILD to use master instead. Or is there some reason to be using the mainline branch?

GusevAG commented on 2019-12-08 19:04 (UTC) (edited on 2019-12-08 19:06 (UTC) by GusevAG)

@eblau well, for some reason this is what i get


$ v4l2-ctl --list-devices
Cannot open device /dev/video0, exiting.

but

$ sudo lspci
02:00.0 Multimedia controller: Broadcom Inc. and subsidiaries 720p FaceTime HD Camera

eblau commented on 2019-12-08 12:48 (UTC)

@GusevAG no, I didn't have to do anything special. The package already makes sure the modules are loaded after they are installed. facetimehd shows up as loaded for me and if I follow the guide here:

https://wiki.archlinux.org/index.php/Webcam_setup

I see the device show up:

$ v4l2-ctl --list-devices 
Apple Facetime HD (PCI:0000:02:00.0):
    /dev/video0

It "just works" in any program that uses the standard access to /dev/videoX

GusevAG commented on 2019-12-07 19:02 (UTC)

@eblau wow, thats fantastic, were any additional tweaks required to make it run? because i cant manage to run it...

eblau commented on 2019-12-07 16:35 (UTC)

@GusevAG yes, the new version works for me. At least it works in zoom for web conferencing and the "lighter" tool I use for capturing ambient light levels and adjusting the screen and keyboard backlights still works fine.

I also have a 13" mid-2015 MacBook Pro. Here's the model:

Apple Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS 186.0.0.0.0 06/14/2019

GusevAG commented on 2019-12-07 15:48 (UTC)

@eblau yes it does builds, but does it works for you? because it doesn't on 13" 2015 bmp

eblau commented on 2019-12-07 14:36 (UTC)

My apologies. I neglected to update bcwc-pcie-git. When I rebuilt the package, it updated to r259.9d7ff828ebe9-1 and installed successfully with linux-5.4.2.arch1-1.

eblau commented on 2019-12-07 14:32 (UTC)

I updated to linux-5.4.2.arch1-1 and am getting errors when rebuilding the module:

DKMS make.log for bcwc-pcie-r255.af589aba0afd for kernel 5.4.2-arch1-1 (x86_64)
Sat 07 Dec 2019 09:28:57 AM EST
make: Entering directory '/usr/lib/modules/5.4.2-arch1-1/build'
  AR      /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/built-in.a
  CC [M]  /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/fthd_hw.o
  CC [M]  /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/fthd_drv.o
  CC [M]  /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/fthd_ringbuf.o
  CC [M]  /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/fthd_isp.o
/var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/fthd_drv.c:25:10: fatal error: linux/pci-aspm.h: No such file or directory
   25 | #include <linux/pci-aspm.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build/fthd_drv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1652: /var/lib/dkms/bcwc-pcie/r255.af589aba0afd/build] Error 2
make: Leaving directory '/usr/lib/modules/5.4.2-arch1-1/build'

Aetf commented on 2019-10-25 16:14 (UTC)

@GusevAG, hi, this is an error building the dependency facetimehd-firmware, not an error building this package. Since the error was in their makefile, I suggest you report that to the upstream: https://github.com/patjak/bcwc_pcie/issues/new

PS. next time please paste the log using code format so it's easier to read: https://wiki.archlinux.org/index.php/Arch_User_Repository#Comment_syntax

GusevAG commented on 2019-10-25 13:23 (UTC) (edited on 2019-10-26 09:24 (UTC) by GusevAG)

is not working on 5.2.21-1-MANJARO KDE

[Installing linux52-headers (5.2.21-1)... Running post-transaction hooks... Updating linux52 module dependencies... Install DKMS modules Arming ConditionNeedsUpdate... Updating the info directory file...

Building facetimehd-firmware... ==> Making package: facetimehd-firmware 1.43.0-1 (Птн 25 окт 2019 16:13:22) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Cloning facetimehd-firmware git repo... Cloning into bare repository '/var/tmp/pamac-build-andrey/facetimehd-firmware/facetimehd-firmware'... ==> Validating source files with md5sums... facetimehd-firmware ... Skipped ==> Removing existing $srcdir/ directory... ==> Extracting sources... -> Creating working copy of facetimehd-firmware git repo... Cloning into 'facetimehd-firmware'... done. ==> Starting prepare()...

Checking dependencies for driver download... /usr/bin/curl /usr/bin/xzcat /usr/bin/cpio

Downloading the driver, please wait... mv: cannot stat 'System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS/AppleCameraInterface': No such file or directory make: *** [Makefile:41: AppleCameraInterface] Error 1 ==> ERROR: A failure occurred in prepare(). Aborting...]

yan12125 commented on 2019-03-25 01:34 (UTC)

Wow thanks for the ultra fast fix!

yan12125 commented on 2019-03-24 12:47 (UTC)

Hi, could you remove the bcwc-pcie-git.install file? All dkms commands are already handled by ALPM hooks /usr/share/libalpm/hooks/70-dkms-{install,remove}.hook, so the bcwc-pcie-git.install file is not necessary. Furthermore, errors occur if the running kernel version is different from than the installed one, as commands in bcwc-pcie-git.install do not set the target kernel version:

Error! echo
Your kernel headers for kernel 5.0.3-arch1-2-macbook cannot be found at
/usr/lib/modules/5.0.3-arch1-2-macbook/build or /usr/lib/modules/5.0.3-arch1-2-macbook/source.
modprobe: FATAL: Module facetimehd not found in directory /lib/modules/5.0.3-arch1-2-macbook
depmod: ERROR: could not open directory /lib/modules/5.0.3-arch1-2-macbook: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

whynothugo commented on 2018-10-02 15:55 (UTC)

I no longer own hardware which uses this driver, so I'll be disowning this package since I can't even test it any more.

Feel free to adopt is, especially if any changes are needed. Upstream has been pretty stable though, so this shouldn't have any issues.

trp commented on 2017-10-03 19:44 (UTC) (edited on 2017-10-03 19:45 (UTC) by trp)

If you are getting a directory does not exist error check to make sure the dir name is correct. When I installed it was looking for '/usr/src/bcwc-pcie-r254.a22f248' however what was actually installed was '/usr/src/bcwc-pcie-git-r254.a22f248'. So I just created a symlink to the directory the installer was looking for and reran the install. Bit of a hack but it will get you going.

taekyung commented on 2017-07-18 05:59 (UTC)

When I was trying to install this in my Macbook Air 6,2 (Manjaro Linux), it shows an error as follows: Error! Could not find module source directory. Directory: /usr/src/bcwc-pcie-r254.a22f248 does not exist. modprobe: FATAL: Module facetimehd not found in directory /lib/modules/4.9.37-1-MANJARO Optional dependencies for bcwc-pcie-git linux-headers: Building with the stock kernel [installed] :: Running post-transaction hooks... (1/2) Install DKMS modules ==> dkms install bcwc-pcie-git/r254.a22f248 -k 4.9.37-1-MANJARO (2/2) Arming ConditionNeedsUpdate... Do I need some Manjaro-specific configuration before 'makepkg -sri'?

whynothugo commented on 2017-07-06 00:31 (UTC)

You should NEVER run makepkg as root. TBH, I actually thought makepkg bailed if you ran it as root.

kroylar commented on 2017-07-06 00:25 (UTC)

Please change the PKGBUILD to use "git cherry-pick -n ...". This will allow the package to build without a having git configured, as is typically the case for the root user.

whynothugo commented on 2017-05-24 19:56 (UTC)

We currently have two packages: bcwc-pcie-dkms and bcwc-pcie-git, but both track the latest git version. Upstream has not stable releases, and probably never will (since the intention is to merge the drive into the linux kernel). I'm inclined to simply merge this package into bcwc-pcie-git, (and keep just that one updated). Any objections?

khaezaid commented on 2017-05-01 22:28 (UTC)

Thank you for this. One thing I noticed is that this package has a hard dependency on "linux-headers" whereas other dkms packages list it as optional since not everyone uses the stock kernel. It might also be worth adding "linux-macbook-headers" as an optional dependency to hint at people with macbooks that there is a special kernel for them.

didacog commented on 2017-04-25 17:45 (UTC)

Many thanks! now is working! Just for info: MacbookAir 11' (Early 2015) Thanks again! ;)

whynothugo commented on 2017-04-25 15:37 (UTC)

I've update the SRCINFO just in case, please retry.

whynothugo commented on 2017-04-25 15:36 (UTC)

I've update the SRCINFO just in case, please retry.

didacog commented on 2017-04-25 10:26 (UTC)

The bcwc-pcie-git works well, but bcwc-pcie-dkms ends with this error: :: bcwc-pcie-dkms package(s) failed to install. Check .SRCINFO for mismatching data with PKGBUILD.

graphicmist commented on 2017-02-03 16:15 (UTC)

Installed it through yaourt in macbook air early 2015 model with facetime 720p HD webcam. Worked great till now.

bcc commented on 2016-10-20 12:34 (UTC)

:: bcwc-pcie-dkms package(s) failed to install. Check .SRCINFO for mismatching data with PKGBUILD.

m3thodic commented on 2016-10-11 07:59 (UTC)

Anyone that's having issues getting this to compile on 4.8 branches, use this PKGBUILD and patch until the pull request I generated the diff from is merged (tested and confirmed on linux-macbook kernel 4.8.1): PKGBUILD: https://gist.github.com/tonylambiris/cc215849f8c1467d88b7d1ddda78546a fix-build-4.8.1.patch: https://gist.github.com/tonylambiris/2e4485e09eac8585485d597406531877

iamazat commented on 2016-10-10 18:48 (UTC)

For those who need this in 4.8 (if it will not be merged for awhile): https://github.com/patjak/bcwc_pcie/pull/102

whynothugo commented on 2016-05-31 23:54 (UTC)

PKGBUILD updated.

Jack12816 commented on 2016-05-31 18:20 (UTC)

This package is great, but it lacks support for custom kernel builds. Please consider this patch: (https://wiki.archlinux.org/index.php/Compile_kernel_module#Module_installation there is an easy way to get the extra modules path) --- a/PKGBUILD 2016-05-31 20:15:34.687067886 +0200 +++ b/PKGBUILD 2016-05-31 20:16:17.142824626 +0200 @@ -33,9 +33,9 @@ package() { cd "$srcdir/$pkgname" - KERNEL_VERSION=$(uname -r | cut -d '.' -f 1,2) + EXTRA_MODULES=$(readlink -f /usr/lib/modules/`uname -r`/extramodules) install -Dm 644 facetimehd.ko.gz \ - "$pkgdir/usr/lib/modules/extramodules-${KERNEL_VERSION}-ARCH/facetimehd.ko.gz" + "$pkgdir/${EXTRA_MODULES}/facetimehd.ko.gz" install -Dm 644 "$srcdir/bcwc-pcie.modprobe.conf" \ "$pkgdir/etc/modprobe.d/bcwc-pcie.conf" install -Dm 644 "$srcdir/bcwc-pcie.modules-load.conf" \

gokcen commented on 2016-05-14 07:05 (UTC)

bcwc-pcie-git package also gives following error: Direct firmware load for facetimehd/1871_01XX.dat failed with error -2 but unlike bcwc-pcie-dkms, it works fine.

A.J commented on 2016-03-23 10:27 (UTC)

here is what i found in dmesg : [ 2113.241563] facetimehd 0000:02:00.0: firmware: facetimehd/1871_01XX.dat will not be loaded

A.J commented on 2016-03-23 03:29 (UTC)

pacman build it fine , but the driver isn't working with cheese or any application .

whynothugo commented on 2016-03-22 14:09 (UTC)

Looks like something changed regarding dkms packages since 4.5, but it *did* build okay for me. What issue did you get?

A.J commented on 2016-03-22 03:53 (UTC) (edited on 2016-03-22 11:52 (UTC) by A.J)

doesn't build correctly after kernel update . EDIT : apparently it is a known issue with kernel 4.5 .

trusktr commented on 2016-02-26 01:19 (UTC)

Ah, for some reason PKGBUILD had all permissions removed, so chmod u+rw worked.

trusktr commented on 2016-02-26 01:16 (UTC)

I get ``` ==> ERROR: Failed to source /home/trusktr/aur/bcwc-pcie-git/bcwc-pcie-git/PKGBUILD ```

gsora commented on 2016-01-08 16:33 (UTC)

Please add 'cpio' as a dependency, without it we're unable to extract the firmware.