HOW TO: Two finger scrolling on Acer Aspire One

Discussion in 'Linux' started by mikespug, Feb 6, 2009.

  1. mikespug

    TheTilde

    Joined:
    Feb 16, 2009
    Messages:
    49
    Likes Received:
    0
    Hi
    If you succeed in compiling for linpus, let us know.
    Thanks
    TheTilde
     
    TheTilde, Feb 20, 2009
    #21
  2. mikespug

    Syco54645

    Joined:
    Aug 19, 2008
    Messages:
    48
    Likes Received:
    0
    Well as far as I know, the linux and windows machines use the same hardware for the touch pad. the windows ones definitely report when more than one finger is on it. It leads me to believe that the linux one can as well and the driver just need updated.
     
    Syco54645, Feb 20, 2009
    #22
  3. mikespug

    markgilmore1322

    Joined:
    Dec 27, 2008
    Messages:
    6
    Likes Received:
    0
    This is AWESOME -- thank you so much!
     
    markgilmore1322, Feb 21, 2009
    #23
  4. mikespug

    djreastman

    Joined:
    Feb 17, 2009
    Messages:
    10
    Likes Received:
    0
    Works great. Cheers.
     
    djreastman, Feb 23, 2009
    #24
  5. mikespug

    Hagbard

    Joined:
    Feb 27, 2009
    Messages:
    4
    Likes Received:
    0
    First of all thanks for this patch. It works great for me, except the issue with the "ghost fingers". After using two fingers to scroll, it continues scrolling even if I lift my fingers and hover with the two fingers over the pad. I watched the values in synclient and they seem correct. The Z value decreases when I lift my fingers, but it still scrolls.
    Adjusting the sensitivity didn't work out for me, I had to set it so low to fix this issue, that I could hardly use my trackpad.

    I think, that it could be an issue with the driver. I would like to help solving this problem. Would you mind sending me the source code, so that I can have a look at it?
     
    Hagbard, Feb 27, 2009
    #25
  6. mikespug

    Hagbard

    Joined:
    Feb 27, 2009
    Messages:
    4
    Likes Received:
    0
    Ok, I made my own version and found the problem with the ghost fingers and fixed it. Additionally I added emulation for three fingers. So you can middle-click and right-click with two and three fingers.

    Since Intrepid the settings are managed through HAL. So you have to configure it by adding a fdi file in

    Code:
    /etc/hal/fdi/policy
    I called it
    Code:
    /etc/hal/fdi/policy/11-synaptic-options.fdi 
    Insert the following lines:
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
    <device>
    <match key="input.x11_driver" contains="synaptics">
    	<merge key="input.x11_options.SHMConfig" type="string">On</merge>
    	<merge key="input.x11_options.EmulateTwoFingerMinW" type="string">7</merge>
    	<merge key="input.x11_options.EmulateThreeFingerMinW" type="string">13</merge>
    	<merge key="input.x11_options.VertEdgeScroll" type="string">0</merge>
    	<merge key="input.x11_options.VertTwoFingerScroll" type="string">1</merge>
    	<merge key="input.x11_options.HorizTwoFingerScroll" type="string">1</merge>
    	<merge key="input.x11_options.FingerLow" type="string">30</merge>
    	<merge key="input.x11_options.FingerHigh" type="string">40</merge>
    </match>
    </device>
    </deviceinfo>
    
    You can find the .deb package attached. Use it like in the first post. (Rename it to .deb and install it.)

    Here's the patch:
    Code:
    --- orig/xfree86-driver-synaptics-0.15.2/include/synaptics.h	2008-09-03 19:02:28.000000000 +0200
    +++ xfree86-driver-synaptics-0.15.2/include/synaptics.h	2009-03-07 18:35:01.000000000 +0100
    @@ -88,6 +88,8 @@ typedef struct _SynapticsSHM
         int emulate_mid_button_time;	    /* Max time between left and right button presses to
     					       emulate a middle button press. */
         int emulate_twofinger_z;		    /* pressure threshold to emulate two finger touch (for Alps) */
    +    int emulate_twofinger_width;		    /* width threshold to emulate two finger touch (for Synaptics) */
    +    int emulate_threefinger_width;		    /* width threshold to emulate two finger touch (for Synaptics) */
         int scroll_dist_vert;		    /* Scrolling distance in absolute coordinates */
         int scroll_dist_horiz;		    /* Scrolling distance in absolute coordinates */
         Bool scroll_edge_vert;		    /* Enable/disable vertical scrolling on right edge */
    
    --- orig/xfree86-driver-synaptics-0.15.2/src/synaptics.c	2009-03-07 21:19:06.000000000 +0100
    +++ xfree86-driver-synaptics-0.15.2/src/synaptics.c	2009-03-07 21:34:27.000000000 +0100
    @@ -445,6 +445,8 @@ SynapticsPreInit(InputDriverPtr drv, IDe
         pars->fast_taps = xf86SetIntOption(opts, "FastTaps", FALSE);
         pars->emulate_mid_button_time = xf86SetIntOption(opts, "EmulateMidButtonTime", 75);
         pars->emulate_twofinger_z = xf86SetIntOption(opts, "EmulateTwoFingerMinZ", 257);
    +    pars->emulate_twofinger_width = xf86SetIntOption(opts, "EmulateTwoFingerMinW",257);
    +    pars->emulate_threefinger_width = xf86SetIntOption(opts, "EmulateThreeFingerMinW",257);
         pars->scroll_dist_vert = xf86SetIntOption(opts, "VertScrollDelta", horizScrollDelta);
         pars->scroll_dist_horiz = xf86SetIntOption(opts, "HorizScrollDelta", vertScrollDelta);
         pars->scroll_edge_vert = xf86SetBoolOption(opts, "VertEdgeScroll", TRUE);
    @@ -1612,7 +1614,7 @@ HandleScrolling(SynapticsPrivate *priv, 
     	    priv->circ_scroll_on = FALSE;
     	}
     
    -	if (hw->numFingers < 2) {
    +	if (hw->numFingers < 2 || !finger) {
     	    if (priv->vert_scroll_twofinger_on) {
     		DBG(7, ErrorF("vert two-finger scroll off\n"));
     		priv->vert_scroll_twofinger_on = FALSE;
    @@ -1865,7 +1867,20 @@ HandleState(LocalDevicePtr local, struct
     	hw->middle |= hw->guest_mid;
     	hw->right |= hw->guest_right;
         }
    -
    +    
    +    /* Two and Three finger emulation */
    +    if (hw->z >= para->emulate_twofinger_z && hw->numFingers == 1) {
    +	hw->numFingers = 2;
    +    }
    +    
    +    if (hw->fingerWidth >= para->emulate_twofinger_width && hw->numFingers == 1) {
    +	hw->numFingers = 2;
    +	}
    +	
    +    if (hw->fingerWidth >= para->emulate_threefinger_width && hw->numFingers == 2) {
    +	hw->numFingers = 3;
    +    }
    +    
         /* 3rd button emulation */
         hw->middle |= HandleMidButtonEmulation(priv, hw, &delay);
     
    @@ -1874,11 +1889,6 @@ HandleState(LocalDevicePtr local, struct
             HandleClickWithFingers(para, hw);
         }
     
    -    /* Two finger emulation */
    -    if (hw->z >= para->emulate_twofinger_z && hw->numFingers == 1) {
    -	hw->numFingers = 2;
    -    }
    -
         /* Up/Down button scrolling or middle/double click */
         double_click = FALSE;
         if (!para->updown_button_scrolling) {
    
    Have fun.
     
    Hagbard, Mar 7, 2009
    #26
  7. mikespug

    markgilmore1322

    Joined:
    Dec 27, 2008
    Messages:
    6
    Likes Received:
    0
    Hi Hagbard, the scrolling is very smooth now, thank you. However, the double click and middle click is not working with 2 and 3 fingers. Is there something else I need to do besides adding the .fdi file? Thanks.
     
    markgilmore1322, Mar 8, 2009
    #27
  8. mikespug

    Hagbard

    Joined:
    Feb 27, 2009
    Messages:
    4
    Likes Received:
    0
    I forgot to mention that after changing the .fdi file you have to restart HAL (by rebooting or by runnning /etc/init.d/hal restart) before restarting the X server.

    Check in /var/log/Xorg.0.log if all options are set correctly (search for Synaptics). It should look like this:

    Code:
    (II) config/hal: Adding input device SynPS/2 Synaptics TouchPad
    (II) LoadModule: "synaptics"
    
    (II) Loading /usr/lib/xorg/modules/input//synaptics_drv.so
    (II) Module synaptics: vendor="X.Org Foundation"
            compiled for 1.5.2, module version = 0.15.2
            Module class: X.Org XInput Driver
            ABI class: X.Org XInput driver, version 2.1
    (II) Synaptics touchpad driver version 0.15.2
    (II) SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
    (II) SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
    (**) Option "Device" "/dev/input/event6"
    (**) Option "SHMConfig" "0"
    (**) Option "FingerLow" "30"
    (**) Option "FingerHigh" "40"
    (**) Option "EmulateTwoFingerMinW" "7"
    (**) Option "EmulateThreeFingerMinW" "13"
    (**) Option "VertEdgeScroll" "0"
    (**) Option "VertTwoFingerScroll" "1"
    (**) Option "HorizTwoFingerScroll" "1"
    (--) SynPS/2 Synaptics TouchPad touchpad found
    (**) SynPS/2 Synaptics TouchPad: always reports core events
    (II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD)
    (II) SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
    (II) SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
    (--) SynPS/2 Synaptics TouchPad touchpad found
    
    If this is correct, you can change the parameters for tapping by adding these two lines in the .fdi file:
    Code:
     <merge key="input.x11_options.MaxTapMove" type="string">220</merge>
     <merge key="input.x11_options.MaxTapTime" type="string">180</merge>
    
    MaxTapMove is the distance your fingers may move when tapping. Default is 220. Set it higher if you have problems with tapping. Try 300.
    MaxTapTime is the the max time for your finger on the pad, when tapping. Default is 180. You can set it a bit higher, if you want, but first try changing MaxTapMove.

    I think the problem with multi finger tapping, is that the fingers move more than when tapping with one finger. So increasing MaxTapMove should help.

    After changing the parameters restart HAL and the your X Server (or reboot). I hope it works now.
    And by the way: Two fingers is middle click and three fingers is right click, not double click.
     
    Hagbard, Mar 8, 2009
    #28
  9. mikespug

    maxn

    Joined:
    Sep 25, 2008
    Messages:
    8
    Likes Received:
    0
    Yea, thanks hagbard, awesome scrolling now!

    Just if i dapp with three finger it doesn't make a right click, it does "paste" if something is in the copied in the clipboad.

    So i did the edit described on Page1 before, should i remove the changes in /etc/x11/xorg.conf ?
     
    maxn, Mar 10, 2009
    #29
  10. mikespug

    Hagbard

    Joined:
    Feb 27, 2009
    Messages:
    4
    Likes Received:
    0
    That's a middle click then. It should paste the text you highlighted last.
    Does it make a right click with two fingers? Could be that it's swapped on your (or on my) system. I think there is an option for changing this. Just can't remember it at the moment.

    Look at the output of synclient to get the right thresholds for two and three fingers, if you're still having problems

    You can remove the changes in /etc/X11/xorg.conf, if you're using Intrepid (8.10) or newer. But you don't have to. They're ignored anyway. Just make sure that the right options are set (look in the log file).
     
    Hagbard, Mar 10, 2009
    #30
  11. mikespug

    maxn

    Joined:
    Sep 25, 2008
    Messages:
    8
    Likes Received:
    0
    No, both 2finger and 3finger make a middle click.

    My var/log/Xorg.0.log looks different:

    Code:
    (II) Synaptics touchpad driver version 0.15.2
    (--) Synaptics Touchpad auto-dev sets device to /dev/input/event10
    (II) Synaptics Touchpad: x-axis range 1472 - 5472
    (II) Synaptics Touchpad: y-axis range 1408 - 4448
    (**) Option "Device" "/dev/input/event10"
    (**) Option "SHMConfig" "true"
    (**) Option "EmulateTwoFingerMinW" "7"
    (**) Option "HorizEdgeScroll" "0"
    (**) Option "VertTwoFingerScroll" "1"
    (--) Synaptics Touchpad touchpad found
    (**) Option "SendCoreEvents" "true"
    (**) Option "CorePointer"
    (**) Synaptics Touchpad: always reports core events
    Only some 2finger-options are used from the .fdi file...
     
    maxn, Mar 11, 2009
    #31
  12. mikespug

    jeffyeh

    Joined:
    Sep 11, 2008
    Messages:
    41
    Likes Received:
    0
    Thanks for the fix! Works like a charm now!

    I haven't tried multifinger tapping yet, hopefully I'll get to it this weekend.
     
    jeffyeh, Mar 13, 2009
    #32
  13. mikespug

    crimsondynamo329

    Joined:
    Mar 21, 2009
    Messages:
    10
    Likes Received:
    0
    Does anybody know how to get this working on a Jaunty-based distribution? I am using Kuki RC 1.6. When I try to install either deb file, there is an error about downgrading a package. Which makes sense because I assume these were made for Hardy or Intrepid.
     
    crimsondynamo329, Apr 6, 2009
    #33
  14. mikespug

    tiprya

    Joined:
    Mar 10, 2009
    Messages:
    9
    Likes Received:
    0
    Yeah, would love a package that works in Jaunty.

    Cheers
     
    tiprya, Apr 8, 2009
    #34
  15. mikespug

    Sarvatt

    Joined:
    Oct 26, 2008
    Messages:
    77
    Likes Received:
    0
    for jaunty or xorg >1.6-
    https://launchpad.net/~wgrant/+archive/ppa -1.1.0
    or
    https://launchpad.net/~sarvatt/+archive/ppa 1.1.99 -- untested! I just built it to try so only grab if you're feeling frisky :)

    grab one of those and do a man synaptics, its included and works similar.

    for hal -
    Option "EmulateTwoFingerMinW" "integer"

    or for synclient -
    Synaptics Two-Finger Scrolling
    8 bit (BOOL), 2 values, vertical, horizontal.[/code]

    you can use the newer synclient included to monitor inputs and adjust values according to taste too.
     
    Sarvatt, Apr 8, 2009
    #35
  16. mikespug

    AK963

    Joined:
    Feb 21, 2009
    Messages:
    64
    Likes Received:
    0
    Location:
    London
    I installed i386 Synaptics deb (v1.1.0) that Sarvatt linked to, and it installed fine :)
    I then followed the 8.10 instructions for editing Xorg.conf, but after reboot two finger scroll just wasn't working.

    Here's my edited xorg.conf, any help would be greatly appreciated :D

    Code:
    Section "ServerLayout"
       Identifier    "Default Server Layout"
       Screen        "Default Screen"
       InputDevice   "Keyboard"      "Core Keyboard"
       InputDevice   "Synaptics Touchpad"   "Core Pointer"
    EndSection
    
    Section "Device"
    	Identifier	"Configured Video Device"
    EndSection
    
    Section "InputDevice"
       Identifier     "Synaptics Touchpad"
       Driver         "synaptics"
       Option         "SendCoreEvents"      "true"
       Option         "Device"            "/dev/psaux"
       Option         "Protocol"         "auto-dev"
       Option         "HorizEdgeScroll"      "0"
       Option         "SHMConfig"         "true"
       Option         "VertTwoFingerScroll"   "1"
       Option         "EmulateTwoFingerMinW"   "7"
    EndSection
    
    Section "InputDevice"
       Identifier   "Keyboard"
       Driver      "kbd"
    EndSection
    
    Section "Monitor"
    	Identifier	"Configured Monitor"
    EndSection
    
    Section "Screen"
    	Identifier	"Default Screen"
    	Monitor		"Configured Monitor"
    	Device		"Configured Video Device"
    	SubSection "Display"
    		Virtual	1152 1464
    	EndSubSection
    EndSection
    
    Section "ServerFlags"
    	Option	"DontZap"	"False"
    EndSection
     
    AK963, Apr 14, 2009
    #36
  17. mikespug

    Sarvatt

    Joined:
    Oct 26, 2008
    Messages:
    77
    Likes Received:
    0
    dont follow the 8.10 instructions, just do a man synaptics to see the new options because they have changed :D

    synclient VertTwoFingerScroll=1 was all I needed to get two finger scrolling working with 1.1.99 xserver.xorg.input.synaptics on my PPA. EmulateTwoFingerMinW is an option available in it if you need more tuning, they added that to the driver before 1.1.0. SHMConfig isn't needed anymore in jaunty with xserver-xorg-input-synaptics > 1.0.0.

    http://cgit.freedesktop.org/xorg/driver ... b6318c88af

    Edit: Forgot to mention, you'll probably need to get rid of gsynaptics as it's really outdated and not going to be updated. A new replacement is coming soon

    http://live.gnome.org/GPointingDeviceSettings

    synclient FingerLow=9 FingerHigh=12 is also needed to fix scrolling for me with every jaunty based package, the touchpad misreports pressure levels apparently.
     
    Sarvatt, Apr 14, 2009
    #37
  18. mikespug

    AK963

    Joined:
    Feb 21, 2009
    Messages:
    64
    Likes Received:
    0
    Location:
    London
    I replaced my xorg.conf with a backup I made before following the 8.10 instructions.

    I ran the synclient commands you said to use in the terminal, but after reboot it still isn't working >_<
    running 'man synaptics' shows "8 bit (BOOL), 2 values, vertical, horizontal." under two finger scrolling.

    Should I be adding them to xorg.conf or something?
     
    AK963, Apr 18, 2009
    #38
  19. mikespug

    annafil

    Joined:
    Aug 12, 2008
    Messages:
    327
    Likes Received:
    0
    Location:
    Malaysia
    am afraid i have the same problem as AK963...

    I've tried both packages (.99 and .00) on jaunty, leaving my xorg pretty much as it was before, and using synclient to enable disable options.

    i get the jumpy one finger scroll problem (for which i've applied the weak), but two finger after rebooting and trying to enable it with synclient is still a no-go.

    Are we maybe using different X builds?

    Is it possible to use the 8.10 patch on the jaunty synaptics source, or are those sections too different?
     
    annafil, Apr 24, 2009
    #39
  20. mikespug

    skewed

    Joined:
    Jan 7, 2009
    Messages:
    7
    Likes Received:
    0
    thanks to hagbard and eveyone that worked on this. i followed hagbards intructions and it seems to work pertty darn well. as someone else said- not as smooth as a mac but very useable. my xorg log didnt match but it still all works.

    nice! love not having to find that little sweet spot to scroll or accidentally scrolling. now i need to figure out some good uses for the middle click.

    btw- crunchbang (8.10.01 ubuntu) with 2.26.27-9 gen.

    cheers,
    ryan
     
    skewed, Apr 24, 2009
    #40
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.