# [SOLVED] 3rd mouse button/scroll wheel not seen by hal

## davidm

On my Sony Vaio Laptop I have a touchpad, two mouse buttons right under the touchpad, and then further down a scroll wheel/3rd mouse button combo (you push down on the scroll wheel and it clicks).  There is also a back button which ironically works perfectly as crazy as this is.

I believe the scroll/mouse button combo is often called a jog dial.  Here is a picture of what it looks like:

http://www.hardwarezone.com/img/data/articles/2002/507/JogDial.gif

The problem is that the scroll wheel/3rd (middle) mouse button is not working at all.  I am able to use the middle mouse buttom only by making use of the emulation by hitting both left and right buttons at once.  I have no xorg.conf and am instead using Hal policies.

How can I get this working?

Here are the hal policies:

```

gentoo_sony policy # ls -l

total 12

-rw-r--r-- 1 root root  795 May  4 20:57 10-input-policy.fdi

-rw-r--r-- 1 root root 1719 May  4 20:58 10-x11-input.fdi

-rw-r--r-- 1 root root 1355 May  4 23:29 11-x11-synaptics.fdi

```

(all of these are just the stock policies copied over from the default hal policies and they otherwise work fine)

In kernel .config:

```

CONFIG_SONYPI="y"

```

I would like to avoid having a xorg.conf file if at all possible and continue using hal or udev but am prepared to use one if there is no other way. 

Any hints or pointers to good documentation? 

Thank you!Last edited by davidm on Fri May 07, 2010 11:22 pm; edited 1 time in total

----------

## davidm

I just tried turning off CONFIG_SONYPI and utilizing SONY_LAPTOP in the kernel thinking there may be a conflict but the results are the same.  I'm thinking that there is something I need to do with hal?

----------

## VoidMage

Does 'xinput test' run on the touchpad give any hints ?

----------

## davidm

Thanks for the reply.  :Smile: 

Here is what I get from 'xinput --list' (to show devices) :

```

gentoo_sony ~ # xinput --list --long

â¡ Virtual core pointer                        id=2    [master pointer  (3)]

        Reporting 3 classes:

                Class originated from: 8

                Buttons supported: 12

                Button labels: Button Left Button Middle Button Right Button Whe                                                                                      

el Up Button Wheel Down Button Horiz Wheel Left Button Horiz Wheel Right None No                                                                                      

ne None None None

                Button state:

                Class originated from: 8

                Detail for Valuator 0:

                  Label: Rel X

                  Range: 1472.000000 - 5472.000000

                  Resolution: 0 units/m

                  Mode: relative

                Class originated from: 8

                Detail for Valuator 1:

                  Label: Rel Y

                  Range: 1408.000000 - 4448.000000

                  Resolution: 0 units/m

                  Mode: relative

â   â³ Virtual core XTEST pointer                    id=4    [slave  pointer                                                                                       

 (2)]

        Reporting 3 classes:

                Class originated from: 4

                Buttons supported: 10

                Button labels: Button Left Button Middle Button Right Button Whe                                                                                      

el Up Button Wheel Down Button Horiz Wheel Left Button Horiz Wheel Right None No                                                                                      

ne None

                Button state:

                Class originated from: 4

                Detail for Valuator 0:

                  Label: Rel X

                  Range: -1.000000 - -1.000000

                  Resolution: 0 units/m

                  Mode: relative

                Class originated from: 4

                Detail for Valuator 1:

                  Label: Rel Y

                  Range: -1.000000 - -1.000000

                  Resolution: 0 units/m

                  Mode: relative

â   â³ Macintosh mouse button emulation              id=7    [slave  pointer                                                                                       

 (2)]

        Reporting 3 classes:

                Class originated from: 7

                Buttons supported: 5

                Button labels: Button Left Button Middle Button Right Button Whe                                                                                      

el Up Button Wheel Down

                Button state:

                Class originated from: 7   Detail for Valuator 0:

                  Label: Rel X

                  Range: -1.000000 - -1.000000

                  Resolution: 1 units/m

                  Mode: relative

                Class originated from: 7

                Detail for Valuator 1:

                  Label: Rel Y

                  Range: -1.000000 - -1.000000

                  Resolution: 1 units/m

                  Mode: relative

â   â³ SynPS/2 Synaptics TouchPad                    id=8    [slave  pointer  (2)]

        Reporting 3 classes:

                Class originated from: 8

                Buttons supported: 12

                Button labels: Button Left Button Middle Button Right Button Wheel Up Button Wheel Down Button Horiz Wheel Left Button Horiz Wheel Right None None None None None

                Button state:

                Class originated from: 8

                Detail for Valuator 0:

                  Label: Rel X

                  Range: 1472.000000 - 5472.000000

                  Resolution: 0 units/m

                  Mode: relative

                Class originated from: 8

                Detail for Valuator 1:

                  Label: Rel Y

                  Range: 1408.000000 - 4448.000000

                  Resolution: 0 units/m

                  Mode: relative

â£ Virtual core keyboard                       id=3    [master keyboard (2)]

        Reporting 1 classes:

                Class originated from: 9

                Keycodes supported: 248

    â³ Virtual core XTEST keyboard                     id=5    [slave  keyboard (3)]

        Reporting 1 classes:

                Class originated from: 5

                Keycodes supported: 248

    â³ Sony Vaio Keys                                  id=6    [slave  keyboard (3)]

        Reporting 1 classes:

                Class originated from: 6

                Keycodes supported: 248

    â³ AT Translated Set 2 keyboard                    id=9    [slave  keyboard (3)]

        Reporting 1 classes:

                Class originated from: 9

                Keycodes supported: 248

 â³ Power Button                                    id=10   [slave  keyboard (3)]

        Reporting 1 classes:

                Class originated from: 10

                Keycodes supported: 248

```

The output seems slightly garbled but I don't even see it listed unless I missed it?  But dmesg is showing it as /devices/virtual/input/input4 :

```

gentoo_sony ~ # dmesg | grep -i SONY

[    0.000000] Linux version 2.6.32-gentoo-r7 (root@gentoo_sony) (gcc version 4.3.4 (Gentoo 4.3.4 p1.1, pie-10.1.5) ) #4 SMP Wed May 5 21:37:18 EDT 2010

[    0.000000] ACPI: RSDT 1fefa631 00030 (v01   SONY       B1 20020910 PTL  00000000)

[    0.000000] ACPI: FACP 1fefee7d 00074 (v01   SONY       B1 20020910 PTL  01000000)

[    0.000000] ACPI: DSDT 1fefa661 0481C (v01   SONY       B1 20020910 PTL  0100000D)

[    0.000000] ACPI: BOOT 1fefeef1 00028 (v01   SONY       B1 20020910 PTL  00000001)

[    0.000000] ACPI: SSDT 1fefef19 000E7 (v01   SONY       B1 20020910 PTL  00000001)

[    0.806500] ata2.00: ATAPI: SONY CD-RW/DVD-ROM CRX810E, 1.5a, max UDMA/16

[    0.837302] scsi 1:0:0:0: CD-ROM            SONY     CD-RW  CRX810E   1.5a PQ: 0 ANSI: 5

[    1.627364] sony-laptop: Sony Programmable IO Control Driver v0.6.

[    1.627468] sony-laptop: detected Type2 model

[    1.628189] input: Sony Vaio Keys as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:0d/SNY6001:00/input/input3

[    1.628576] input: Sony Vaio Jogdial as /devices/virtual/input/input4

[    1.628903] sony-laptop: device allocated minor is 59

[    1.630469] sony-laptop: Sony Notebook Control Driver v0.6.

[    3.614743] usb 3-1: Manufacturer: Sony

[    8.620683] scsi 2:0:0:0: Direct-Access     Sony     MSC-U03          1.00 PQ: 0 ANSI: 0 CCS

```

```

gentoo_sony ~ # ls /sys/devices/platform/sony-laptop

bluetoothpower  brightness_default  driver  fanspeed  modalias  power  subsystem  uevent  wwanpower

```

I'm seeing some people speaking of a need to write acpi scripts to get some of the sony stuff working correctly... I'm considering switching over to stumpwm (based on ratpoison but written in Lisp) but it'd be nice to get this working for Firefox anyway.  I'll keep hacking at it but if anyone has any input I'd appreciate it.  :Smile: 

There's a good chance I'll find the answer ten minutes after posting this.  We'll see.  :Wink: 

----------

## davidm

SOLVED!

'emerge sonypid'

Then configure it to run on startup (perhaps in /etc/conf.d/local.start - actually this did not work for me.  I needed to put it in my Window Manager's startup file. YMMV) or start it manually.  I did not even need to reboot after starting 'sonypid', it just worked.  This is using "SONYPI" compiled into the kernel.  I'm not sure if it works with the newer "SONY_LAPTOP" (have yet to test) with or without the SONYPID compatibility setting (if that even still exists?).  Anyway happy to report that this is solved although it did take a bit longer than 10 minutes.  :Smile: 

Added thought: It probably is possible to get this working without using the userspace 'sonypid' daemon because it was setting up a device properly which I presume X could have used had I wanted to mess with creating an Xorg conf.

Good information source: http://www.linux.it/~malattia/wiki/index.php/Sony_drivers

----------

