LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-10-2013, 01:55 PM   #1
kadeyo
LQ Newbie
 
Registered: Jan 2013
Location: San Francisco Bay Area
Distribution: Ubuntu 12.10
Posts: 2

Rep: Reputation: Disabled
how-to debug udev


I want to use udev to give specific names to two mice.
My system runs Ubuntu 12.10 and I have an old system running Ubuntu 10.04 which is already doing this (so I am using it as a reference).

/etc/udev/rules.d/90-wally.rules contains:
KERNEL=="event[0-9]*", ATTR{idVendor}=="047d", ATTR{idProduct}=="1020", MODE="0664", GROUP="plugdev", NAME="input/trackBallBig"
KERNEL=="event[0-9]*", ATTR{idVendor}=="047d", ATTR{idProduct}=="1022", MODE="0664", GROUP="plugdev", NAME="input/trackBallSmall"

lsusb shows:
Bus 001 Device 005: ID 047d:1022 Kensington Orbit Optical
Bus 001 Device 006: ID 047d:1020 Kensington Expert Mouse Trackball

ls -l /dev/input shows (relevant parts):
crw-r----- 1 root root 13, 32 Jan 4 17:10 mouse0
crw-r----- 1 root root 13, 33 Jan 4 17:10 mouse1
crw-r----- 1 root root 13, 34 Jan 4 17:10 mouse2

Looking at the 10.04 machine, ls -l /dev/input shows (relevant parts):
crw-r----- 1 root root 13, 32 2012-11-28 16:44 mouse0
crw-r----- 1 root root 13, 33 2012-12-15 10:51 mouse1
crw-r----- 1 root root 13, 34 2012-11-28 16:44 mouse2
crw-rw-r-- 1 root plugdev 13, 68 2012-11-28 16:44 trackBallBig
crw-rw-r-- 1 root plugdev 13, 67 2012-12-15 10:51 trackBallSmall

I have confirmed that udev daemon is running and that the group plugdev exists. I don't find any errors in syslog. Earlier I had some errors, but then discovered that "SYSFS" keyword in rules file needs to be "ATTR".

In /var/log/udev I find no references to "trackBall*", whereas on the 10.04 machine, I see "DEVNAME=/dev/input/trackBallSmall".

I am stuck for what to do to debug this. Are my rules incorrect for what I want to do? I have read the udev tutorial http://ubuntuforums.org/showthread.php?t=168221 but need additional help.

thanks
 
Old 01-10-2013, 02:30 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
You can use "udevadm" command to help. For example this command show what kernel sees and which udev rules was triggered after connecting device
Code:
udevadm monitor --kernel --udev

# or with more information
udevadm monitor --kernel --udev --property
Maybe changing name is not supported. Try to create symlink (by SYMLINK=="input/trackBallBig" rule) instead of changing kernel name (NAME=...)

Last edited by eSelix; 01-10-2013 at 02:35 PM.
 
1 members found this post helpful.
Old 01-16-2013, 07:10 PM   #3
kadeyo
LQ Newbie
 
Registered: Jan 2013
Location: San Francisco Bay Area
Distribution: Ubuntu 12.10
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks, the following rules (from /etc/udev/rules.d/90-trackball.config) worked.

#try this based on output of "udevadm monitor --kernel --udev --property"
# 01/15/13 THIS WORKS the devices themselves are in plugdev group with crw-rw-r-- perms
# BEST SET OF RULES SO FAR. DO NOT DELETE.
#SUBSYSTEM=="usb", ATTR{product}=="Kensington Expert Mouse", MODE="0664", GROUP="plugdev", SYMLINK+="input/trackBallBig"
#SUBSYSTEM=="usb", ATTR{product}=="Kensington USB/PS2 Orbit", MODE="0664", GROUP="plugdev", SYMLINK+="input/trackBallSmall"

#tried this just to see and IT WORKS. This is better than the best because there are no symlinks
SUBSYSTEM=="usb", ATTR{product}=="Kensington Expert Mouse", MODE="0664", GROUP="plugdev", NAME="input/trackBallBig"
SUBSYSTEM=="usb", ATTR{product}=="Kensington USB/PS2 Orbit", MODE="0664", GROUP="plugdev", NAME="input/trackBallSmall"
 
  


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
[SOLVED] Not able to debug a library compiled with debug information gregorian Programming 6 10-29-2011 10:53 AM
libc6-debug or glibc-debug fibreoptique Linux - Newbie 2 01-20-2011 08:52 AM
how do I debug "udev rules" SaintDanBert Linux - Software 10 09-25-2010 04:53 PM
How do I set up/debug new udev rules without rebooting? Robert S Linux - General 2 12-26-2009 12:51 AM
How to debug without having debug section in an executable ? unclesam Linux - Newbie 0 02-02-2006 07:23 AM


All times are GMT -5. The time now is 11:10 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration