Can't start lirc: "lircd: can't open or create /var/run/lirc/lircd.pid"

Bug #474701 reported by Edgardo Fredz
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
lirc (Arch Linux)
New
Undecided
Unassigned
lirc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: lirc

I have a Lifeview Flyvideo 2000 tv card and I got it to work, but lirc refuses to work with the remote control.

lspci:
01:07.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)

dmesg:
[ 19.201635] input: saa7134 IR (LifeView/Typhoon Fl as /devices/pci0000:00/0000:00:09.0/0000:01:07.0/input/input5

cat /proc/bus/input/devices:
I: Bus=0001 Vendor=5169 Product=0138 Version=0001
N: Name="saa7134 IR (LifeView/Typhoon Fl"
P: Phys=pci-0000:01:07.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:09.0/0000:01:07.0/input/input5
U: Uniq=
H: Handlers=kbd event5
B: EV=100003
B: KEY=c0304 390000 0 0 0 0 0 0 c0000002 1e0000 0 0 10000ffc

And the remote worked when I did this: irrecord -H dev/input -d /dev/input/eventX /tmp/my-remote

Now when I try to start lirc, I get this:
$ sudo lircd -H dev/input -d /dev/input/event5
lircd: can't open or create /var/run/lirc/lircd.pid
lircd: No such file or directory

ProblemType: Bug
Architecture: i386
Date: Wed Nov 4 17:40:58 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: lirc 0.8.6-0ubuntu2
ProcEnviron:
 LANG=es_CL.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48+ureadahead2-generic
SourcePackage: lirc
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Edgardo Fredz (edgardo-fredz) wrote :
Revision history for this message
harvest316 (harvest316) wrote :

Same, but different hardware. Caused by karmic upgrade.

$ sudo mkdir /var/run/lirc
$ sudo /usr/sbin/lircd -H devinput -d /dev/input/remote -n
lircd-0.8.6[10876]: config file contains no valid remote control definition
lircd-0.8.6[10876]: lircd(devinput) ready, using /var/run/lirc/lircd

Revision history for this message
harvest316 (harvest316) wrote :

/etc/lircd.conf was empty, so...
$ sudo mv /etc/lirc/lircd.conf.dpkg-old /etc/lirc/lircd.conf
$ sudo mv /etc/lirc/hardware.conf.old /etc/lirc/hardware.conf
$ sudo service lirc start
...and Bob's your uncle!

Some explanation at http://bugs.archlinux.org/task/16704

Changed in lirc (Ubuntu):
status: New → Confirmed
Revision history for this message
harvest316 (harvest316) wrote :

I guess it's still a bug, coz the upgrade path wasnt as smooth as it should be.

Revision history for this message
MarcRandolph (mrand) wrote :

There definitely seems to be something amiss here. Bug #480555 has a brute force work-around (he added the following code to /etc/rc.local before final exit 0):

if [ ! -d /var/run/lirc ]; then
        sudo mkdir /var/run/lirc
        sudo ln -s /dev/lircd /var/run/lirc/lircd
fi

Changed in lirc (Ubuntu):
importance: Undecided → Medium
Revision history for this message
MarcRandolph (mrand) wrote :

To those of you that have encountered this, please report back here if your hardware.conf file has START_LIRCD="true" or not.

Revision history for this message
Dave Hope (dave-davehope) wrote :

Hi Marc,

[ dave@mediapc /etc/lirc ]$ cat hardware.conf | grep START_LIRC
START_LIRCD="true"
#START_LIRCMD="false"
START_LIRCMD=""

Thanks

Dave

Revision history for this message
gogloid (tomas-brukner) wrote :

Hi Marc,
I am the author of the bug with brute force work-around, and on my computer the command ends up with this:

tomas@Amelie:~$ cat /etc/lirc/hardware.conf | grep START_LIRC
START_LIRCD="false"
#START_LIRCMD="false"
START_LIRCMD=""

If it is necessary, I can try to change it to "true", disable the work-around and see if it would work.

Tomas

Revision history for this message
MarcRandolph (mrand) wrote : Re: [Mythbuntu-bugs] [Bug 474701] Re: Can't start lirc: "lircd: can't open or create /var/run/lirc/lircd.pid"

Howdy Thomas,

Yes, please do try "true" and disabling the "brute force". If that
resolves the issue for you, obviously it still needs to be understood
how or why it got set to false. On the assumption it does help, the
first suspect in your case is likely going to be btlirc - any chance
you could try to recreate the steps you took? Or at least document in
this bug as best you can remember?

Revision history for this message
gogloid (tomas-brukner) wrote :

Hello,
I have tried to change the value of START_LIRCD to true and the result was following (on Ubuntu 10.04.1, after reboot):

The folder /var/run/lirc was created, but lircd.pid in it was not created. That meant that it was not working and even my workaround was not working (because it tests only for the existence of folder).

In the end I reversed all my changes (START_LIRCD=false and I made the workaround functional again) and it works.

Tomas

Revision history for this message
Mario Limonciello (superm1) wrote :

I see two potential areas that might be causing this.

Please undo the current hacks (and set START_LIRCD to true) and try these (one at a time):

1) The udev rules for LIRC. Can you please try to comment them out (they're in /lib/udev/rules.d) and reboot?
2) The upstart job mount-varrun is racing with the init script. Try adding a sleep statement at the beginning of the init script for a few second and see if that helps. This isn't a proper solution, but if it fixes it then switching to an upstart drop will help.

Revision history for this message
Comm (alec-christie) wrote :

@ Mario,

Following upgrade to Maverick I am getting this issue. In an attempt to help out I tried your suggestions - I have START_LIRCD="true".

1) this does not seem to fix it, same error occurs
2) Not sure how to do this?

Revision history for this message
Mario Limonciello (superm1) wrote :

Hi Comm:

Thanks for trying <1> already. For <2>:
Open up /etc/init.d/lirc. Find the part of the script that spawns lircd
(around line 152 or so). Just add a "sleep 5" before that. (no quotes)

On Mon, Oct 18, 2010 at 04:58, Comm <email address hidden> wrote:

> @ Mario,
>
> Following upgrade to Maverick I am getting this issue. In an attempt to
> help out I tried your suggestions - I have START_LIRCD="true".
>
> 1) this does not seem to fix it, same error occurs
> 2) Not sure how to do this?
>
> --
> Can't start lirc: "lircd: can't open or create /var/run/lirc/lircd.pid"
> https://bugs.launchpad.net/bugs/474701
> You received this bug notification because you are a member of Mythbuntu
> Bug Team, which is subscribed to lirc in ubuntu.
>
> Status in “lirc” package in Ubuntu: Confirmed
> Status in “lirc” package in Arch Linux: New
>
> Bug description:
> Binary package hint: lirc
>
> I have a Lifeview Flyvideo 2000 tv card and I got it to work, but lirc
> refuses to work with the remote control.
>
> lspci:
> 01:07.0 Multimedia controller: Philips Semiconductors SAA7130 Video
> Broadcast Decoder (rev 01)
>
> dmesg:
> [ 19.201635] input: saa7134 IR (LifeView/Typhoon Fl as
> /devices/pci0000:00/0000:00:09.0/0000:01:07.0/input/input5
>
> cat /proc/bus/input/devices:
> I: Bus=0001 Vendor=5169 Product=0138 Version=0001
> N: Name="saa7134 IR (LifeView/Typhoon Fl"
> P: Phys=pci-0000:01:07.0/ir0
> S: Sysfs=/devices/pci0000:00/0000:00:09.0/0000:01:07.0/input/input5
> U: Uniq=
> H: Handlers=kbd event5
> B: EV=100003
> B: KEY=c0304 390000 0 0 0 0 0 0 c0000002 1e0000 0 0 10000ffc
>
>
> And the remote worked when I did this: irrecord -H dev/input -d
> /dev/input/eventX /tmp/my-remote
>
> Now when I try to start lirc, I get this:
> $ sudo lircd -H dev/input -d /dev/input/event5
> lircd: can't open or create /var/run/lirc/lircd.pid
> lircd: No such file or directory
>
> ProblemType: Bug
> Architecture: i386
> Date: Wed Nov 4 17:40:58 2009
> DistroRelease: Ubuntu 9.10
> NonfreeKernelModules: nvidia
> Package: lirc 0.8.6-0ubuntu2
> ProcEnviron:
> LANG=es_CL.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-14.48+ureadahead2-generic
> SourcePackage: lirc
> Uname: Linux 2.6.31-14-generic i686
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~mythbuntu-bugs
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~mythbuntu-bugs
> More help : https://help.launchpad.net/ListHelp
>

--
Mario Limonciello
<email address hidden>

Revision history for this message
Comm (alec-christie) wrote :

Mario:

Apart from (as expected) delay boot-up, I am still getting the same error. I tried it with "sleep 50" as well, but this made no difference again.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lirc - 0.9.0-0ubuntu5

---------------
lirc (0.9.0-0ubuntu5) trusty; urgency=medium

  * debian/lirc.postinst, debian/lirc.templates, debian/po: drop a number of
    debconf templates that are no longer being prompted for at all due to
    the dropping of the lirc-modules-source package and the lirc.config some
    time ago.
  * debian/lirc.postinst: clean up the remaining debconf handling to not
    override settings in /etc/lirc/hardware.conf.
  * debian/lirc.postinst: drop code for removing /var/log/lircd, which has
    been gone for more than a decade.
  * fix blacklist handling, which creates files not used by modprobe, and
    doesn't put all the contents in a single file.
  * drop obsolete Ubuntu migration code that dates from jaunty and lucid.
  * fix a bug that causes transmitter device/driver settings to always be
    cleared on config change.
  * Adjust lircd handling for multiple devices so that events for all of
    them will appear on /dev/lircd as intended. Thanks to Joel Ebel for
    the patch. LP: #697999.
  * Use /run/lirc, the canonical name for /var/run/lirc. LP: #474701.
  * Fix the init script to not report failures when stopping an
    already-stopped daemon.
 -- Steve Langasek <email address hidden> Sun, 16 Mar 2014 05:35:47 -0700

Changed in lirc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.