LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-10-2013, 02:50 PM   #1
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
xorg.conf.d, evdev and Emulate3Buttons


Hi all, I'm struggling to get X to enable the Emulate3Buttons option with my work laptop, and the switch to multiple config files in xorg.conf.d is complicating things for me.

So, the laptop actually has 2 integrated pointing devices: a trackpoint with 3 buttons, and a touchpad with 2 buttons.

I generally use an external usb trackball that has 2 buttons.

I've had no problem getting this to work in the past, with a single xorg.conf file, but it looks like the file I created in xorg.conf.d isn't getting loaded. I have another file in there for my keyboard layout, which *does* get loaded, so there is some reason this file is being ignored.

It may be related to evdev, as apparently config for input devices is generally ignored if hotplugging is enabled.

Anyway, my Xorg.0.log is attached and relevant xorg.conf is pasted below. I've tried a few different things with the conf, this represents my most recent attempt. Any suggestions would be appreciated. I'm sick of having to reach over to the middle button on the laptop when I need to copy/paste from my terminal to my browser.

Thanks!

Code:
Section "InputDevice"
	Identifier  "Mice"
	Driver      "evdev"
	Option	    "Device" "/dev/input/mice"
    Option      "Emulate3Buttons" "True"
EndSection
Attached Files
File Type: log Xorg.0.log (45.6 KB, 17 views)
 
Old 10-10-2013, 03:00 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Hi mattca,

Please attach all your config files in next post and indicate their locations, to help understand what happens. Also, do they all end in .conf (even though you could have to use extension .txt to attach them)? This is mandatory.
 
Old 10-10-2013, 03:08 PM   #3
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Original Poster
Rep: Reputation: 56
Here they are. Note that I've never been able to get the synaptics stuff to work either, but gave up on it for now. The touchpad works in general, but scrolling via the right hand side doesn't.

/etc/X11/xorg.conf.d/20-mouse.conf
Code:
Section "InputDevice"
	Identifier  "Mice"
	Driver      "evdev"
	Option	    "Device" "/dev/input/mice"
    Option      "Emulate3Buttons" "True"
EndSection
/etc/X11/xorg.conf.d/50-synaptics.conf
Code:
# DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN ON UPGRADES
# Copy this file to /etc/X11/xorg.conf.d/ and edit the copy
#
# Use "synclient -l" to see all available options
# Use "man synaptics" for details about what the options do
#
Section "InputClass"
	Identifier "touchpad"
	Driver "synaptics"
	MatchDevicePath "/dev/input/event*"
	MatchIsTouchpad "on"
	Option "TapButton1" "1"
	Option "TapButton2" "2"
	Option "TapButton3" "3"
EndSection
/etc/X11/xorg.conf.d/90-keyboard-layout.conf
Code:
Section "InputClass"
	Identifier "keyboard-all"
	MatchIsKeyboard "on"
	MatchDevicePath "/dev/input/event*"
	Driver "evdev"
	Option "XkbLayout" "us"
	Option "XkbVariant" "dvp"
	Option "XkbOptions" "terminate:ctrl_alt_bksp,ctrl:nocaps"
EndSection

# READ THIS FOR CUSTOM KEYBOARD INFORMATION
#
#  If you want to add a custom model/layout/variant to X, you will need to COPY
#  this file to /etc/X11/xorg.conf.d/ and edit that copy.  After editing it to
#  suit, you will need to restart X.
#
#  Here's an example of the lines from above:
#
# Section "InputClass"
#	Identifier "keyboard-all"
#	MatchIsKeyboard "on"
#	MatchDevicePath "/dev/input/event*"
#	Driver "evdev"
#	Option "XkbLayout" "us"
#	Option "XkbVariant" "intl"
#	Option "XkbOptions" "compose:rwin,terminate:ctrl_alt_bksp"
# EndSection
#
#  Many desktop environments, including KDE and Xfce, have their own methods to
#  configure keyboard layouts and such if you'd like to use them.
#
#  If you prefer to use the "old" way of configuring keyboards (without input 
#  device hotplugging), then you'll need to add the following lines to the 
#  ServerFlags section of /etc/X11/xorg.conf:
#    Option   "AllowEmptyInput"     "false"
#    Option   "AutoAddDevices"      "false"
#    Option   "AutoEnableDevices"   "false"
#  Alternatively, you can break this up into separate "stubs" in the xorg.conf.d/
#  directory, but that's your call.  Assuming you elect to keep a monolithic 
#  /etc/X11/xorg.conf file, you can now edit the Keyboard section as usual.
 
Old 10-10-2013, 03:31 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
"man evdev" tells:
Code:
       Option "Device" "string"
              Specifies  the  device  through  which  the  device can be accessed.  This will generally be of the form
              "/dev/input/eventX", where X is some integer.  The mapping from device node to hardware is system-depen‐
              dent. Property: "Device Node" (read-only).
so I'm not sure that what follows is correct:
Code:
Option        "Device" "/dev/input/mice"
Also, "man xorg.conf" doesn't mention a line beginning with "Driver" in the section InputClass. Maybe you could try an entry beginning with MatchDriver there instead?
 
Old 10-11-2013, 12:46 PM   #5
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Original Poster
Rep: Reputation: 56
Thanks for the suggestions. I tried using /dev/input/event17 (what Xorg.0.log reports for my trackball) instead of /dev/input/mice, but got the same result.

Also, my mouse config doesn't use InputClass, it uses InputDriver. Should it be using InputClass instead?

I think the bigger issue is that I don't see any evidence in Xorg.0.log that my mouse config file is being loaded. It seems to detect and auto-configure the trackball, and ignore my config.
 
Old 10-11-2013, 05:02 PM   #6
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: Slackware and Alpine
Posts: 132

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by mattca View Post
I think the bigger issue is that I don't see any evidence in Xorg.0.log that my mouse config file is being loaded. It seems to detect and auto-configure the trackball, and ignore my config.
(Sorry for the rant. TL;DR:
It is still possible to use a single file xorg.conf, with the same old sections, as long as you set either of the serverflags AutoAddDevices or AutoEnableDevices to false, e.g. add 'Option "AutoAddDevices" "False"' to your ServerFlags section.
)

To quote your own (or, rather Patrick's) /etc/X11/xorg.conf.d/90-keyboard-layout.conf:
Quote:
# If you prefer to use the "old" way of configuring keyboards (without input
# device hotplugging), then you'll need to add the following lines to the
# ServerFlags section of /etc/X11/xorg.conf:
# Option "AllowEmptyInput" "false"
# Option "AutoAddDevices" "false"
# Option "AutoEnableDevices" "false"
# Alternatively, you can break this up into separate "stubs" in the xorg.conf.d/
# directory, but that's your call. Assuming you elect to keep a monolithic
# /etc/X11/xorg.conf file, you can now edit the Keyboard section as usual.
You'll need to explicitly disallow auto-detection of input devices, otherwise Xorg will ignore your settings.

Altough, that's not the full story. Accoring to the changelog of xorg-server, AllowEmptyInput has since been renamed to forceInputDevices (where apparently ForceInputDevices should be set to "True", rather than "False", to not ignore the input sections of the config file(s)).

Quote:
commit fa50670c32637faff6bb91f1206a0e3c17a9bada
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Nov 12 11:48:08 2010 +1000

xfree86: rename allowEmptyInput to forceInputDevices.

This is a more accurate name for the actual functionality than
allowEmptyInput. Historically, allowEmptyInput has allowed the server to
start with no input devices. Since 1.4 and the introduction of VCP and VCK,
there are always two input devices present.

allowEmptyInput was changed in behaviour to essentially "ignore xorg.conf
devices or not", auto-adding the built-in devices if disabled.

Rename to forceInputDevices, because that's essentially what it does. When
disabled (i.e. when hotplugging is enabled), it disables all
mouse/kbd/vmmouse devices configured in the xorg.conf file.
When enabled, it forces the traditional behaviour for input devices:
- use input devices configured in the server layout
- if none are configured, use the first pointer and the first keyboard
device in the xorg.conf
- if none are configured, create the default pointer/keyboard devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(Se also: changelog entries of Nov. 9th, when user configurable AllowEmptyInput was removed to "Protect the users from themselves.")

From reading the source code of xorg-server (as of slackware-14.0), it seems to be sufficient to set either AutoAddDevices or AutoEnableDevices to false, in the ServerFlags section (which will probaby have to be created, since they sould be superfluous with all these fancy lots-of-small-files-in-conf.d-directory). (And adding a line such as: 'InputDevice "touchpad" "CorePointer"' to the ServerLayout section shouldn't hurt.)

To get all input devices working with autoadddevices set to false, you would have to create config files with the "old style" configuration, i.e. InputDevice rather than InputClass. But if you've still got an old full xorg.conf that did what you wanted, it should be possible to use those InputDevice sections, with the serverflag AutoAddDevices = false.

Otherwise you should probably convert the mouse config to an InputClass, with proper Match* options. With regards to the synaptics touchpad, I'd agree with Didier Spaier, that it probably should be MatchDriver. But, it looks like you're using the default config file that ships with slackware, so I guess others would have reported a similar problem, if thats the actual error.

Last edited by e5150; 10-11-2013 at 06:38 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Xorg and problems with evdev jheengut Slackware 7 05-25-2011 05:45 AM
Xorg 7.3, evdev, and mouse CrEsPo Slackware 1 05-05-2008 04:16 AM
Sid Users - Beware of Xorg 7.3 (xserver-xorg-input-evdev) bug rickh Debian 4 10-24-2007 03:30 AM
Using evdev causes Xorg to restart on keypress Likosin Linux - Software 5 04-03-2006 04:10 PM
evdev with xorg 6.9 ganja_guru Linux - Software 1 12-25-2005 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration