How to find bus/path address for a USB device
I'm reposting this on a different forum and with a better subject line. (I received no answers on the Desktop forum, which wasn't the best place for this question.)
I'm a happy user of Slackware 14 and Thinkpad X200.
I recently purchaced a Thinkpad USB Keyboard with Trackpoint. I'm used to a much more sensitive trackpoint. The trackpoint on the external keyboard is much trickier to configure than the one on X200.
This thread explains how to do it. The first poster has written a tiny Python script for changing sensitivity.
The problem is, before running the script you need to unbind the usb device like this, and after the script to bind it again.
Even with the help offered in the thread, I just don't get it. How do I find out my device's bus/path name?
With the command lsusb my device identifies like this
Bus 001 Device 004: ID 17ef:6009 Lenovo ThinkPad Keyboard with TrackPoint
(Luckily it's the newer version of the keyboard, so the script is supposed to work well with it.)
Here's the way I find my ancient scanner:
Thanks, david1941! Looking at that script inspired me to find out the answer. And the script just might help me with another problem, getting my Epson Perfection V30 to work with Slackware...
I googled up a very helpful article on lwn.net about manual driver binding and unbinding. This is how I found the bus address:
Confirmed working, some notes
1. Get usb device name (the 2nd id, as above, e.g. 1-5.3:1.1)
sudo apt-get install tree
2. Create script with that name substituted for these XXX
echo XXX > /sys/bus/usb/drivers/usbhid/unbind
echo XXX > /sys/bus/usb/drivers/usbhid/bind
3. Install python libraries
sudo apt-get install libusb-1.0-0
See pyusb installation instructions at github com walac pyusb
4. Create the 2nd script, trackpoint-script.py
data = [0x4, 0x6a, 0x3, 0xfc, 0x38]
dev = usb.core.find(idVendor=0x17ef, idProduct=0x6009)
dev.ctrl_transfer(0x21, 0x9, 0x304, 0x1, data)
This is fantastic on my setup, many thanks.
Linux monkamu 3.2.0-48-generic #74-Ubuntu SMP Thu Jun 6 19:43:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
I also have the Thinkpad USB keyboard. My OS is Ubuntu 13.10. I tried the steps in your note but it didn't work. Although everything went without errors -- the sensitivity didn't change. Can you please help me?
I can try, but you're going to need to give me more details.
Let's try this: show me the command you are entering and the output to the screen for each step.
BTW I switched to Debian Sid sometime after this, so I no longer have the same system as before.
Thanks! Here is the procedure I followed:
output of tree:
And it goes without saying that you installed the python libraries...
I seem to recall that it was necessary to execute these as sudo, so I'd try that first.
Suppose you put this:
echo 3-2:1.1 > /sys/bus/usb/drivers/usbhid/unbind
echo 3-2:1.1 > /sys/bus/usb/drivers/usbhid/unbind
Into a new script (make sure you chmod 755), say called usbtrack.sh
The do "sudo usbtrack.sh"
Some other thoughts:
Through the years, I've used/tried many different methods to make this work. Right now, I'm using Debian sid, and it "just works." Unfortunately since I've tried so many things in the past, it's hard to tell what the last Ubuntu method worked for me.
That being said, you might want to try
As that is highly placed in my backup script folder from my last Ubuntu install.
Also, for changing the speed of the built in trackpoint (not the external), you can try this
T=`find /sys/devices/platform/i8042 -name name | xargs grep -Fl TrackPoint`
sudo sh -c "echo -n 200 > $SERIO_DIR/speed"
sudo sh -c "echo -n 200 > $SERIO_DIR/sensitivity"
Finally, a fail-safe for the external trackpoint is this, but it is not what I would call high quality:
xinput set-prop "pointer:Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint" "Device Accel Velocity Scaling" 20
xinput set-prop "pointer:Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint" "Device Accel Adaptive Deceleration" 2
xinput set-prop "pointer:Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint" "Device Accel Profile" 3
You can spend hours tweaking xinput and still not be very happy with it, so I recommend it only if nothing else works.
So to sum up, try to run the scripts again as sudo, and if that doesn't work, take a look at tpkbdctl.
Sorry that my memory for this isn't better.
tpkbdctl didn't work :( The xinput script actually completely turned off the trackpoint. So I guess I might try to install debian-sid one of these days. Thanks!
I'm sorry I haven't been able to help you more with this.
Some last thoughts -- are we talking about the same keyboard?
This is mine:
The model for mine is 55Y9053. You'll note this is slightly different from the link above.
It shows up like this if I run "xinput -list":
aolney@monkamu:~$ xinput -list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=11 [slave pointer (2)]
⎜ ↳ Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ Integrated Camera id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]
↳ ACPI Virtual Keyboard Device id=13 [slave keyboard (3)]
↳ Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint id=14 [slave keyboard (3)]
Another thought -- I believe tpkbdctl worked great for me with Ubuntu 12.04, and I think I went straight from that to Debian sid (where it just works).
I took a quick look, and it seems the reason it "just works" is b/c the guy who wrote it is also in charge of this driver officially. So on my Debian sid it is installed here:
This is an actual file that you can edit to give the sensitivity parameter. If you tried to download it from github and it didn't work, I wonder if it's because your version of Ubuntu is sufficiently advanced that it actually has the driver built in, but the setting is stupid. Try looking for /etc/default/tpkbdctl and changing the sensitivity to the max. This is what mine looks like:
# Change this to adjust the sensitivity, valid range 1-255
Also -- try plugging in your keyboard *after* your machine has booted. Sometimes this is needed for the proper driver to load (have no idea why).
Good luck :)
Finally reinstalled sid on a new laptop and re-encountered these issues.
There are now 2 versions of tpkbdctl on github. I actually had best luck with tpkbdctl-0.1.zip
Just download the tagged release, unzip, and follow the directions for debian/ubuntu.
This is what creates the config file I mentioned above. This is my working file
aolney@monkmonk:~$ cat /etc/default/tpkbdctl
|All times are GMT -5. The time now is 04:17 PM.|