Subject: Trackpad/X on 15 inch PowerBook G4
To: None <port-macppc@NetBSD.org>
From: Johan =?iso-8859-1?Q?Wall=E9n?= <johan.wallen+lists@tkk.fi>
List: port-macppc
Date: 06/01/2005 14:47:08
Hi,

has anybody managed to run any version of X on a new 15 inch PowerBook
G4 with an ATI Mobility Radeon 9700 RV360 M11 card? I have tried both
XFree86 version 4.5 and Xorg version 6.8.2 without any success. With
Xmacppc, everything look ok, but I cannot get the trackpad to work.

My guess is that the kernel (3.99.3; 1 month old, so I should probably
update) does not detect the trackpad properly, but instead detects
some phantom device (I might be wrong -- my understanding of device
drivers is very limited).

Here are the (I think) relevant lines from dmesg:

uhidev0 at uhub0 port 1 configuration 1 interface 0
uhidev0: Apple Computer product 0x1000, rev 2.00/17.92, addr 2, iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd0 at ukbd0 mux 1
wskbd0: connecting to wsdisplay0
uhidev1 at uhub0 port 1 configuration 1 interface 1
uhidev1: Apple Computer product 0x1000, rev 2.00/17.92, addr 2, iclass 3/1
ums0 at uhidev1: 5 buttons
wsmouse0 at ums0 mux 0
uhidev2 at uhub0 port 2 configuration 1 interface 0
uhidev2: Apple Computer Apple Internal Keyboard/Trackpad, rev 2.00/0.28, addr 3, iclass 3/1
ukbd1 at uhidev2: 8 modifier keys, 5 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev3 at uhub0 port 2 configuration 1 interface 1
uhidev3: Apple Computer Apple Internal Keyboard/Trackpad, rev 2.00/0.28, addr 3, iclass 3/1
uhid0 at uhidev3: input=81, output=0, feature=16
uhidev4 at uhub0 port 2 configuration 1 interface 2
uhidev4: Apple Computer Apple Internal Keyboard/Trackpad, rev 2.00/0.28, addr 3, iclass 3/0
uhid1 at uhidev4: input=1, output=0, feature=0

The wskbd0 keyboard seems to be a phantom one: changing its layout has
no real effect and the keyboard does not work under X unless I specify
/dev/wskbd1 as the device. The wskbd1 keyboard works as expected.

OpenFirmware reports two keyboards/trackpads:

  /pci@f2000000/usb@1a/device@1  with product-id 00001000 and
  /pci@f2000000/usb@1a/device@2  with product-id 0000020f.

The SytemProfiler (or whatever it is called) under OS X only reports 1
keyboard/trackpad (this is from a 10.4 upgrade DVD, I do not have OS X
installed anymore). The SytemProfiler gives the following information
about the USB bus where the keyboard/trackpad lives

  Host Controller Location: Built in USB
  Host Controller Driver:   AppleUSBOHCI
  PCI Device ID:            0x003f
  PCI Vendor ID:            0x106b
  Bus Number:               0x1a

and the following information about the keyboard/trackpad

  Version:    0.28
  Product ID: 0x020f
  Vendor ID:  0x05ac

So the second keyboard/trackpad really seems to be the correct one.

The complete dmesg output from a kernel compiled with the options
DIAGNOSTIC, DEBUG, USB_DEBUG, WSMUX_DEBUG and UHIDEV_DEBUG defined,
and with umsdebug, wsmuxdebug and uhidevdebug set to 6 is available
from

  http://www.tcs.hut.fi/~johan/macppc/dmesg.trackpad-debug 

The kernel should otherwise be equivalent to GENERIC for this
purpose. 

This could perhaps be related to PR 29348?

Any clue would be appreciated.
Thanks in advance,

-- Johan