You are not logged in.

#1 2009-02-28 02:49:41

nuclearsandwich
Member
Registered: 2008-10-12
Posts: 16

hid_apple, bcm5974 and Macbook Pro Unibody

Hi all, I'm trying to get Arclinux running on my shiny new laptop before I go on a short trip next week and I'm having issues with the touchpad that I'd like to get resolved before I leave. I have a Macbook Pro 5,1 running Arch for i686. I might take the 64-bit plunge at some point but right now I would just like it to work. The touchpad appears to work under hotplugging using the evdev driver and under no hotplugging with the standard xorg mouse0. The problem being that neither of these give me the two finger right click which is pretty essential on a one button mouse, even two finger tap to click would be helpful for the time being.

I have tried to set X up both with and without hotplugging but I think my issue is the bcm5974 module not being allowed to grab the touchpad which causes the synaptics driver to not load.
Here's a truncated output of lsusb

Bus 003 Device 003: ID 05ac:0236 Apple Computer, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x05ac Apple Computer, Inc.
  idProduct          0x0236 
  bcdDevice            0.77
  iManufacturer           1 Apple, Inc.
  iProduct                2 Apple Internal Keyboard / Trackpad
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               40mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              3 Apple Internal Keyboard
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     156
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              4 Touchpad
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      27
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              4 Touchpad
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      52
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               8
Device Status:     0x0000
  (Bus Powered)

Bus 004 Device 005: ID 05ac:820b Apple Computer, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x05ac Apple Computer, Inc.
  idProduct          0x820b 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      52
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              10
Device Status:     0x0001
  Self Powered

Bus 004 Device 004: ID 05ac:820a Apple Computer, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x05ac Apple Computer, Inc.
  idProduct          0x820a 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      56
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0001
  Self Powered

And the dmesg output after a fresh boot

ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 3
ohci_hcd 0000:00:04.0: irq 22, io mem 0xef488000
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 7 ports detected
ACPI: PCI Interrupt Link [Z000] enabled at IRQ 21
ohci_hcd 0000:00:06.0: PCI INT A -> Link[Z000] -> GSI 21 (level, low) -> IRQ 21
ohci_hcd 0000:00:06.0: setting latency timer to 64
ohci_hcd 0000:00:06.0: OHCI Host Controller
ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus number 4
ohci_hcd 0000:00:06.0: irq 21, io mem 0xef487000
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 5 ports detected
usb 3-5: new low speed USB device using ohci_hcd and address 2
ieee1394: Host added: ID:BUS[0-00:1023]  GUID[002332fffeca64d6]
usb 3-5: configuration #1 chosen from 1 choice
usb 3-6: new full speed USB device using ohci_hcd and address 3
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
apple 0003:05AC:8242.0001: hiddev0,hidraw0: USB HID v1.11 Device [Apple Computer, Inc. IR Receiver] on usb-0000:00:04.0-5/input0
usb 3-6: configuration #1 chosen from 1 choice
input: Apple, Inc. Apple Internal Keyboard / Trackpad as /class/input/input8
apple 0003:05AC:0236.0002: input,hidraw1: USB HID v1.11 Keyboard [Apple, Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:04.0-6/input0
apple 0003:05AC:0236.0003: hidraw2: USB HID v1.11 Device [Apple, Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:04.0-6/input1
input: Apple, Inc. Apple Internal Keyboard / Trackpad as /class/input/input9
apple 0003:05AC:0236.0004: input,hidraw3: USB HID v1.11 Mouse [Apple, Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:04.0-6/input2
usb 4-1: new full speed USB device using ohci_hcd and address 2
usb 4-1: configuration #1 chosen from 1 choice
hub 4-1:1.0: USB hub found
hub 4-1:1.0: 3 ports detected
usb 4-1.1: new full speed USB device using ohci_hcd and address 3
usb 4-1.1: configuration #1 chosen from 1 choice
usb 4-1.2: new full speed USB device using ohci_hcd and address 4
Bluetooth: Core ver 2.13
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
usb 4-1.2: configuration #1 chosen from 1 choice
Bluetooth: Generic Bluetooth USB driver ver 0.3
usbcore: registered new interface driver btusb
input: HID 05ac:820a as /class/input/input10
generic-usb 0003:05AC:820A.0005: input,hidraw4: USB HID v1.11 Keyboard [HID 05ac:820a] on usb-0000:00:06.0-1.2/input0
usb 4-1.3: new full speed USB device using ohci_hcd and address 5
usb 4-1.3: configuration #1 chosen from 1 choice
input: HID 05ac:820b as /class/input/input11
generic-usb 0003:05AC:820B.0006: input,hidraw5: USB HID v1.11 Mouse [HID 05ac:820b] on usb-0000:00:06.0-1.3/input0
EXT3 FS on sda3, internal journal

As well as the last lines after

$sudo modprobe -r bcm5974
$sudo modprobe bcm5974
usbcore: deregistering interface driver bcm5974
usbcore: registered new interface driver bcm5974

as you can see the Wellspring and input lines referenced in post #7 here http://ubuntuforums.org/showthread.php?t=840040 are missing. Which if I'm correct in my assumption means that some other kernel module has laid claim to the touchpad.
I just don't know which module is stealing the touchpad and how to fix that. Any help is appreciated and I'll be happy to post anything on what I have gotten working for those interested. Thanks a bunch.

Offline

#2 2009-03-05 10:25:22

canoenfe
Member
Registered: 2009-02-14
Posts: 4

Re: hid_apple, bcm5974 and Macbook Pro Unibody

Hi. loading that bcm module isn't obviously enough. The newer models demand the use of the dkms-system from Dell :/. Before even trying the bcm5974-dkms module you must have the usbhid-dkms loaded first. -tried building those on a debian-sid system and failed at that.

These are required(git) (first need the dkms installed though):

http://bitmath.org/git/bcm5974-dkms.git
http://bitmath.org/git/usbhid-dkms.git

Now.. I'm very much in the exact same situation with my late 08 macbook(non pro). I can get everything else to work nicely but the touchpad gives quite a lot of trouble.

The dkms in Aur is tagged old.

links:

http://linux.dell.com/dkms/
http://wiki.debian.org/MacBook#head-c46 … 491bc26c53

Debian and Gentoo wikis are quite good reads on the macbook. (I'd stay away and far from any Ubuntu related sources)

Last edited by canoenfe (2009-03-05 13:16:50)

Offline

#3 2009-03-05 13:22:33

canoenfe
Member
Registered: 2009-02-14
Posts: 4

Re: hid_apple, bcm5974 and Macbook Pro Unibody

Needed to add that in top of having to install all that dkms stuff, it is still necessary to modify some hal policies (look at the wikis). This new touchpad is a total nightmare. These macbooks have been around since Oct. and we still see no native support in the synaptics driver for them. ><.

Last edited by canoenfe (2009-03-05 13:24:14)

Offline

#4 2009-03-08 00:29:23

nuclearsandwich
Member
Registered: 2008-10-12
Posts: 16

Re: hid_apple, bcm5974 and Macbook Pro Unibody

Thanks for your reply! I'm in Portland at the United States Barista Championship right now and won't have a chance to really look into this until next week but I certainly will as carrying two computers around just because I miss Arch is killing my back. Running it in a virtual machine just isn't the same. Thanks for your advice canoenfe it is greatly appreciated!

Offline

#5 2009-03-29 13:49:10

rocket
Member
Registered: 2009-01-24
Posts: 5

Re: hid_apple, bcm5974 and Macbook Pro Unibody

As refered above, the newer Macbook models 5.1 requires the dkms module, but it's possible to put it working.

With a fresh installation, the synaptics driver reported to work (command: synclient) using the options presented in:
http://wiki.debian.org/MacBook#Synaptic … MacbookPro

But, didn't have tapping or two finger scrolling....

So enough introduction :-P

To have the touchpad working with all the options you need to first get a version of bcm5974-dkms:

git clone http://bitmath.org/git/bcm5974-dkms.git

Next go to $BASEDIR/bcm5974-dkms/usr/src/dkms_source_tree
where you find a bcm5974.c

The Makefile have to be modified to contain the following:

obj-m    := bcm5974.o

KDIR    := /lib/modules/$(shell uname -r)/build
PWD    := $(shell pwd)

default:
    $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

Run make, at this point you have a new kernel module: bcm5974.ko

It's necessary to install. To do so run as root the following script: install.sh

#!/bin/sh
install -m 644 bcm5974.ko /lib/modules/`uname -r`/kernel/drivers/input/mouse/bcm5974.ko
/sbin/depmod -a

This will replace the kernel module in the kernel tree. Next reboot.

This procedure work for me. Please give me feedback, I like to know if also works for you ;-)

Last edited by rocket (2009-03-29 14:02:57)

Offline

#6 2009-03-30 02:47:03

lord enzo
Member
Registered: 2009-03-30
Posts: 4

Re: hid_apple, bcm5974 and Macbook Pro Unibody

Hello !!

I am not sure if I can probe that in my computer with linux mint but I am trying... I do all the things but t the end I can`t. Look:

loren@Matrix ~/bcm5974-dkms/usr/src/dkms_source_tree $ sh ./install.sh
install: no se puede efectuar `stat' sobre «bcm5974.ko»: No existe el fichero ó directorio
FATAL: Could not open /lib/modules/2.6.27-7-generic/modules.dep.temp for writing: Permission denied

Can you help me??  Thanks

I have the latest Macbook pro 15`` 2.51

Offline

#7 2009-03-30 08:52:48

rocket
Member
Registered: 2009-01-24
Posts: 5

Re: hid_apple, bcm5974 and Macbook Pro Unibody

I only test the procedure that I describe in Arch Linux which is my favorite distro.

Linux Mint is based on Ubuntu 8.10 Intrepid Ibex. I have installed Intrepid Ibex in a latest Macbook and all work without problem.

You can see the guide for install and configuration of ubuntu (or derivatives):
https://help.ubuntu.com/community/MacBook%20Aluminum

In this page you have the steps to add the mactel-support repository and install: applesmc-dkms, bcm5974-dkms and hal-applesmc.

Configure using the steps explained in the guide. And you get the multi-touch trackpad working smile

Offline

#8 2009-03-30 10:29:12

lord enzo
Member
Registered: 2009-03-30
Posts: 4

Re: hid_apple, bcm5974 and Macbook Pro Unibody

I am going to try right now !!

I will tell you later how it goes...   wink

Offline

#9 2009-03-30 12:51:32

lord enzo
Member
Registered: 2009-03-30
Posts: 4

Re: hid_apple, bcm5974 and Macbook Pro Unibody

The second click is the only thing I can´t configure correctly but i wil do, jeje. The rest goes perfect, yujuuu big_smile

Offline

#10 2009-03-30 13:03:04

lord enzo
Member
Registered: 2009-03-30
Posts: 4

Re: hid_apple, bcm5974 and Macbook Pro Unibody

I get it. It was just press at the same time you put your two fingers on the touchpad.

big_smile:D:D:D

Pd: sorry for my bad english and thanks a lot for help me !!

Offline

#11 2009-06-06 16:19:56

berkus
Member
From: Tallinn, Estonia
Registered: 2005-03-29
Posts: 65
Website

Re: hid_apple, bcm5974 and Macbook Pro Unibody

Argh, looks like the default bcm5974 driver from kernel doesn't work at all with mbp 5,1. I installed the git version and all is fine now! Thanks for the guide.

Last edited by berkus (2009-06-06 18:49:54)


keep in touch.

Offline

Board footer

Powered by FluxBB