Recently, I got a new Macbook Pro, so I decided to give OpenSolaris 2008.11 a go on the old one. The old one is a 15" Core Duo (32bit), first-generation MacBook Pro (2006).
OpenSolaris installed just fine. Most things work. The internal keyboard, wireless (had to add an alias for ath, but it works ok), etc. One thing that doesn't work is the internal mouse/trackpad. From what I've read, in default mode, the trackpad should just work as a normal USB mouse. I tried booting a Linux (OpenSUSE) live CD, and it works fine there, except that Linux has a special 'appletouch' driver, that puts the trackpad in a special, apple internal, mode (report id 0x5), so that more detailed information is given, and you can do things like tap on the trackpad with two or three fingers. So, to see if it will work as a normal USB mouse, I booted a NetBSD live CD, since I know that NetBSD will treat it as a normal USB mouse. And, sure enough, it worked fine. However, no such luck under Solaris. I am unable to generate any movement data moving my finger over the trackpad, and the mousebutton does generate a click, but also generates +1/+1 x/y movement, which isn't right. I looked at the HID report structures, and they look normal. When I dump the raw data from /dev/usb/hid?, I see the following: * 4-byte messages: a report id of 0x2, and then 3 bytes of data. That's consistent with the HID report structure, which says 5x1+3x1+2x8 == 24 bits. * A continuous stream of messages with all zeros for the three byte data when there's no activity. A comment in the Linux appletouch driver says that the device tends to do that. While this is annoying, it shouldn't stop the driver from working, since usbms ignores those messages. * When the button is pressed, I see the following messages: 0x02 0x00 0x00 0x00 <press button> 0x02 0x00 0x00 0x01 0x02 0x00 0x01 0x01 0x02 0x00 0x01 0x01 0x02 0x01 0x01 0x01 <release button> 0x02 0x00 0x01 0x01 0x02 0x00 0x01 0x01 0x02 0x00 0x00 0x01 0x02 0x00 0x00 0x00 That's weird. The button press/release seems to be reflected correctly, but then the data reflects +1 X and +1 Y movement, which isn't there at all. And, again, moving my finger over the trackpad doesn't generate any data (well, no data that isn't all zeros, anyway; it might be generating all zero data, but that gets lost in all the other zero data packets). Since NetBSD works fine with the device in plain USB mouse mode, there must be something that the Solaris USB code does wrong. The problem does not seem to be usbms itself; it is taking the correct actions based on bad data passed to it from below. So, the hid code must be at fault here somehow. Ill post the relevant parts of the ::prtusb -t output below. The confusing part is that it has two "mouse" instances. One comes with the keyboard, and appears to be the one that can be switched to use report id 5, with full tap/finger support. The other one looks like a plain mouse. - Frank ===== mouse, instance #5 (driver name: hid) /pci at 0,0/pci8086,7270 at 1d/device at 2/mouse at 1 dip: 0xd1baa170 hid_statep: 0xd3deb480 hid_errlevel: 0x4 usage page ( 0x01 ) usage ( 0x02 ) COLLECTION ( 0x01 ) usage page ( 0x01 ) usage ( 0x01 ) COLLECTION ( 0x00 ) usage page ( 0x09 ) logical minimum ( 0x00 ) logical maximum ( 0x01 ) report id ( 0x02 ) report count ( 0x03 ) report size ( 0x01 ) usage min ( 0x01 ) usage max ( 0x03 ) INPUT ( 0x02 ) usage page ( 0x09 ) logical minimum ( 0x00 ) logical maximum ( 0x01 ) report id ( 0x02 ) report count ( 0x01 ) report size ( 0x05 ) INPUT ( 0x01 ) report id ( 0x02 ) usage page ( 0x01 ) logical minimum ( 0x81 ) logical maximum ( 0x7f ) report size ( 0x08 ) report count ( 0x02 ) usage ( 0x30 ) usage ( 0x31 ) INPUT ( 0x06 ) END_COLLECTION ( ) END_COLLECTION ( ) report id ( 0x02 ) logical minimum ( 0x81 ) logical maximum ( 0x7f ) report size ( 0x08 ) report count ( 0x02 ) usage page ( 0xff ) usage ( 0x01 ) COLLECTION ( 0x00 ) usage page ( 0xff ) logical minimum ( 0x01 ) logical maximum ( 0x41 ) physical minimum ( 0x00 ) physical maximum ( 0xff ) report id ( 0x05 ) report size ( 0x08 ) report count ( 0x3f ) usage ( 0x02 ) INPUT ( 0x00 ) usage page ( 0xff ) physical minimum ( 0x00 ) physical maximum ( 0xff ) report id ( 0x05 ) logical minimum ( 0x80 ) logical maximum ( 0x7f ) report size ( 0x08 ) report count ( 0x10 ) usage ( 0x04 ) FEATURE ( 0x02 ) END_COLLECTION ( ) input, instance #6 (driver name: hid) /pci at 0,0/pci8086,7270 at 1d/device at 2/input at 2 dip: 0xd1baa000 hid_statep: 0xdefb8d40 hid_errlevel: 0x4 usage page ( 0x0c ) usage ( 0x01 ) COLLECTION ( 0x01 ) usage page ( 0x0c ) report size ( 0x08 ) report count ( 0x01 ) logical minimum ( 0x00 ) logical maximum ( 0xff 0x00 ) usage ( 0xb8 ) INPUT ( 0x02 ) END_COLLECTION ( ) } [...] mouse, instance #1 (driver name: hid) /pci at 0,0/pci8086,7270 at 1d,3/device at 1/mouse at 1 dip: 0xd1baa450 hid_statep: 0xd3465340 hid_errlevel: 0x4 usage page ( 0x01 ) usage ( 0x02 ) COLLECTION ( 0x01 ) usage page ( 0x01 ) usage ( 0x01 ) COLLECTION ( 0x00 ) usage page ( 0x09 ) logical minimum ( 0x00 ) logical maximum ( 0x01 ) report count ( 0x05 ) report size ( 0x01 ) usage min ( 0x01 ) usage max ( 0x05 ) INPUT ( 0x02 ) usage page ( 0x09 ) logical minimum ( 0x00 ) logical maximum ( 0x01 ) report count ( 0x01 ) report size ( 0x03 ) INPUT ( 0x03 ) usage page ( 0x01 ) logical minimum ( 0x81 ) logical maximum ( 0x7f ) report size ( 0x08 ) report count ( 0x02 ) usage ( 0x30 ) usage ( 0x31 ) INPUT ( 0x06 ) logical minimum ( 0x81 ) logical maximum ( 0x7f ) usage page ( 0x00 0xff ) report count ( 0x01 ) report size ( 0x08 ) usage ( 0x01 ) FEATURE ( 0x02 ) END_COLLECTION ( ) END_COLLECTION ( ) }