LinuxQuestions.org
Review your favorite Linux distribution.
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 12-07-2010, 08:31 PM   #1
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Rep: Reputation: 5
Keyboard and Mouse in Slackware 13.1


Okay, I've been using Slackware for ages... since like 1997 or 1998. I have a Slackware 3.x CD around here somewhere. I'm usually the one explaining how Linux works to everyone else. I even got GnuCash working on Slackware. So these two problems are very frustrating...

1. Keyboard in Xorg. It seems to work, except the down arrow and the page down buttons are mapped as something else (the down arrow causes TEXT TO DISAPPEAR...I've had to type this like three times now...). After a bunch of searches, it looks like a problem with HAL and evdev (whatever that is). I tried setting the model in KDE's Regional control panel but that had no effect. Xorg.conf settings for this section... you can see some remnants from prior attempts:

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "evdev"
Option "Device" "/dev/input/event1"
# Option "Protocol" "evdev"
# Option "XkbRules" "evdev"
# Driver "kbd"
EndSection

I did check that event1 refers to the keyboard. The keyboard is a Microsoft Internet Keyboard that works fine; the arrow keys work great outside of X.

2. Mouse in Xorg. The scroll wheel wants to scroll side to side instead of up and down. This also happens to be a Microsoft product (I like their mice... my wife brought the Microsoft keyboard into the relationship...). It's just a wheel optical 3-button mouse, nothing special. Again, none of my usual xorg.conf edits seem to work; here's what I have right now.

Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "evdev"
Option "Protocol" "auto"
Option "Device" "/dev/input/event2"
# Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "6 7"
EndSection

Again, I checked that the mouse is event2.

Someone really should make an upgrade guide for people like me that have been using it for years and aren't really following the tech that explains new features like hal and evdev (I know hal has been around for a couple versions, but I've never gotten involved with it until now). Or maybe there is one and I'm just not aware of it. Basically I just want it to just work, which is why I use Slackware in the first place!

I should mention I did have both working under Slackware 13.1 on this machine until Windows conveniently erased my root partition for me, so I got to do a completely clean Slackware install for the first time in a LONG time. That's when the issue arose. Because I was in a rush, I did a full install. I assume the previous setup was using non-hal/non-evdev methods, but I might as well set this one up using the new methods, right?

I'm using Slackware64 13.1, running on a Core 2 Quad Q8300 @ 2.50 GHz. Hardware is fine - both mouse and keyboard work under Windows XP, and like I said the keyboard is fine outside X. It has to be some configuration problem ...somewhere.

Thanks in advance for any help you can provide!
 
Old 12-07-2010, 08:56 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,193

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
Unless you're sure you need an xorg.conf (e.g. to load binary drivers from ATI or NVidia), you shouldn't have one. Try removing your xorg.conf file and letting X detect everything.

If you're using binary NVidia drivers, then see Zordrak's blog entry on setting them up under Slackware.

Last edited by dugan; 12-07-2010 at 08:57 PM.
 
Old 12-07-2010, 09:22 PM   #3
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
The changes and hints text on the DVD explains it more. But even if you have an ATI or NVidia card, you only need to define the card section of the xorg.conf. X uses hal to configure everything else.
 
Old 12-08-2010, 06:08 AM   #4
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Original Poster
Rep: Reputation: 5
Thanks for the tips. I do use the binary NVidia driver, so I'll check that blog and try that.
 
Old 12-09-2010, 05:41 PM   #5
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Original Poster
Rep: Reputation: 5
I've done as that blog suggested, and I'm still having the problems. It's as if I didn't do anything at all (perhaps X was already ignoring those entries). I tried removing the xorg.conf file to verify X was reading it, and X failed to load, so apparently X is using that file at least in part. Here's what I have now:


Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Option "Xinerama" "0"
EndSection

Section "Files"
FontPath "/usr/lib64/X11/fonts/misc/:unscaled"
FontPath "/usr/lib64/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib64/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib64/X11/fonts/misc/"
FontPath "/usr/lib64/X11/fonts/Type1/"
FontPath "/usr/lib64/X11/fonts/Speedo/"
FontPath "/usr/lib64/X11/fonts/100dpi/"
FontPath "/usr/lib64/X11/fonts/75dpi/"
FontPath "/usr/lib64/X11/fonts/cyrillic/"
FontPath "/usr/lib64/X11/fonts/TTF/"
EndSection

Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Gateway FPD1520"
HorizSync 31.0 - 66.0
VertRefresh 50.0 - 75.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8400 GS"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "DFP-0"
Option "metamodes" "CRT: nvidia-auto-select +0+0, DFP: nvidia-auto-select +1024+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection

This matches what I should have based on what I see in the blog. Any other suggestions?

Thanks.

Update: doing a "setxkbmap -model microsoftinet" seems to fix the problem with the keyboard (woohoo!). However, this didn't work, surprisingly...
rj@harper:~$ cat /etc/hal/fdi/policy/x11-input.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keyboard">
<merge key="input.x11_options.XkbModel" type="string">microsoftinet</merge>
</match>
</device>
</deviceinfo>

I did a /etc/rc.d/rc.hald restart to reload hal, and verified it restarted, and I thought that would be enough... (I should mention I've been restarting X after each attempt...)

Last edited by rmarquet; 12-09-2010 at 05:58 PM.
 
Old 12-09-2010, 06:36 PM   #6
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Original Poster
Rep: Reputation: 5
Sorry to spam the thread..but I feel like I'm reaaaaaallly close. I think hald isn't reading my created .fdi file. Currently I have:
Code:
rj@harper:~$ cat /etc/hal/fdi/policy/x11-input.fdi 
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbModel" type="string">microsoftinet</merge>
    </match>
  </device>
</deviceinfo>

<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_options.ZAxisMapping" type="string">6 7</merge>
    </match>
  </device>
</deviceinfo>
Okay...looks good. But a hal-device produces this:
Code:
27: udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input'
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  input.device = '/dev/input/event1'  (string)
  input.product = 'AT Translated Set 2 keyboard'  (string)
  info.addons.singleton = { 'hald-addon-input' } (string list)
  input.xkb.options = 'terminate:ctrl_alt_bksp'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.layout = 'us'  (string)
  info.subsystem = 'input'  (string)
  info.product = 'AT Translated Set 2 keyboard'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)
  info.udi = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port_logicaldev_input' (string)
  linux.sysfs_path = '/sys/devices/platform/i8042/serio0/input/input1/event1'  (string)
  info.parent = '/org/freedesktop/Hal/devices/platform_i8042_i8042_KBD_port'  (string)
  input.xkb.variant = ''  (string)
  input.x11_driver = 'evdev'  (string)
  info.category = 'input'  (string)
  info.capabilities = { 'input', 'input.keyboard', 'input.keypad', 'input.keys', 'button' } (string list)
  linux.device_file = '/dev/input/event1'  (string)
It looks like my match statement in the x11-input.fdi file didn't work. Same goes for the mouse (I note that, hilariously, it knows the model of mouse, so in theory it could tell X that the ZAxisMapping should be 6 7...):

Code:
61: udi = '/org/freedesktop/Hal/devices/usb_device_45e_40_noserial_if0_logicaldev_input'
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  input.device = '/dev/input/event4'  (string)
  input.product = 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)'  (string)
  info.subsystem = 'input'  (string)
  info.product = 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_45e_40_noserial_if0' (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_45e_40_noserial_if0_logicaldev_input'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:0b.0/usb2/2-4/2-4:1.0/input/input4/event4'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_45e_40_noserial_if0'  (string)
  input.x11_driver = 'evdev'  (string)
  info.category = 'input'  (string)
  info.capabilities = { 'input', 'input.mouse' } (string list)
  linux.device_file = '/dev/input/event4'  (string)
Any suggestions? The x11-input.fdi is readable by all, but I haven't see anywhere that indicated it had to be a certain permission setting.

Edit: Okay, so I figured out that you have to copy the 10-x11-input.fdi file to /etc/hal/fdi/policy and edit it to add the new features, and that does work. So now the two properties are showing up...but X isn't following them. Sigh.

Excerpt from /var/log/Xorg.0.log:
Code:
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: 
KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "microsoftinet"
(**) Option "xkb_layout" "us"
(**) Option "xkb_options" "terminate:ctrl_alt_bksp"
So X is seeing the option...it's just ignoring it. Same goes for the mouse.

Last edited by rmarquet; 12-09-2010 at 07:53 PM.
 
Old 12-11-2010, 09:01 AM   #7
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Original Poster
Rep: Reputation: 5
I'm still having this problem... Since the last post, I have:
--Updated all the software to the latest patches given on ftp.slackware.com
--Temporarily removed my .kde directory to see if that made a difference (no)

There are other things I've tried, but this is stupid. I have better things to do than screw around with this. If anyone has any suggestions, I'd like to hear them. In the meantime, I'm going back to using xorg.conf to configure X ... I know that actually works.
 
Old 12-11-2010, 10:21 AM   #8
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
If you have a standard USB or PS2 mouse and keyboard you shouldn't have to mess with anything.

Your xorg.conf litterally only needs to be the following
Code:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8400 GS"
EndSection
Remove everything else in the file unless you need to set up special inputs like a tablet. Then add that section as well and nothing else.


You may need to black list the nouveau driver so that your system doesn't try to enable that in place of the nvidia driver.
 
Old 12-12-2010, 06:29 PM   #9
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by lumak View Post
If you have a standard USB or PS2 mouse and keyboard you shouldn't have to mess with anything.

Your xorg.conf litterally only needs to be the following
Code:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 8400 GS"
EndSection
Remove everything else in the file unless you need to set up special inputs like a tablet. Then add that section as well and nothing else.
See post #5. I did that. No good.

It looks like X is ignoring the settings in HAL.

Quote:
You may need to black list the nouveau driver so that your system doesn't try to enable that in place of the nvidia driver.
What is the nouveau driver?
 
Old 12-12-2010, 09:00 PM   #10
LngDstncVygr
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by rmarquet View Post
See post #5. I did that. No good.

It looks like X is ignoring the settings in HAL.



What is the nouveau driver?

You have correctly identified that you have run into a HAL problem. For whatever the reasons, in some systems, HAL simply doesn't behave correctly. I had this same problem when I switched to 13.1. (I had my own thread on this back a number of months ago.) I found that HAL would read the data, then not transfer it. It would immediately deactive the mouse and keyboard. I found that, contrary to all those who tell you that you don't need an x-config file, I DID require one. At the end of the day, I finally "solved" the problem by effectively disabling HAL and passing the mouse and keyboard directly through the x-config. I "intended" to try to understand why HAL was acting like it was in the movie--but never got back to it after I "solved" the problem the "inelegant" way. Once I got things working, it wasn't the effort trying to troubleshoot HAL . . .

Good luck.

Rick
 
Old 12-13-2010, 06:10 AM   #11
rmarquet
LQ Newbie
 
Registered: Dec 2010
Distribution: Slackware
Posts: 18

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by LngDstncVygr View Post
You have correctly identified that you have run into a HAL problem. For whatever the reasons, in some systems, HAL simply doesn't behave correctly. I had this same problem when I switched to 13.1. (I had my own thread on this back a number of months ago.) I found that HAL would read the data, then not transfer it. It would immediately deactive the mouse and keyboard. I found that, contrary to all those who tell you that you don't need an x-config file, I DID require one. At the end of the day, I finally "solved" the problem by effectively disabling HAL and passing the mouse and keyboard directly through the x-config. I "intended" to try to understand why HAL was acting like it was in the movie--but never got back to it after I "solved" the problem the "inelegant" way. Once I got things working, it wasn't the effort trying to troubleshoot HAL . . .

Good luck.

Rick
Thanks. That's pretty much what I found while searching - when it works, it's great, but for some people it just doesn't work, for no reason they can discern. In this case, I suspect HAL itself is working correctly, but Xorg just isn't taking its settings for some reason. (As I posted above Xorg is READING the settings - it's in the log file - but it's just not using them for some reason.)

Like you, I finally went back to the 'old' way of doing it, and I got both the keyboard and mouse working perfectly on the first try.
 
Old 12-13-2010, 09:28 AM   #12
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
If HAL is working for other things, you may not want to disable it completely.

A note from the CHANGES_AND_HINTS.TXT on the install medium.
Quote:
If you prefer to do this the "old" way
using /etc/X11/xorg.conf, then you can use "X -configure" or "xorgsetup" to
generate an xorg.conf, then add the following lines to the "ServerFlags"
section to disable input device hotplugging via HAL:
Option "AllowEmptyInput" "false"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
This is also relevant if you prefer to disable HAL completely for whatever reason.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
why my mouse and keyboard freezes for a few secs in slackware 10.1 taher84 Slackware 5 06-15-2006 06:32 PM
gpm won't let my mouse/keyboard work in slackware kryptobs2000 Linux - Software 7 05-21-2006 10:40 AM
slackware 10.2 keyboard sticks, mouse jumpy GATTACA Linux - Hardware 1 04-12-2006 08:19 PM
Slackware 10 Keyboard & Mouse freeze in X Colonel-1990 Linux - Hardware 9 02-15-2005 07:33 PM
USB keyboard & mouse problem in Slackware 9.1 Wonderer Slackware 12 10-28-2003 11:06 AM

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

All times are GMT -5. The time now is 10:13 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