[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Synaptic touchpad, xorg and hal, and resuming



Hello,

Latest update on Sid brings hal support to xorg.

This means that your touchpad's configuration, that you have been
patiently setting up for hours  in /etc/X11/xorg.conf is no longer taken
into account.

You have 2 possibilities:

1 - Disable hal support by adding the following section
in /etc/X11/xorg.conf:


Section "ServerFlags"
   Option "AutoAddDevices" "False"
EndSection

2 - Export your xorg configuration in hal .fdi file format.

Create a file like /etc/hal/fdi/policy/apple.fdi with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>

    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_driver" type="string">evdev</merge>
    </match>

    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="appletouch">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SHMConfig" type="string">true</merge>
        <merge key="input.x11_options.LeftEdge" type="string">0</merge>
        <merge key="input.x11_options.RightEdge" type="string">900</merge>
        <merge key="input.x11_options.TopEdge" type="string">10</merge>

	<!-- as you can see, it is pretty easy to convert an xorg.conf appletouch option to an xml one. -->
      </match>
    </match>
  </device>

<!-- You can add a section for your keyboard configuration too: -->
  <device>
    <match key="info.capabilities" contains="input.keys">
      <merge key="input.x11_driver" type="string">evdev</merge>
      <merge key="input.x11_options.XkbRules" type="string">xorg</merge>
      <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
      <merge key="input.x11_options.XkbLayout" type="string">fr</merge>
      <merge key="input.x11_options.XkbVariant" type="string">mac</merge>
      <merge key="input.x11_options.XkbOptions" type="strlist">lv3:lwin_switch</merge>
      <append key="input.x11_options.XkbOptions" type="strlist">compose:rwin</append>
    </match>
  </device>
</deviceinfo>

You will have to restart hal service and your x session to take this new configuration into account.


There remains one problem: Configuration is lost when laptop resume from suspend-to-ram.

I have to unload / reload appletouch and ohci-hcd modules to simulate an unplug / replug
and to get my configuration back.

So i have set up the following script in /etc/power/event.d/appletouch:

#! /bin/sh
case "$1" in
  resume)
     /sbin/modprobe -r ohci_hcd
     /sbin/modprobe -r appletouch
     /sbin/modprobe  appletouch
     /sbin/modprobe  ohci_hcd
  ;;
esac

but maybe there is a better fix ?

Hoping this will helps, 

Regards


-- 
Thomas Constans
06 23 37 87 85
www.opendoor.fr


Reply to: