# emerge x11-drivers/synaptics failed

## durand101

Hi,

I'm trying to get my touchpad working properly (scrolling, 3rd button emulation and faster movement) so from the gentoo wiki (http://en.gentoo-wiki.com/wiki/Synaptics_Touchpad) I'm supposed to run 

```
emerge -1 x11-drivers/synaptics
```

. However, this gives me a weird error and I have no idea how to fix it  :Sad: 

 *Quote:*   

> 
> 
> In file included from /usr/include/xorg/misc.h:108,
> 
>                  from synaptics.c:64:
> ...

 

I found a bug report that seems related to this bug and it was apparently solved but I'm not really sure what the solution is: https://bugs.gentoo.org/229919

Does anyone have any ideas what it means?

Thanks!

----------

## Will Scarlet

There are updated instructions here.  Also, after you add synaptics to INPUT_DEVICES in your make.conf, run:

```
emerge -NuDav world
```

The command should re-emerge xorg-server with the synaptics use flag and also pull in the proper driver if you use portage.  If you use something else, run its equivalent command.

Hope this helps...   :Wink: 

----------

## durand101

Ahh, thanks a lot! I'll try that and get back to you.

----------

## durand101

Hi,

I did what you suggested and I think I'm getting close but I get this error:

```
durand@Copernicium ~> synclient -l

Can't access shared memory area. SHMConfig disabled?

```

It seems that the fdi stuff isn't working and the guide suggests not to use xorg to add the SHMConfig line. Any ideas?

Thanks!

----------

## Will Scarlet

Setup, I find, is a little tricky with the new way.  Anyway, here is the file for my laptop:

```
<?xml version="1.0" encoding="ISO-8859-1"?>

<deviceinfo version="0.2">

   <device>

      <match key="info.capabilities" contains="input.touchpad">

    <merge key="input.x11_driver" type="string">synaptics</merge>

    <!-- Switch on shared memory, enables the driver to be configured at runtime -->

    <merge key="input.x11_options.SHMConfig" type="string">true</merge>

    

    <!-- Maximum movement of the finger for detecting a tap -->

    <merge key="input.x11_options.MaxTapMove" type="string">2000</merge>

    

    <!-- Enable vertical scrolling when dragging along the right edge -->

    <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>

    

    <!-- Enable horizontal scrolling when dragging with two fingers anywhere on the touchpad -->

    <merge key="input.x11_options.HorizEdgeScroll" type="string">true</merge>

    

    <!-- Coasting threshold scrolling speed -->

    <merge key="input.x11_options.CoastingSpeed" type="string">50</merge>

    

    <!-- Enable edge scrolling to continue while the finger stays in an edge corner --> 

    <merge key="input.x11_options.CornerCoasting" type="string">true</merge>

    <!-- Which mouse button is reported on a non-corner one-finger tap -->

    <merge key="input.x11_options.TapButton1" type="string">1</merge>

    <!-- Which mouse button is reported on a non-corner two-finger tap -->

    <merge key="input.x11_options.TapButton2" type="string">2</merge>

    <!-- Which mouse button is reported on a non-corner three-finger tap -->

    <merge key="input.x11_options.TapButton3" type="string">3</merge>

    

    <!-- Disable vertical scrolling when dragging with two fingers anywhere on the touchpad -->

    <merge key="input.x11_options.VertTwoFingerScroll" type="string">false</merge>

      </match>

   </device>

</deviceinfo>
```

This works perfectly for me and I left the comments in so that I would remember what they do.

Also check out the man for synaptics.  In it will list the options that are available to the driver.

I also have the syndaemon client running at startup.  The only reason that I run it is so that the touch pad is disable while I'm typing.  I just run "syndaemon -d" and take the default 2 second idle time.  Check out the man for syndaemon for more options.

Be sure to restart hald once you have your file setup and after any changes you make.  If you don't, the initial setup/changes will not be recognized.

Hope this helps...   :Wink: 

----------

## durand101

Uh well, the problem was that I wasn't using hal when I thought I was. When I did add hal to the use flags, I managed to totally mess up gentoo because now, I can't use my mouse, keyboard or touchpad in X and X is automatically loaded  :Sad: . I'm trying to fix it by chrooting from ubuntu but I'm not entirely sure what to do.

----------

## durand101

Okay, I got hal and everything to work. Turns out that I needed to emerge the evdev driver. Synclient doesnt give me any error however Horizontal, vertical and circular scrolling don't work.. Any ideas?

Thanks!

----------

## Will Scarlet

It's all according how you want them to work.  My file that I posted works with horizontal and vertical scrolling (my hardware has horizontal/vertical scroll bars mapped out) without issue.  I've never used circular scrolling.

Using synclient you should be able to enable/disable any setting that is available.  synclient -h should show you what it detects for your hardware.  Look into the man for synclient for more options on how to use.

Once you have it set up to your liking (making sure you copy down what changes you made), make the setting permanent in the fdi file.

Hope this helps...   :Wink: 

----------

## durand101

 *Quote:*   

> durand@Copernicium ~> synclient -h
> 
> Hardware properties:
> 
>     Can't detect hardware properties.
> ...

 

I'm also trying to get evdev to set the correct keyboard layout (dvorak uk) and this is all so confusing!

Thanks for all your help!

----------

## VoidMage

As repeated in some of hal/evdev threads, dvorak is a variant,

not a layout (as given by /usr/share/X11/xkb/rules/evdev.lst).

For 1.5 server, SHMConfig is required for synclient,

1.6 works without it.

----------

## durand101

I did set it up as a variant in an fdi file but I may not have done it correctly.. This is what I have in /etc/hal/fdi/policy/10-x11-input.fdi:

 *Quote:*   

> <deviceinfo version="0.2">
> 
> <device>
> 
> <!-- FIXME: Support tablets too. -->
> ...

 

I'm not sure what I'm doing wrong :S

----------

## Will Scarlet

I wouldn't put everything in one file (I don't know if your even allowed to).  I would separate each device into its own file that way there is no confusion.  This also has the side benefit that if you get one working, that is one less setup to worry about.  So, work on one setup at a time.

As for keyboard setup set see this post 5789363 from this topic 766367.  There is some useful information there.

Also, you might try searching the forums to see other examples.  You might just find the file setup you need.

Hope this helps...   :Wink: 

----------

## durand101

Thanks, I got my keyboard working perfectly now! For some reason, gsynaptics isn't really setting scrolling correctly. When I changed the LeftEdge and RightEdge to 10 with synclient, the whole touchpad could only be used for scrolling :S

----------

## Will Scarlet

I'm not one much for gsynaptics.  I'd rather not have another piece of software running since I can set everything I need in the fdi file.  And after a little research, I discovered it will be obsoleted in favor of  GPointing Device Settings.  GPointing Device Settings is not in portage yet, but should be some day...

Anyway, I wouldn't change what is detected for the edges.  And, if your interested, after a little playing around I found that "synclient -l" lists the options that are currently set.  That should get you started to tweak your settings with synclient.  For the rest of the options that you may want do "man synaptics".

Hope this helps...   :Wink: 

----------

## durand101

Well, I used synclient -l to list the options I need to change. The options there look sane enough but it's not working right. I might see what ubuntu's synclient output is and copy that.

----------

## Will Scarlet

That's a good idea.  Hopefully it will work.

Since you only have to tweak you synaptics driver to your liking, might I suggest you add [solved] to the initial post's subject line as your original issue has been resolved.

----------

