Talk:LIRC on Debian Etch
Lirc uses input layer support
Just a quick note for other users with a newish kernel and new versions of lirc. Since version 0.7 of LIRC the use of gpio is deprecated in favour of the linux input layer (via event device). See here for more info. The upshot of this is you don't need lirc_gpio etc if you are getting data via some device in /dev/input/event_N. You can quickly test this by firing up a shell and pressing the number buttons on the remote, they will appear in shell if the correct modules are loaded for your card. I have confirmed this with 2 different Avermedia cards (771 and Hybrid) using a standard 2.6.18-4 debian kernel and a custom 2.6.20.15 kernel.
My suggestion is that you get the lirc source, configure it with "--with-driver=devinput" , make and make install. You will need a lircd.conf, try this one, which works for me and you will need some sort of init.d script and a link in /etc/rc2.d/ or whichever run level you use.
My init.d/lircd is
#! /bin/sh
### BEGIN INIT INFO
# Provides: Start lirc with input layer support
### END INIT INFO
# Author: David Howe
/usr/local/sbin/lircd -H dev/input -d /dev/input/event2
I have a symbolic link to it in /etc/rc2.d/ - IMPORTANT NOTE - you need to check which input/event number your card has been assigned. Follow this walkthrough. Run "irw" and you should see the input mapping of your remote. See this page for more.
--David@qednet.biz 01:15, 20 August 2007 (UTC)
I had to install lirc via source (no lirc-related debs are installed on my machine) ... can anyone provide a guide on how to use apt-get to properly install lirc? It can go here ( LIRC_on_Debian_Etch ) if you can. --Dgymnycee 16:46, 8 May 2007 (UTC)
Problem is you have to generate a lirc-modules-XXX.deb package yourself, as the distribution does not provide them for the standard Debian kernels (yet?). This needs to be done using make-kpkg, and that one depends on the kernel-headers package for your kernel. I am able to explain this to you, if you provide me with some information about your installed kernel (`dpkg -l | grep kernel-image` output). Maybe we can write the documentation on this wiki together? My system has been tuned to heavy to easily replay the rather trivial process... --Michel 20:44, 8 May 2007 (UTC)
I think it was a lack of understanding as far as the use of make-kpkg went that kept me from using it. I have started a bit of documentation in the LIRC_on_Debian_Etch page, but I haven't looked at it in a while so I forget how detailed it is. I also think my entire experience was muddled by the fact that I had a bad tuner in my first attempt, so it's possible that the debian-specific way of installing would have worked just fine. I currently have a very buggy system that hangs/crashes too often for my liking, so I expect to be going through the install process again sometime soon ... So, it's a good time to get a wiki written.
For the kernel, I am using (and part of my goal with this debian installation was to stay as debian-provided as possible, so it's an unmodified kernel):
linux-image-2.6-k7 ... 2.6.18+6
linux-image-2.6.18-4-k7 ... 2.6.18.dfsg.1-12
linux-headers-2.6.18-4 ... 2.6.18.dfsg.1-12
linux-headers-2.6.18-4-k7 ... 2.6.18.dfsg.1-12
linux-kernel-headers ... 2.6.18-7
--Dgymnycee 21:07, 8 May 2007 (UTC)
Seems you are online at the moment :-) In the past few minutes I have written some draft documentation at LIRC_on_Debian_Etch. It definitely needs a review, as I did not verify every single step on my MythTV box (my wife is using it right now (too high WAF?).
Maybe you can give my draft a try? --Michel 21:14, 8 May 2007 (UTC)
Well, so far I have reviewed the main installation process as described on this page, so maybe you can just follow the guide and build your new installation. But maybe you can tell me what exactly is buggy in your box, so I can provide you with information how to fix it? --Michel 21:21, 8 May 2007 (UTC)
Ok, you (dgymnycee) did it partially as a manual build. I adapted the page with more complete Debian instructions... --Michel 19:11, 10 May 2007 (UTC)
Oh, cool, will the dpkg-reconfigure also copy in the required config to, what is it, /usr/src/linux/.config or something? ... Or does it just not even need it? --Dgymnycee 19:21, 10 May 2007 (UTC)
Nope, there was a sneaky minor edit on the page where I replaced the header files with the complete sources. That one automagically provides the config file for you. With that changes, dpkg-reconfigure lirc-modules-source will do the work without any problem --Michel 20:59, 10 May 2007 (UTC)
There's something wrong/missing at/after the 'dpkg-reconfigure lirc-modules-source' command. This implies that it's complete, but modprobe lirc_i2c does not work. I noticed that it put the .o (should be .ko?) files in /lib/modules/usr/src/linux/misc/ which is odd/wrong. It also didn't create a .deb file anywhere. --Dgymnycee 02:55, 11 May 2007 (UTC)
Did anything ever come of this? I'm having the same problem. Following the howto here, everything, upto and including 'dpkg -i /usr/src/lirc-modules-*.deb' works, but 'modprobe lirc_i2c' doesn't work. I noticed the same thing as dgymnycee ( it created .o files in /lib/modules/usr/src/linux/misc/ ), although it did create a .deb file ( /usr/src/lirc-modules-_0.8.0-9.2+Custom.1.00_i386.deb ). any help would be awesome. thanks. - spargonaut
Oops - seems I forget this discussion back a few months ago! Anyways, trying (again) to get this article correct. Can you please tell me if you did reboot the machine afterwards? If not, the so-called dependencies may not have been correct. To fix this on a running machine try:
depmod -a
If everything works as expected the module should load now. Otherwise, you both mention a directory called "/lib/modules/usr/src/linux/misc/" which seems odd to me. Normally the modules should go to
/lib/modules/2.6.xx.x/misc/lirc_*
So maybe there is something else wrong? While waiting for another response I will do some further investigation! --Michel 22:43, 14 August 2007 (UTC)
thanks for the quick response michel, sorry it took me so long to respond to you. first off, yes, i have rebooted several times since i originally built the modules, and it didn't do anything.
I ran 'depmod -a' and retried 'modprobe lirc_i2c' and got the same response "FATAL: Module lirc_i2c not found."
After that, i went and looked at the directory you suggested: /lib/modules/2.6.18-4-486/misc/ and found 'lirc_dev.ko' as well as 'lirc_pvr150.ko' These were left over from a patch i found here only to later find out that i only needed that module if i were intending to use the IR blaster, which i am not. Everything for that module went fine until i tried to use the mode2 program, which gave me the error "mode2: error opening /dev/lirc" Since then i have reverted to just trying to get the lirc_i2c module loaded. Let me know if you need any other information from me. Also, thanks a ton for the help, I am hoping this thread(?) will help others as i have seen this problem in a handful of places, but none of them seem to have a solution. -- spargonaut
ok, i finally got my remote working. I'm running debian etch with the 2.6.18 kernel and using a hauppauge PVR 150 video capture card. For some reason, the directions located here built fine, yet left me with the lirc_i2c.o module when what was needed was lirc_i2c.ko. This is what was giving me the Errors as described above. After doing some research, i decided to compile from source following the directions as noted here. I downloaded the suggested lircrc file from that same page and have since started reorganizing and commenting it to make it easier to reconfigure. I am also working on a spreadsheet of the keybindings. I'm sure I'll make some noise about it when I get done. cheers. --Spargonaut