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

Bug#564211: xserver-xorg-input-synaptics: Lost tapping after upgrading to 1.2.1-1



Julien Cristau <jcristau@debian.org> writes:
> On Fri, Jan  8, 2010 at 13:59:50 +0100, Bjørn Mork wrote:
>
>> Just did an upgrade:
>> 2010-01-08 11:04:22 upgrade xserver-xorg-input-synaptics 1.2.0-2 1.2.1-1
>> 
>> and lost tapping in the process.  The buttons still work, but I'm kind
>> of accustomed to use tapping for most of my clicking activities.
>> 
>> Any advice on where to look is appreciated.  
>> 
> How did you configure tapping?

I used a hal fdi file as per the previous recommendations.  Which I see
still are in the docs. This needs to be fixed and some note about udev
rules should be added to NEWS.

Right after sending the bug report, I realized that this is just another
example of the hal => udev transition biting users.  Could we please try
to make this transition as seemless as possible, attempting to keep any
prior configuration if possible?

I hacked up this, which probably can't be used directly, but should work
as an example of how to migrate configuration from hal to udev.  It will
write a new udev rule file, which could be saved as
/etc/udev/rules.d/66-xorg-synaptics.rules to override the system default:


#!/usr/bin/perl

use strict;
use warnings;
use Net::DBus;

# hardcoded filename
my $baserule = '/lib/udev/rules.d/66-xorg-synaptics.rules';

# regex telling us after which statement we'd like to insert the options
my $optionsplit = qr/^ENV\{x11_driver\}/;

# read the system rule file
open(F, $baserule) || die "Cannot open $baserule: $!\n";
my @before;
my @after;
my $ra = \@before;
while (<F>) {
    push(@$ra, $_);
    $ra = \@after if /$optionsplit/;
}
close(F);

# connect to system bus
my $bus = Net::DBus->system;

# Get a handle to the HAL service
my $hal = $bus->get_service("org.freedesktop.Hal");

# Get the device manager
my $manager = $hal->get_object("/org/freedesktop/Hal/Manager", "org.freedesktop.Hal.Manager");

my @migrated;
# Get a list of all touchpads
foreach my $dev (@{$manager->FindDeviceByCapability("input.touchpad")}) {
    my $tp = $hal->get_object($dev, "org.freedesktop.Hal.Device");
    my $props = $tp->GetAllProperties();

    if (my @opts = grep { s/^input\.x11_options\.// } keys %$props) {
	warn "Migrating device specific x11_options ", join(',', @opts)," for $props->{'info.product'}\n";
	push(@migrated, "ATTRS{name}==\"$props->{'info.product'}\", \\\n");
	push(@migrated, join(", \\\n", map { "  ENV\{x11_options.$_\}=\"". $props->{"input.x11_options.$_"} .'"' } @opts));
	push(@migrated,  "\n\n");
    }
}

if (@migrated) {
    print @before;
    print "\n# automatically added based on hal:\n";
    print @migrated;
    print @after;
} else {
    warn "No touchpad with x11_options found in hal - private udev rule unnecessary\n";
}



Bjørn



Reply to: