Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

[EXAMPLE] Configuring xorg without hal

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


w41ter at gmail

Dec 27, 2010, 6:03 AM

Post #1 of 3 (3558 views)
Permalink
[EXAMPLE] Configuring xorg without hal

I just fumbled my way through converting my old hal mouse configuration
to the "new" way of putting it back in xorg.conf (where it belongs :)

Peter Hutterer gave me a link to his blog, which was very helpful:

http://who-t.blogspot.com/2010/01/new-configuration-world-order.html

Turns out that the xorg-server-1.9.x defaults work okay with my cheap
M$ optical wheel-mouse, but not with my expensive trackball mouse without
a wheel.

When hal first came along I added a custom .fdi file for the trackball
by adapting the settings I formerly put in the InputDevice section in
my old xorg.conf (where it should have stayed).

Now that hal has gone, I've adapted the hal settings, with help from
Peter's blog, back to xorg.conf but with some important adjustments.

Here is my original (pre-hal) mouse config from xorg.conf:

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse" <----- note the old driver
Option "Protocol" "auto" <--- this is now redundant
Option "Device" "/dev/input/mice" <--- now redundant
Option "Emulate3Buttons"
Option "EmulateWheel" <----- because I have no wheel
Option "EmulateWheelButton" "8" <---- new default is "4"
EndSection

My new (post-hal) version:

Section "InputClass" <----- note the new word "Class", not "Device"
Identifier "trackball" <----- can be anything you want
MatchProduct "ImExPS" <-----*new*. Matches the product name!
# Driver "evdev" <--- this is redundant so I removed it.
Option "AutoServerLayout" "on" <--- see Peter's blog
Option "Emulate3Buttons" "on"
Option "EmulateWheel" "on"
Option "EmulateWheelButton" "8" <--- change the default
EndSection

If you have no InputDevice sections (many people no longer need them)
then "evdev" will automatically discover and configure your keyboard
and mouse without being asked, applying the xorg-server defaults.
(That's why I deleted the Driver "evedev" from my config.)

Only if the defaults are wrong for your machine do you need to change
them using the stuff I outlined above.

At first I tried using the old "mouse" driver in the old way, but it
seems to fight with "evdev" over who's in charge and between the two
of them I got error messages galore and the mouse didn't work right.

The nice thing about the new "InputClass" thing is that you can have
as many such sections as you want, each one being specific for an
individual mouse or keyboard -- note the "MatchProduct" keyword
picks out my trackball mouse specifically and doesn't prevent me from
using my simpler wheelmouse if I want to, where the default settings
would 'just work'.

Enough for now.


w41ter at gmail

Dec 27, 2010, 3:52 PM

Post #2 of 3 (3425 views)
Permalink
Re: [EXAMPLE] Configuring xorg without hal [In reply to]

On 12/27/2010 06:03 AM, walt wrote:
> ...
> My new (post-hal) mouse config:
>
> Section "InputClass" <----- note the new word "Class", not "Device"
> Identifier "trackball" <----- can be anything you want
> MatchProduct "ImExPS" <-----*new*. Matches the product name!

Clarification about that MatchProduct keyword:

Hal and udev differ slightly in the way they identify hardware devices
(is anyone surprised?).

When I run 'lshal' to display all my hardware, I see this about the mouse:

info.product = 'ImExPS/2 Logitech Explorer Mouse'

Now for the confusion. When I run 'udevadm info --export-db" I see:

E: PRODUCT=11/2/6/6d
E: NAME="ImExPS/2 Logitech Explorer Mouse"

Note that MatchProduct in the xorg.conf file really wants the udev NAME,
*not* the udev PRODUCT.

I suppose the MatchProduct keyword was selected back in the day when
hal was still the boss instead of a has-been. "MatchName" would be much
less confusing than "MatchProduct". But don't hold your breath waiting
for it to change.


bill.longman at gmail

Dec 28, 2010, 6:09 AM

Post #3 of 3 (3416 views)
Permalink
Re: Re: [EXAMPLE] Configuring xorg without hal [In reply to]

On 12/27/2010 03:52 PM, walt wrote:
> On 12/27/2010 06:03 AM, walt wrote:
>> ...
>> My new (post-hal) mouse config:
>>
>> Section "InputClass" <----- note the new word "Class", not "Device"
>> Identifier "trackball" <----- can be anything you want
>> MatchProduct "ImExPS" <-----*new*. Matches the product name!
>
> Clarification about that MatchProduct keyword:
>
> Hal and udev differ slightly in the way they identify hardware devices
> (is anyone surprised?).
>
> When I run 'lshal' to display all my hardware, I see this about the mouse:
>
> info.product = 'ImExPS/2 Logitech Explorer Mouse'
>
> Now for the confusion. When I run 'udevadm info --export-db" I see:
>
> E: PRODUCT=11/2/6/6d
> E: NAME="ImExPS/2 Logitech Explorer Mouse"
>
> Note that MatchProduct in the xorg.conf file really wants the udev NAME,
> *not* the udev PRODUCT.
>
> I suppose the MatchProduct keyword was selected back in the day when
> hal was still the boss instead of a has-been. "MatchName" would be much
> less confusing than "MatchProduct". But don't hold your breath waiting
> for it to change.

Thanks, Walt, this is great. It's good to see the potholes in the road
before the wheel gets in them. These are the kinds of tidbits of
information that you really want to find when you are looking for them
once you're *in* the pothole, but keeping up with the list and with
input from the great people here, it makes the ride much less bumpy.

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.