How to tell X.org not to use events from specific /dev/input/eventX but not to block LIRC?

Asked by Roman Polach

I have set lirc to work with several applications such as audacious and mplayer successfully.
But when no of these applications running the remote control works as keyboard, so I can turn off
computer, launch search dialogs, set volume etc. by remote control keys. My question is how can
I disable this?

I tried to blacklist "evdev" module but LIRC stops working then.
I tried also set "LOAD_MODULES=false" in /etc/lirc/hardware.conf but it did not change anything.
I looked into xorg.conf and disabled all wacom tablet inputs, so only standard mouse and keyboard section remains, but it didn't help.

I have a remote control attached to special conenctor of my Avermedia DVB-T 771 card,
and I have these settings in /etc/lirc/hardware.conf:
LIRCD_ARGS=""
LOAD_MODULES=true
DRIVER="dev/input"
DEVICE="/dev/input/event4"
MODULES=""
LIRCD_CONF=""
LIRCMD_CONF=""

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Márcio
Solved:
Last query:
Last reply:
Revision history for this message
laga (laga) said :
#1

You could ditch lircd in favor of inputlircd. Using "inputlircd -g /dev/input/event4", inputlircd will gain exclusive access to your remote control. You might also have to play around with the "-m" option to make it recognize all buttons. Just install the package "inputlirc" and read "man inputlircd", the man page is written quite well.

You might also want to replace "/dev/input/event4" by the device path in "/dev/input/by-id/" or "/dev/input/by-path" because that'll prevent lircd/inputlircd from accidentally listening to the wrong device, e.g. your normal keyboard.

inputlircd might not exactly be the solution you were looking for, but it should work.

HTH,

Michael

Revision history for this message
Roman Polach (rpolach) said :
#2

Thanx, that seems to be a good workaround,
but is there any chance to tell X.org not to use this input device automatically?

Revision history for this message
Roman Polach (rpolach) said :
#3

(just if I simply want standard lircd? :-))

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#5

So isn't any chance to tell X.org not to use specific /dev/input/eventX ?

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#7

reopening...

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#9

reopening...

Revision history for this message
Launchpad Janitor (janitor) said :
#10

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#11

reopening...

Revision history for this message
Launchpad Janitor (janitor) said :
#12

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#13

reopening...

Revision history for this message
laga (laga) said :
#14

Wow, you really insist on getting an answer, huh? :)

Read "man 4 kbd":

<--snip-->
       The following driver Options are supported:

       Option "Device" "string"
              Specify the keyboard device. Default: the OS’s default console keyboard input
              source.
<--snap-->

"man 4 evdev" might also be interesting. Hope that helps.

Michael

Revision history for this message
laga (laga) said :
#15

Don't break your system - make sure to get a backup of your config files etc.

Revision history for this message
Roman Polach (rpolach) said :
#16

Thank you much for answer,
but I still have a problem:
I tried to set
  Option "Device" "/dev/input/event2"
but I have no luck with this device and driver "kbd" (probably due to kbd driver needs another device which I don't know)
so I tried change to "evdev" driver and set event2 as device.. then X works correctly but
it still gets events both from /dev/input/event2 (the real keaboard) and /dev/input/event4 (remote control)

Revision history for this message
Launchpad Janitor (janitor) said :
#17

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#18

reopening...

Revision history for this message
Launchpad Janitor (janitor) said :
#19

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#20

I have add new input section in xorg.conf and defined /dev/input/event4 (remote control) using evdev,
I have set "Option SendCoreEvents Off" - after I added this to ServerLayout, it stops send events
(which is the goal) but unfortunately LIRC stops working for all applications that use it.

I need to somehow tell X not to use events from specific device but do not block LIRC. It is possible?

Revision history for this message
Launchpad Janitor (janitor) said :
#21

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#22

reopening...

Revision history for this message
Launchpad Janitor (janitor) said :
#23

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Roman Polach (rpolach) said :
#24

reopening...

Revision history for this message
Márcio (mvfpoa) said :
#25

I'm having a similar problem since i upgraded to Gutsy... When I open a program configured with lirc (e.g. irw), lirc daemon says that it can't get exclusive access to the device of the remote control. I'm unable to use the remote...
I discovered when I stop GDM i can get irw work. So, its seems to be something related to Xorg monitoring the remote events as a keybord.

hardware.conf
driver="dev/input"
device="/dev/input/by-path/..."

This doesn't use to happen on 7.04.

i tried googling and i have found this, which sounds related:
http://ml.osdir.com/hardware.lirc/2005-12/msg00095.html
but seems to require patching the kernel.

I'm considering report this as a bug.

Revision history for this message
Best Márcio (mvfpoa) said :
#26

by the way, have you tried irexec, rpolach?
try to launch it with your session. it will problably solve your problem :D
don't forget to consult the man page

Revision history for this message
Roman Polach (rpolach) said :
#27

Thanks Márcio, that solved my question.