# ThinkPad's TrackPoint and TouchPad don't work properly



## w1k0 (Sep 24, 2009)

I installed on my ThinkPad T60 FreeBSD 7.2 with custom GENERIC kernel (I added to the original one a few ALTQ options required by pf). 

Despite of a lot of attempts I'm unable to force to the satisfied work TrackPoint and TouchPad. Precisely speaking both these devices allow to move mouse cursor and to use left and right mouse buttons but both don't allow to use scroll function. 

I tried different xorg.conf variants and different FDI files. I used FDI files from FreeBSD repository as well as FDI files which I use successfully in Slackware 13.0. I put those files as well in /usr/local/etc/hal/fdi/policy/ as in /etc/hal/fdi/policy/ directories. I tried also some other tips found in Internet. Without success. 

It seems HAL completely ignores FDI files in the case of my machine. I was unable to change any system's setting using FDI files. Neither TrackPoint and TouchPad behavior nor keyboard layout. 

External USB mouse works well both in console mode and in X Window. 

What can I do to force HAL to work on my ThinkPad?


----------



## SirDice (Sep 24, 2009)

Does that one have a synaptics touchpad?

Try disabling moused if that's running and install x11-drivers/synaptics. Then configure Xorg to use that instead of the sysmouse.


----------



## w1k0 (Sep 25, 2009)

Thank you for the reply, SirDice.

I think it's Synaptics TouchPad... 

First I commented two lines and added two lines to rc.conf:


```
#moused_enable="YES"
#moused_type="auto"

moused_enable="NO"
moused_nodefault_enable="NO"
```

Then I installed /usr/ports/x11-drivers/xf86-input-synaptics
driver. 

At the end I modified those two sections in xorg.conf:


```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
#       InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Touchpad0" "CorePointer"
EndSection

Section "InputDevice"
        Identifier      "Touchpad0"
        Driver          "synaptics"
        Option          "SendCoreEvents"   "true"
        Option          "Device"           "/dev/psm0"
        Option          "Protocol"         "psm"
#       Option          "TouchpadOff"      "1"
#       Option          "HorizScrollDelta" "1"
        Option          "RightEdge"        "5000"
        Option          "BottomEdge"       "4000"
        Option          "RTCornerButton"   "0"
        Option          "RBCornerButton"   "0"
        Option          "SHMConfig"        "on"
EndSection
```

Unfortunately TouchPad works the same as before -- without scrolling. 

Moreover my main input device is TrackPoint. I switch TouchPad on only when someone else is going to use my machine.


----------



## w1k0 (Sep 25, 2009)

I just tried the solution described here: http://wiki.freebsd.org/SynapticsTouchpad in the section ``How to use it''. The results are the same as before -- no scrolling with TouchPad. 

It's strange. I can enable or disable moused, I can use xorg.conf with different settings or remove it, I can put FDI files in different directories of remove them -- the effects are still the same: TouchPad's scrolling and TrackPoint's third button and scrolling don't work.


----------



## w1k0 (Sep 25, 2009)

After one week of skirmiches I finally managed to force to work third TrackPoint's button. Scrolling still doesn't work but pasting text works. It's interesting because I achieved it after putting in /boot/loader.conf file that line: 


```
hw.psm.synaptics_support="1"
```

It should affect Synaptics' TouchPad but in my case it affected automagically TrackPoint. 

The problem with scrolling still persists in case of both TrackPoint and TouchPad.


----------



## LateNiteTV (Sep 26, 2009)

check this thread out.
http://forums.freebsd.org/showthread.php?t=1617&highlight=synaptics


----------



## w1k0 (Sep 27, 2009)

LateNiteTV said:
			
		

> check this thread out.
> http://forums.freebsd.org/showthread.php?t=1617&highlight=synaptics



I followed these hints:

1. Instead of package synaptics I have installed in my system port /usr/ports/x11-drivers/xf86-input-synaptics. 

2. I added two options to /boot/loader.conf:


```
hw.psm.synaptics_support="1"
debug.psm.loglevel="4"
```

3. I updated my /etc/X11/xorg.conf:


```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        #InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Touchpad0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
        Option          "AllowEmptyInput"
EndSection

Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/lib/X11/fonts/misc/"
        FontPath     "/usr/local/lib/X11/fonts/TTF/"
        FontPath     "/usr/local/lib/X11/fonts/OTF"
        FontPath     "/usr/local/lib/X11/fonts/Type1/"
        FontPath     "/usr/local/lib/X11/fonts/100dpi/"
        FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "extmod"
        Load  "glx"
        Load  "record"
        Load  "synaptics"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

#Section "InputDevice"
#       Identifier  "Mouse0"
#       Driver      "mouse"
#       Option      "Protocol" "auto"
#       Option      "Device" "/dev/sysmouse"
#       Option      "ZAxisMapping" "4 5 6 7"
#EndSection

Section "InputDevice"
        Identifier  "Touchpad0"
        Driver      "synaptics"
        Option      "Protocol"              "psm"
        Option      "Device"                "/dev/psm0"

        Option      "LeftEdge"              "1700"
        Option      "RightEdge"             "5300"
        Option      "TopEdge"               "1700"
        Option      "BottomEdge"            "4200"

        Option      "FingerLow"             "25"
        Option      "FingerHigh"            "30"

        Option      "MaxTapTime"            "180"
        Option      "MaxTapMov"             "220"

        Option      "VertScrollDelta"       "100"
        Option      "HorizScrollDelta"      "100"

        Option      "MinSpeed"              "0.06"
        Option      "MaxSpeed"              "0.06"
        Option      "AccelFactor"           "0.0010"

        Option      "ScrollButtonRepeat"    "100"
        Option      "UpDownScrolling"       "on"
        Option      "UpDownRepeat"          "on"
        Option      "LeftRightScrolling"    "on"
        Option      "LeftRightRepeat"       "on"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "M52 [Mobility Radeon X1300]"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
```

These changes gave nothing: TouchPad worked as before -- without scrolling. 

I inspected /var/log/Xorg.0.log:


```
(II) LoadModule: "synaptics"
(II) Loading /usr/local/lib/xorg/modules/input//synaptics_drv.so
(II) Module synaptics: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 1.1.2
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(II) LoadModule: "radeon"
(II) Loading /usr/local/lib/xorg/modules/drivers//radeon_drv.so
(II) Module radeon: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 6.12.2
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 5.0
(II) LoadModule: "synaptics"
(II) Reloading /usr/local/lib/xorg/modules/input//synaptics_drv.so
.
.
.
(II) Synaptics touchpad driver version 1.1.2
(**) Option "Device" "/dev/psm0"
(EE) xf86OpenSerial: Cannot open device /dev/psm0
        Device busy.
(EE) Synaptics driver unable to open device
(EE) PreInit failed for input device "Touchpad0"
(II) UnloadModule: "synaptics"
```

The key error above is:


```
(EE) xf86OpenSerial: Cannot open device /dev/psm0
        Device busy.
```

I inspected dmesg:


```
.
.
.
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: current command byte:0047
Synaptics Touchpad v6.2
  Model information:
   infoRot180: 1
   infoPortrait: 0
   infoSensor: 1
   infoHardware: 80
   infoNewAbs: 1
   capPen: 0
   infoSimplC: 1
   infoGeometry: 1
  Extended capabilities:
   capExtended: 1
   capPassthrough: 1
   capSleep: 1
   capFourButtons: 0
   capMultiFinger: 1
   capPalmDetect: 1
  Additional Buttons: 0
psm0: found Synaptics Touchpad
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model Synaptics Touchpad, device ID 0-00, 3 buttons
psm0: config:00000000, flags:00000008, packet size:6
psm0: syncmask:c0, syncbits:00
.
.
.
psm: ENABLE_DEV return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 01 64
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 02 64
em0: link state changed to UP
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
drm0: <ATI Mobility Radeon X1300> on vgapci0
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] Initialized radeon 1.29.0 20080528
psm0: lost interrupt?
info: [drm] Setting GART location based on new memory map
info: [drm] Loading R500 Microcode
info: [drm] Num pipes: 1
info: [drm] writeback test succeeded in 1 usecs
drm0: [ITHREAD]
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
```

When I tried to use TouchPad the following information was added to dmesg:


```
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psmintr: 94 0d 0f e0 10 1b
psmintr: 90 0d 46 e4 02 26
psmintr: 90 0d 47 e4 0a 2e
.
.
.
psmintr: 80 00 00 c0 00 00
psmintr: 80 00 00 c0 00 00
psmintr: 80 00 00 c0 00 00
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
```

So I ran the command ps ax | grep psm0:


```
40  ??  WL     0:00.43 [irq12: psm0]
  512  ??  Is     0:00.18 /usr/sbin/moused -p /dev/psm0 -t auto
  699  ??  I      0:00.01 hald-addon-mouse-sysmouse: /dev/psm0 (hald-addon-mouse-sy)
 1217  p1  S+     0:00.00 grep psm0
```

Because moused used psm0 device I disabled it in /etc/rc.conf:


```
#moused_enable="YES"
#moused_type="auto"

moused_enable="NO"
#moused_nodefault_enable="NO"
```

After reboot TrackPoint and TouchPad don't work in console mode because moused is disabled. 

TrackPoint works in X Window as before -- without scrolling. TouchPad works with vertical scrolling but without horizontal one. 

As for scrolling with TouchPad it's progress but the price is high: mouse stopped to work in the console mode. TrackPoint scrolling issue is still unsolved.


----------



## w1k0 (Sep 27, 2009)

With the above configuration Xorg loads TouchPad driver but has problems with PS/2 Mouse:


```
(II) LoadModule: "synaptics"
(II) Loading /usr/local/lib/xorg/modules/input//synaptics_drv.so
(II) Module synaptics: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 1.1.2
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(II) LoadModule: "radeon"
(II) Loading /usr/local/lib/xorg/modules/drivers//radeon_drv.so
(II) Module radeon: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 6.12.2
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 5.0
(II) LoadModule: "synaptics"
(II) Reloading /usr/local/lib/xorg/modules/input//synaptics_drv.so
.
.
.
(II) Synaptics touchpad driver version 1.1.2
(**) Option "Device" "/dev/psm0"
(**) Option "LeftEdge" "1700"
(**) Option "RightEdge" "5300"
(**) Option "TopEdge" "1700"
(**) Option "BottomEdge" "4200"
(**) Option "FingerLow" "25"
(**) Option "FingerHigh" "30"
(**) Option "MaxTapTime" "180"
(**) Option "VertScrollDelta" "100"
(**) Option "HorizScrollDelta" "100"
(**) Option "UpDownScrolling" "on"
(**) Option "LeftRightScrolling" "on"
(**) Option "ScrollButtonRepeat" "100"
(**) Option "MinSpeed" "0.06"
(**) Option "MaxSpeed" "0.06"
(**) Option "AccelFactor" "0.0010"
(--) Touchpad0 synaptics touchpad found
(--)  Synaptics Touchpad, model: 0
(--)  Firmware: 6.2
(--)  180 degree mounted touchpad
(--)  Sensor: 1
(--)  new absolute packet format
(--)  Touchpad has extended capability bits
(--)  -> multifinger detection
(--)  -> palm detection
(--)  -> pass-through port
(**) Option "CorePointer"
(**) Touchpad0: always reports core events
(II) XINPUT: Adding extended input device "Touchpad0" (type: TOUCHPAD)
(**) Touchpad0: (accel) keeping acceleration scheme 1
(**) Touchpad0: (accel) filter chain progression: 2.00
(**) Touchpad0: (accel) filter stage 0: 20.00 ms
(**) Touchpad0: (accel) set acceleration profile 0
(--) Touchpad0 synaptics touchpad found
(--)  Synaptics Touchpad, model: 0
(--)  Firmware: 6.2
(--)  180 degree mounted touchpad
(--)  Sensor: 1
(--)  new absolute packet format
(--)  Touchpad has extended capability bits
(--)  -> multifinger detection
(--)  -> palm detection
(--)  -> pass-through port
.
.
.
(II) config/hal: Adding input device PS/2 Mouse
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/xorg/modules/input//mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 1.4.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(**) PS/2 Mouse: Device: "/dev/psm0"
(==) PS/2 Mouse: Protocol: "Auto"
(**) PS/2 Mouse: always reports core events
(**) Option "Device" "/dev/psm0"
(EE) xf86OpenSerial: Cannot open device /dev/psm0
        Device busy.
(EE) PS/2 Mouse: cannot open input device
(EE) PreInit failed for input device "PS/2 Mouse"
(II) UnloadModule: "mouse"
(EE) config/hal: NewInputDeviceRequest failed (8)
```


The key error above is:


```
(EE) xf86OpenSerial: Cannot open device /dev/psm0
        Device busy.
```

So I modified ServerLayout section to use AlwaysCore device:


```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "AlwaysCore"
        InputDevice    "Touchpad0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
```

and I uncommented InputDevice Mouse0:


```
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection
```

In result regular mouse driver works as well:


```
(II) config/hal: Adding input device product 0x310b
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/xorg/modules/input//mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 1.4.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(**) product 0x310b: Device: "/dev/sysmouse"
(==) product 0x310b: Protocol: "Auto"
(**) product 0x310b: always reports core events
(**) Option "Device" "/dev/sysmouse"
(==) product 0x310b: Emulate3Buttons, Emulate3Timeout: 50
(**) product 0x310b: ZAxisMapping: buttons 4 and 5
(**) product 0x310b: Buttons: 9
(**) product 0x310b: Sensitivity: 1
(II) XINPUT: Adding extended input device "product 0x310b" (type: MOUSE)
(**) product 0x310b: (accel) keeping acceleration scheme 1
(**) product 0x310b: (accel) filter chain progression: 2.00
(**) product 0x310b: (accel) filter stage 0: 20.00 ms
(**) product 0x310b: (accel) set acceleration profile 0
(II) product 0x310b: SetupAuto: hw.iftype is 4, hw.model is 0
(II) product 0x310b: SetupAuto: protocol is SysMouse
```


----------



## w1k0 (Sep 27, 2009)

After reboot Xorg stopped to load /dev/sysmouse driver and started to load again /dev/psm0 one:


```
(II) config/hal: Adding input device PS/2 Mouse
(II) LoadModule: "mouse"
(II) Loading /usr/local/lib/xorg/modules/input//mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 1.4.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(**) PS/2 Mouse: Device: "/dev/psm0"
(==) PS/2 Mouse: Protocol: "Auto"
(**) PS/2 Mouse: always reports core events
(**) Option "Device" "/dev/psm0"
(EE) xf86OpenSerial: Cannot open device /dev/psm0
        Device busy.
(EE) PS/2 Mouse: cannot open input device
(EE) PreInit failed for input device "PS/2 Mouse"
(II) UnloadModule: "mouse"
(EE) config/hal: NewInputDeviceRequest failed (8)
```

Strange and frustrating...


----------



## timzwz (Aug 17, 2013)

To configure the scrolling you need add below

```
Section "ServerFlags"
	        Option  "AllowEmptyInput"       "false"
EndSection
```
into xorg.conf, and then set below

```
Option     "EmulateWheel" "on" #Enable wheel emulation for the Trackpoint
    Option     "EmulateWheelButton" "2" #Use the middle button for the emulation
    Option     "YAxisMapping" "4 5" #Map trackpoint Y axis to Y axis of emulated wheel
    Option     "XAxisMapping" "6 7" #Map trackpoint X axis to X axis of emulated wheel
```
in the InputDevice section of xorg.conf, then it should be ok! 

Thanks!


----------



## wblock@ (Aug 17, 2013)

timzwz said:
			
		

> Configure the scrolling you need add below:
> 
> ```
> Section "ServerFlags"
> ...



No.  Do not do that.  On old versions of X, it does not do what is expected (see AllowEmptyInput, FreeBSD, and Xorg Input).  On newer versions of X, it is ignored because so many people were misusing it.


----------



## timzwz (Aug 17, 2013)

Ok, thanks for point out! I just join FreeBSD group one day. I also had a Thinkpad scrolling problem. And I had set above in xorg.conf is okay on my side. But I did not upgrade. I am using FreeBSD 9.1, so could advise now what is the new solutions for the scrolling problem?


----------



## wblock@ (Aug 17, 2013)

I don't have a modern Thinkpad, so can't advise on that.  Although I can say that messing with AllowEmptyInput is not part of it.


----------



## mkirbst (Aug 23, 2013)

This works for me on Thinkpad W500 with FreeBSD 9.1:


```
Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
##Trackpoint Scrolling - snip -
        Option     "EmulateWheel" "on" #Enable wheel emulation for the Trackpoint
        Option     "EmulateWheelButton" "2" #Use the middle button for the emulation
        Option     "YAxisMapping" "4 5" #Map trackpoint Y axis to Y axis of emulated wheel
        Option     "XAxisMapping" "6 7" #Map trackpoint X axis to X axis of emulated wheel
## - snap -
EndSection
```

I had only to add the options from post #3 to the device section and scrolling works for my track stick. *V*ery nice.

*G*reets, *M*arcel.


----------

