Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14858 - lircd init script misses correct device option
Summary: lircd init script misses correct device option
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
: 12209 13688 15139 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-31 11:38 UTC by Till Maas
Modified: 2003-11-13 05:25 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Maas 2003-01-31 11:38:53 UTC
User-Agent:       
Build Identifier: 

in /etc/init.d/lircd lircd is started with "start-stop-daemon --start --quiet --exec /usr/sbin/lircd" (line 
13) but this doesn't work correctly because lircd uses /dev/lirc as default device file. This is a 
directory, /dev/lirc/0 would be the correct device. 
The problem can be solved starting lircd this way: 
"start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc/0" 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Matt Keadle 2003-02-21 20:05:43 UTC
*** Bug 15139 has been marked as a duplicate of this bug. ***
Comment 2 Matt Keadle 2003-02-21 20:06:08 UTC
*** Bug 12209 has been marked as a duplicate of this bug. ***
Comment 3 Matt Keadle 2003-02-21 20:15:22 UTC
The initial post is what's causing all of these bugs. Lirc is not using the correct device to accept IR signals. It's attempting to use /dev/lirc, when it should be using /dev/lirc/0. Once that is fixed (the fix to /etc/init.d/lircd mentioned above) there won't be an issue with xmms-lirc.

The second problem, dealing with missplaces PID and log files, is a different issue but in the same vain.

Lirc is a difficult installation to automate. There are _many_ different kinds of remotes and IR receivers and currently our ebuild attempts to be compatible with as many as possible. It's possible to declare which driver you want build through the use of the LIRC_OPTS= env variable, which is the best way to go (read the ebuild at /usr/portage/app-misc/lirc-0.6.6.ebuild for how to do this). Another issue is the parallel port driver. It's known not to work on SMP machines, but it seems it doesn't even like if you have an SMP kernel on a single proc machine.
Comment 4 Matt Keadle 2003-02-21 20:47:33 UTC
I've update the lirc ebuild to lirc-0.6.6-r1. This should fix issues with the
PID and logs files looking for /var/lib/run and /var/lib/log.

I've looked a bit more at the initscript and I'm not quite sure how that should be
dealt with. I've got a Hauppauge WinTV card with a remote that requires kernel
modules to opperate. When the kernel modules get loaded, devfs creates the fifo
at /dev/lirc/0. However, if you're using a Miro PCTV card, that remote uses a
serial IR dongle and does not require kernel modules to work. Since it on a serial
interface, your devices are allready created (/dev/ttyS0 and /dev/ttyS1). In this case, lirc looks for /dev/lirc for the fifo, which you would need to symlink to
either ttyS0 or ttyS1 depending on which serial port you have it attatched to.

This makes things hard, as with a Hauppauge remote you can't symlink /dev/lirc/0 because /dev/lirc exists (even though it's a directory). If you have a serial type, there's no way to detect which tty you have your dongle attatched to. Even
creating a conf file to live in /etc/conf.d/ wouldn't work, as it would only
pass what device to use to lircd, helpful for Hauppauge people, but worthless for
PCTV people.

Homework for everyone is to go get loaded. I'm off to do mine. 
Comment 5 Ian Smith 2003-03-13 14:00:21 UTC
The fix does not work for me (syslog output follows).

Mar 13 18:57:01 metal kernel: lirc_dev: IR Remote Control driver registered, at major 61 
Mar 13 18:57:01 metal kernel: i2c-core.o: driver i2c ir driver registered.
Mar 13 18:57:01 metal kernel: lirc_i2c: chip found @ 0x1a (Hauppauge IR)
Mar 13 18:57:01 metal kernel: bttv0: i2c attach [client=Hauppauge IR,ok]
Mar 13 18:57:01 metal kernel: i2c-core.o: client [Hauppauge IR] registered to adapter [bt848 #0](pos. 2).
Mar 13 18:57:06 metal modprobe: modprobe: Can't locate module /dev/lircd

I am using:
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- --device=/dev/lirc/0
in /etc/init.d/lircd

57 $ lsmod
Module                  Size  Used by    Not tainted
lirc_i2c                3360   0  (unused)
lirc_dev                8400   1  [lirc_i2c]
btaudio                10924   1 
tvmixer                 3728   1 
tuner                  10112   1  (autoclean)
tvaudio                12860   0  (autoclean) (unused)
msp3400                16972   1  (autoclean)
bttv                   69888   3 
i2c-algo-bit            7560   1  [bttv]
i2c-core               13860   0  [lirc_i2c tvmixer tuner tvaudio msp3400 bttv i2c-algo-bit]


42 $ ll -R /dev/lirc*
srw-rw-rw-    1 root     root            0 2003-03-13 18:57 /dev/lircd=

/dev/lirc:
total 0
drwxr-xr-x    1 root     root            0 1970-01-01 01:00 ./
drwxr-xr-x    1 root     root            0 1970-01-01 01:00 ../
crw-rw-rw-    1 root     root      61,   0 1970-01-01 01:00 0

53 $ grep lirc /etc/modules.conf
### modules-update: start processing /etc/modules.d/lirc
alias char-major-61 lirc_i2c
### modules-update: end processing /etc/modules.d/lirc
Comment 6 Till Maas 2003-03-13 17:53:31 UTC
Ian's error is fixed with this /etc/modules.d/lirc 
 
# /etc/modules.d/lirc 
alias   char-major-61           lirc_i2c 
alias   /dev/lirc* lirc_i2c 
 
an runnig etc-update after editing the file. 
 
Comment 7 Matt Keadle 2003-05-09 17:07:36 UTC
*** Bug 17167 has been marked as a duplicate of this bug. ***
Comment 8 Matt Keadle 2003-05-09 17:07:59 UTC
*** Bug 13688 has been marked as a duplicate of this bug. ***
Comment 9 Matt Keadle 2003-05-09 17:13:28 UTC
just grouping all the lirc bugs together. i have a clear idea on what needs to be done with lirc, i'm just not sure of the best way to deal with it.

i'm aware of issues with init scripts existing or not existing, when they do exist they don't always reference the right device, and other problems.
Comment 10 Radek Podgorny 2003-05-09 18:31:58 UTC
OK, why don't you use the depend/block features of the whole bugzilla system?  The "duplicity hack" makes it a real mess... :-(
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2003-09-09 14:34:00 UTC
is this fixed ?
Comment 12 Radek Podgorny 2003-09-09 17:03:15 UTC
Me personally, I don't have any problems anymore since I've corrected all "bugs" by myself (to fit my needs). Anyway, it was a long time ago, so I can't help now...

I think you can close this bug (it's many bugs really) and people will start submitting new bugs when they encounter problems.

The first one will be (at least for me) that the LIRC ebuild does not work under the 2.6 kernels. I would very appreciate if you looked at the 2.6 patches and created an ebuild for them. Until then, I can't do any further testing... :-(

Radek
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2003-10-13 03:14:37 UTC
you can patch your 2.6-test7 kernel with a patch found on http://warderx.ath.cx:81/projects/projects.shtml.
then compile lirc-0.7_pre2 with a 2.4 kernel.
Comment 14 Tim Yamin (RETIRED) gentoo-dev 2003-10-15 05:29:12 UTC
Not-a-kernel-bug, resending to wranglers...
Comment 15 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-13 05:25:32 UTC
since i can't reproduce this error, i'll close it, please reopen if the problem still exists