Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Any ideas how to do that? I want to keep my normal mouse but also have use a USB joystick to move the pointer, click etc
How about mapping buttons etc?
and this in the serverlayout:
InputDevice "Joystick" "SendCoreEvents"
... it's on virtual/x11-7.0-r2 (modular Xorg) which I compiled with the (Gentoo) +joystick USE flag. X starts up and the mouse is OK as usual but joystick is dead.
usbview sees the joystick but other than that I'm at sea ...
Here is how I get two mouse to work on my laptop
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice ""Joystick" "AlwaysCore"
and I would try without;
Option "SendCoreEvents" "true"
Here is how I get two mouse to work on my laptop
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice ""Joystick" "AlwaysCore"
and I would try without;
Option "SendCoreEvents" "true"
Nope - I just tried it and I still get nada on the joystick.
I might mention that
od </dev/input/js0
_does_ respond to the joystick so I am definitely connected through the USB
Here is how I get two mouse to work on my laptop
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
InputDevice ""Joystick" "AlwaysCore"
and I would try without;
Option "SendCoreEvents" "true"
... but the log (/var/log/Xorg20.log - why not Xorg1.log???) says:
(EE) Failed to load module "joystick" (out of memory, 701)
.. so it looks like my driver load failed. Why would that be and how to fix??????
I stole this from a thread on gentoo forums. Looks like you don't want to set it up in xorg.conf. I would check your kernel, that could explain the memory error;
FROM: mike4148
Quote:
If it plugs into a USB port, it will probably work out of the box if you have the right modules compiled into your kernel.
If it plugs in to a gameport or serial port, try the following (all kernel options are in the Input Devices section of the kernel config):
1. Build joystick support into your kernel or as a module.
2. Build the relevant gameport driver into your kernel or as a module. For example, if you have the joystick plugged into an SB Live!'s game port, say 'Y' to "Gameport support" and "SB Live! and Audigy gameport support."
3. Build all non-USB joystick drivers as modules. Note the names of all the modules (they show up in the help screen in the graphical kernel configs).
Build and install the new kernel, and boot into it. Try loading each module with modprobe, one at a time. For each, see if you have /dev/js0 and/or /dev/input/js0. If you do, see if it works (you'll probably need to calibrate it first; search the forum system for info on that). If it does, you're done. If not, rmmod the last driver and modprobe the next on the list.
If none work, then it's likely that there is no driver for your joystick. Search the net to see if anyone has developed one.
Last edited by comprookie2000; 05-30-2006 at 05:26 PM.
I stole this from a thread on gentoo forums. Looks like you don't want to set it up in xorg.conf. I would check your kernel, that could explain the memory error;
FROM: mike4148
.... hmmmm. This looks like a method for non-USB or at least to get the /dev/input/js0 file set up.
I already have a working /dev/input/js0 - it's failing because it won't load as a X module... as in
/usr/lib/xorg/modules/input/joystick_drv.so gives an error message when X tried to load it
Just to cover all the bases I checked my kernel build and I have:
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_ADI=m
... and I tried "modprobe adi" but it makes no difference (my joystick is a Logitech)... but then I didn't really expect it to make a difference.
... but the log (/var/log/Xorg20.log - why not Xorg1.log???) says:
(EE) Failed to load module "joystick" (out of memory, 701)
.. so it looks like my driver load failed. Why would that be and how to fix??????
OK - I made _some_ progress and reported this to xorg's bugzilla:
I fixed the obvious bug in src/xf86Jstk.c:
Code:
static pointer
xf86JstkPlug(pointer module,
pointer options,
int *errmaj,
int *errmin )
{
LocalDevicePtr local = NULL;
JoystickDevPtr priv = NULL;
char *s;
local = xf86JstkAllocate();
if (!local || !priv) {
*errmaj = LDR_NOMEM;
goto SetupProc_fail;
}
to:
if (!local || !local->private) {
... }
but I now get:
Quote:
(II) LoadModule: "joystick"
(II) Loading /usr/lib/xorg/modules/input/joystick_drv.so
(II) Module joystick: vendor="X.Org Foundation"
compiled for 7.0.0, module version = 1.0.0
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 0.5
(EE) WACOM: No Device specified.
(II) UnloadModule: "joystick"
(II) Unloading /usr/lib/xorg/modules/input/joystick_drv.so
(EE) Failed to load module "joystick" (invalid argument(s) to LoadModule(), 701)
OK - I made _some_ progress and reported this to xorg's bugzilla:
I fixed the obvious bug in src/xf86Jstk.c:
...
Looks like no-one in their right mind uses the xorg joystick driver. It is so hopelessly broken that it's unusable.
A better approach turns out to be to use some user-space daemons to convert the joystick input stream into mouse-like commands and pump them into X.
These worked for me:
qjoypad
joymouse
Now that I've been able to see the joystick in action it seems it's pretty impractical to use it in place of the mouse - it's just not responsive enough and you have no fine control. I guess the joystick is a gaming device and only useful for thrashing back and forth. Well it was a nice idea!!
I just wanted to say thank you! You are right, using the joystick as an X pointer is clunky (although, I think configuring the buttons will make it somewhat more usable), but, it is still very useful. I have been looking into accessibility for people who have little or no use of one or more limbs. I have found that the most interactive/usable/cost-effective off-the-shelf interface devices for these people are various devices which have been designed to plug into the controller port of the Sony Playstation2. Using a PS2->PC converter, coupled with X configured for joystick input means that these devices can be used in place of mouse and keyboard to a certain extent.
So, thank you for your help, I can now proceed with my work. :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.