# Synaptics - touchpad right key on R60



## Oberon (Jan 8, 2010)

Hi, 

I've got a problem with my touchpad right key. When i click/push the button 2 things happens: 
1) right click event (which is ok)
2) scroll event (which is nok)

Except that everything works fine. What is the problem?
My laptop is IBMR60 and Freebsd 8.0 Release
Thx


----------



## SirDice (Jan 8, 2010)

Try installing and configuring x11-drivers/xf86-input-synaptics.


----------



## Oberon (Jan 8, 2010)

Yes 
I have this already installed and this driver is not working fine. 
If i keep pressed scroll happens. all other functionality working fine (touch track vertical scrolling etc.) except this one button


----------



## LateNiteTV (Jan 8, 2010)

can you post your sysctl.conf, rc.conf, xorg.conf, and /boot/loader.conf


----------



## swa (Jan 9, 2010)

I pretty much have the same problem on my laptop. (PB Easynote SJ51-B-042)

When I right-click using 2-finger tap in stead of the button 2 everything is fine. 
Also, when using a usb mouse connected everything is fine. 
Only the button 2 from the touchpad is *sometimes* acting strange and give me the same 2 things as the OP (scroll-start + right-click event).
When using button 2 in Opera, it is only there when I open *more* then 1 Tab. 
With 1 Tab, the button 2 acts normal. 
In other applications, I can't figure out why button 2 is OK sometimes, and then sometimes it randomly starts a scroll event.

I am on FreeBSD 8.0-RELEASE-p1 amd64 with xfce4 and followed the guide on http://wiki.freebsd.org/SynapticsTouchpad

/boot/loader.conf

```
zfs_load="YES"
vfs.root.mountfrom="zfs:zroot"
geom_mirror_load="YES"
nvidia_load="YES"
amdtemp_load="YES"
vboxdrv_load="YES"
#vboxnet_enable="YES"          #Vanaf Vbox versie 3.1.2
hw.psm.synaptics_support="1"
```

/etc/rc.conf

```
# Root Filesystem
zfs_enable="YES"

# Netwerk
hostname="laptop.hidden"
ifconfig_nfe0="inet 192.168.0.81 netmask 255.255.255.0"
# wlans_urtw0="wlan0"
# ifconfig_wlan0="inet 192.168.0.82 netmask 255.255.255.0 channel 11 ssid Edsel"
defaultrouter="192.168.0.200"

# Services
# pf_enable="YES"
sshd_enable="YES"
nginx_enable="YES"
spawn_fcgi_enable="YES"
netatalk_enable="YES"
afpd_enable="YES"

# Desktop 
hald_enable="YES"
dbus_enable="YES"
moused_enable="YES"
# gdm_enable="YES"
# gdm_lang="nl_NL"
powerd_enable="YES"
fusefs_enable="YES"

# Misc
linux_enable="YES"
syslogd_flags="-ss"
```

xorg.conf

```
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    FontPath        "/usr/local/lib/X11/fonts/misc/:unscaled"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/:unscaled"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/:unscaled"
    FontPath        "/usr/local/lib/X11/fonts/misc/"
    FontPath        "/usr/local/lib/X11/fonts/Type1/"
    FontPath        "/usr/local/lib/X11/fonts/100dpi/"
    FontPath        "/usr/local/lib/X11/fonts/75dpi/"
    FontPath        "/usr/local/lib/X11/fonts/cyrillic/"
    FontPath        "/usr/local/lib/X11/fonts/TTF/"
    FontPath        "/usr/local/lib/X11/fonts/TrueType/"
EndSection

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

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "AddARGBGLXVisuals" "True"
    Option         "RenderAccel" "True"
    Option         "AllowGLXWithComposite" "True"
    Option         "backingstore" "True"
    Option         "TripleBuffer" "True"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
```

/etc/sysctl.conf

```
# Synaptics Touchpad
hw.psm.synaptics.vscroll_hor_area=0
hw.psm.synaptics.vscroll_ver_area=-600
hw.psm.synaptics.vscroll_min_delta=50
hw.psm.synaptics.vscroll_div_min=100
hw.psm.synaptics.vscroll_div_max=150

hw.psm.synaptics.min_pressure=20
hw.psm.synaptics.max_pressure=220
hw.psm.synaptics.max_width=10

hw.psm.synaptics.weight_current=3
hw.psm.synaptics.weight_previous=6
hw.psm.synaptics.weight_previous_na=20
hw.psm.synaptics.weight_len_squared=2000

hw.psm.synaptics.div_min=9
hw.psm.synaptics.div_max=17
hw.psm.synaptics.div_max_na=30
hw.psm.synaptics.div_len=100

hw.psm.synaptics.multiplicator=10000

hw.psm.synaptics.margin_top=200
hw.psm.synaptics.margin_right=200
hw.psm.synaptics.margin_bottom=200
hw.psm.synaptics.margin_left=200

hw.psm.synaptics.na_top=1783
hw.psm.synaptics.na_right=563
hw.psm.synaptics.na_bottom=1408
hw.psm.synaptics.na_left=1600

hw.psm.synaptics.window_min=4
hw.psm.synaptics.window_max=10

hw.psm.synaptics.taphold_timeout=125000
```


----------



## Oberon (Jan 11, 2010)

LateNiteTV said:
			
		

> can you post your sysctl.conf, rc.conf, xorg.conf, and /boot/loader.conf



Yep, sorry for dellay(i was busy) .... below my configs

cat sysctl.conf

```
debug.cpufreq.lowest=600
hw.acpi.cpu.cx_lowest=C3
dev.cpu.0.cx_lowest=C2
dev.cpu.1.cx_lowest=C3
hw.acpi.s4bios=1

compat.linux.osrelease=2.6.16
kern.fallback_elf_brand=3
hw.syscons.bell=0
```

cat rc.conf

```
check_quotas="NO"
font8x14="iso02-8x14"
font8x16="iso02-8x16"
font8x8="iso02-8x8"
keymap="pl_PL.ISO8859-2"
keyrate="normal"
moused_enable="YES"
saver="logo"
scrnmap="NO"

wlans_wpi0="wlan0"
ifconfig_wlan0="WPA DHCP"

hostname="ibm"
hald_enable="YES"  #mouse and keyboard
dbus_enable="YES"

sendmail_enable="NONE"
sendmail_msp_queue_enable="NO"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"

powerd_enable="YES"
powerd_flags="-i 85 -r 60 -p 100"
performance_cx_lowest="C3"
economy_cx_lowest="C3"
linux_enable="YES"
```



cat xorg.conf

```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
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  "extmod"
        Load  "record"
        Load  "dbe"
        Load  "glx"
        Load  "dri"
        Load  "dri2"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "pl"
EndSection

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

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

Section "Device"
        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
```

cat loader.conf

```
if_wpi_load="YES"
loader_logo="beastie"
autoboot_delay="1"

#sound_load="YES"
snd_hda_load="YES"

cpufreq_load="YES"
coretemp_load="YES"

kern.hz="100"
hw.acpi.reset_video="1"
hw.acpi.s4bios="1"
hw.syscons.bell="0"
hw.psm.synaptics_support="1"
```


----------



## LateNiteTV (Jan 11, 2010)

try commenting out moused in rc.conf and adding

```
Load "Synaptics"
```
or

```
Load "synaptics" (lowercase s)
```
im not sure which one.
to xorg.conf


----------



## Oberon (Jan 12, 2010)

Yes that helps but now scroll area on touch pad does not work 

my sysctl -a |grep synapt below

```
hw.psm.synaptics.directional_scrolls: 1
hw.psm.synaptics.min_pressure: 16
hw.psm.synaptics.max_pressure: 220
hw.psm.synaptics.max_width: 10
hw.psm.synaptics.margin_top: 200
hw.psm.synaptics.margin_right: 200
hw.psm.synaptics.margin_bottom: 200
hw.psm.synaptics.margin_left: 200
hw.psm.synaptics.na_top: 1783
hw.psm.synaptics.na_right: 563
hw.psm.synaptics.na_bottom: 1408
hw.psm.synaptics.na_left: 1600
hw.psm.synaptics.window_min: 4
hw.psm.synaptics.window_max: 10
hw.psm.synaptics.multiplicator: 10000
hw.psm.synaptics.weight_current: 3
hw.psm.synaptics.weight_previous: 6
hw.psm.synaptics.weight_previous_na: 20
hw.psm.synaptics.weight_len_squared: 2000
hw.psm.synaptics.div_min: 9
hw.psm.synaptics.div_max: 17
hw.psm.synaptics.div_max_na: 30
hw.psm.synaptics.div_len: 100
hw.psm.synaptics.tap_max_delta: 80
hw.psm.synaptics.tap_min_queue: 2
hw.psm.synaptics.taphold_timeout: 125000
hw.psm.synaptics.vscroll_hor_area: 1
hw.psm.synaptics.vscroll_ver_area: -600
hw.psm.synaptics.vscroll_min_delta: 50
hw.psm.synaptics.vscroll_div_min: 100
hw.psm.synaptics.vscroll_div_max: 150
```

This are my changes :
xorg.conf

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

...

Section "InputDevice"
    Identifier     "Synaptics_Touchpad"
    Driver         "synaptics"
 #   Option         "SendCoreEvents" "true"
    Option         "Device" "/dev/psm0" 
    Option         "Protocol" "alps"
#    Option         "HorizScrollDelta" "0"
#    Option	   "VertScrollDelta" "10"
#    Option         "SHMConfig" "true"
#    Option         "MaxSpeed" "0.9"
#    Option         "AccelFactor" "0.07"
EndSection
```

and have no idea whats wrong with scroll?


----------



## Oberon (Jan 12, 2010)

OK i've found solution:
alps -> psm and reduction "touchpaded coursor" motion speed

```
Section "InputDevice"
    Identifier     "Synaptics_Touchpad"
    Driver         "synaptics"
#    Option         "SendCoreEvents" "true"
    Option         "Device" "/dev/psm0" 
    Option         "Protocol" "psm" #"alps"
#    Option         "HorizScrollDelta" "0"
#    Option	   "VertScrollDelta" "10"
#    Option         "SHMConfig" "true"
#    Option         "MaxSpeed" "0.8"
#    Option         "AccelFactor" "0.07"

    Option          "MaxTapTime"            "180"
    Option          "MaxTapMove"            "220"
    Option          "VertScrollDelta"       "100"
    Option          "HorizScrollDelta"      "100"

    Option          "MinSpeed"              "0.10"
    Option          "MaxSpeed"              "0.10"
    Option          "AccelFactor"           "0.0030"
#        Option          "ScrollButtonRepeat"    "100"
#        Option          "UpDownScrolling"       "on"
#        Option          "UpDownRepeat"          "on"
#        Option          "LeftRightScrolling"    "on"
#        Option          "LeftRightRepeat"       "on"

EndSection
```

but now i get [EE] on Xorg log.

```
(II) Synaptics touchpad driver version 1.1.2
(**) Option "Device" "/dev/psm0"
(**) Option "MaxTapTime" "180"
(**) Option "MaxTapMove" "220"
(**) Option "VertScrollDelta" "100"
(**) Option "HorizScrollDelta" "100"
(**) Option "MinSpeed" "0.10"
(**) Option "MaxSpeed" "0.10"
(**) Option "AccelFactor" "0.0030"
(--) Synaptics_Touchpad 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"
(**) Synaptics_Touchpad: always reports core events
(II) XINPUT: Adding extended input device "Synaptics_Touchpad" (type: TOUCHPAD)
(**) Synaptics_Touchpad: (accel) keeping acceleration scheme 1
(**) Synaptics_Touchpad: (accel) filter chain progression: 2.00
(**) Synaptics_Touchpad: (accel) filter stage 0: 20.00 ms
(**) Synaptics_Touchpad: (accel) set acceleration profile 0
(--) Synaptics_Touchpad 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 AT Keyboard
(II) LoadModule: "kbd"
(II) Loading /usr/local/lib/xorg/modules/input//kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
	compiled for 1.6.1, module version = 1.3.2
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 4.0
(**) AT Keyboard: always reports core events
(**) Option "Protocol" "standard"
(**) AT Keyboard: Protocol: standard
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbRules" "xorg"
(**) AT Keyboard: XkbRules: "xorg"
(**) Option "XkbModel" "pc105"
(**) AT Keyboard: XkbModel: "pc105"
(**) Option "XkbLayout" "us"
(**) AT Keyboard: XkbLayout: "us"
(**) Option "CustomKeycodes" "off"
(**) AT Keyboard: CustomKeycodes disabled
(II) XINPUT: Adding extended input device "AT Keyboard" (type: KEYBOARD)
(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.1, 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)
```

and my dmesg 

```
oberon@oberon> dmesg |grep psm
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model Synaptics Touchpad, device ID 0
```


----------



## Oberon (Jan 12, 2010)

I have forgot to add a sentence to my prev post:
"except that error message everything works fine and now i have properly behaving touchpad. But why this errors occurs?" 

But i am not able (yet ...minimum 10 posts ) edit my post so sorry for that


----------



## LateNiteTV (Jan 12, 2010)

try changing this line

```
Option         "Device" "/dev/psm0"
```
to

```
Option         "Device" "/dev/sysmouse"
```

see if that clears up the error message.

edit: this probably wont work seeing as how dmesg shows psm0, but hey, give it a shot.


----------



## Oberon (Jan 12, 2010)

Hi 
I've already tried sysmouse but it works more unstable than psm cursor motion is not so fluent and e.g. menu in fluxbox has some delay after mouse click (seems that mouse events are triggered with some delay )

I've run it again and that is my (EE) log:

```
(EE) Synaptics_Touchpad Can't set native mode
(EE) Synaptics_Touchpad Unable to query/initialize Synaptics hardware.
(EE) PreInit failed for input device "Synaptics_Touchpad"
(EE) config/hal: NewInputDeviceRequest failed (8)
(EE) config/hal: NewInputDeviceRequest failed (8)
```


----------



## LateNiteTV (Jan 12, 2010)

well if everything works with psm0, then i would just ignore the error message.


----------



## LateNiteTV (Jan 12, 2010)

have you tried using the touchpad with no configuration at all?
removing the synaptics related stuff from loader.conf, xorg.conf, and re-enabling moused in rc.conf?

my laptop with synaptics touchpad worked perfectly out of the box with NO configuration of touchpad. i just remapped the z axis to the y axis to get rid of the vertical scrolling (it bothered me).

and if you try that, replace /dev/psm0 with /dev/sysmouse in xorg.conf.


----------



## Oberon (Jan 12, 2010)

Yep then it is behaving like a normal mouse without scroll functionality. Current solution-mouse behave is the best one. I am just wondering if it is not the problem that mouse- track point is integrated with keyboard(Thinkpad R60)  and this could be the reason for error log.


```
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
```


----------



## LateNiteTV (Jan 12, 2010)

same thing here with the touchpad integrated with atkbd and i dont have the error message in the xorg log.

the synaptics touchpad has been all but a pleasant experience for me. trying to configure it has only caused it to work horribly.
its times like these that i wish i were a better programmer so i could write some code and make the driver work better.

remapping the z axis to the y axis is not at all what i wanted to do, but it was my only option to get rid of the verical scrolling without sacrificing the touchpad tap performance. 

heres a couple threads to check out.
http://forums.freebsd.org/showthread.php?t=8531
http://forums.freebsd.org/showthread.php?t=1617


----------

