lirc needs an upstart init script

Bug #150480 reported by Björn Torkelsson
28
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: lirc

lirc should probably be started before gdm so that you can use the autologin feature of gdm and get a working lirc. Right now I have to restart gdm or logout/login to make lirc work on my dedicated mythtv machine.

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

Can you speak a little bit more to your startup process?
Are you using ubuntu-mythtv-frontend, or mythbuntu, or your own rolled automatic login setup?

Recently lirc had to be moved to later in the startup process to fix some items related to ALSA startup order, so moving it earlier would likely break that.

Changed in lirc:
status: New → Incomplete
Revision history for this message
Björn Torkelsson (torkel) wrote :

I'm using my own login setup, which has worked for me a few years now with only minor modifications. I didn't have time to try u-m-f and/or mythbuntu when I did the upgrade last week andbecause as far as I could tell both u-m-f and mythbuntu assumes that you have both a mouse and a keyboard attached to the machine. I only hace a remote attached to the machine and I am doing every change to the configuration remote.

My ~mythtv/.xsession looks like:

#!/bin/sh

#Set the background to black
xsetroot -solid black

/usr/bin/xset -dpms s off

#If we have mtd around (and not running), good idea to start it too
if ! `pgrep mtd>/dev/null`; then
    if [ -x /usr/bin/mtd ]; then
        /usr/bin/mtd -d
    fi
fi
#check if irexec is needed, and start if need be
if [ -x /usr/bin/irexec ] && [ ! -f ~/.noirexec ] && [ -f ~/.lircrc ]; then
    if [ -n "$(cat ~/.lircrc | grep --invert-match "#" | grep irexec | grep prog)" ]
    then
        killall irexec
        irexec -d
    fi
fi

export QT_XFT=1
while /bin/true; do
        mythfrontend
        #mythfrontend -v osd,important,playback,general
        sleep 10
done

Any suggestions how to make it work with lirc? (Without adding a sleep :-))

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 150480] Re: Lirc should start earlier

Björn,

Well actually neither u-m-f or mythbuntu *require* mouse and keyboard once
you are configured. Mythbuntu only needs it if mythfrontend happens to
quit.

u-m-f should have no need whatsoever for it. If mythfrontend crashes, it
restarts the gdm session automagically.

Perhaps instead the problem here is that gdm needs to wait for LIRC to
finish starting up before it's allowed to proceed, because there will always
be race conditions like this.

On 10/8/07, Björn Torkelsson <email address hidden> wrote:
>
> I'm using my own login setup, which has worked for me a few years now
> with only minor modifications. I didn't have time to try u-m-f and/or
> mythbuntu when I did the upgrade last week andbecause as far as I could
> tell both u-m-f and mythbuntu assumes that you have both a mouse and a
> keyboard attached to the machine. I only hace a remote attached to the
> machine and I am doing every change to the configuration remote.
>
> My ~mythtv/.xsession looks like:
>
> #!/bin/sh
>
> #Set the background to black
> xsetroot -solid black
>
> /usr/bin/xset -dpms s off
>
> #If we have mtd around (and not running), good idea to start it too
> if ! `pgrep mtd>/dev/null`; then
> if [ -x /usr/bin/mtd ]; then
> /usr/bin/mtd -d
> fi
> fi
> #check if irexec is needed, and start if need be
> if [ -x /usr/bin/irexec ] && [ ! -f ~/.noirexec ] && [ -f ~/.lircrc ];
> then
> if [ -n "$(cat ~/.lircrc | grep --invert-match "#" | grep irexec |
> grep prog)" ]
> then
> killall irexec
> irexec -d
> fi
> fi
>
> export QT_XFT=1
> while /bin/true; do
> mythfrontend
> #mythfrontend -v osd,important,playback,general
> sleep 10
> done
>
> Any suggestions how to make it work with lirc? (Without adding a sleep
> :-))
>
> --
> Lirc should start earlier
> https://bugs.launchpad.net/bugs/150480
> You received this bug notification because you are a member of MythTV
> Ubuntu Maintainers, which is a bug contact for lirc in ubuntu.
>

--
Mario Limonciello
<email address hidden>

Revision history for this message
Björn Torkelsson (torkel) wrote : Re: Lirc should start earlier

As it was an upgrade from feisty it was easier to switch back to my own startup-script than finding a mouse and keyboard :-)

Sure it have to wait until lirc is up and running. I just have to figure out what the best way to make sure lirc is running now :-)

You should be hit by it in u-m-f too shouldn't you?

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 150480] Re: Lirc should start earlier

Well, it's too late to resolve this for Gutsy. It doesn't appear to affect
people using ubuntu-mythtv-frontend or mythbuntu folks directly though. For
some reason or another, our startup process is lengthy enough that the condition
doesn't arise.

This does need to be resolved though, and the proper solution is likely to add
an upstart style init script that can properly resolve dependencies. That way
gdm/kdm don't come up until lirc finishes starting.

Changed in lirc:
importance: Undecided → Wishlist
status: Incomplete → Triaged
Revision history for this message
Mario Limonciello (superm1) wrote : Re: Lirc should start earlier

Deferring this until intrepid when more upstart style init scripts are prevalent.

Revision history for this message
Lior (lior) wrote :

Hi,
I've transformed the init.d script into 4 upstart jobs (attached). How do I send a patch?

Revision history for this message
Alec Leamas (leamas-alec) wrote :
Download full text (3.1 KiB)

This bug is old. The last release 0.9.4c addresses the issues here with a new systemd setup. It also ships updated sysV scripts, split into three services. Closiing

lirc (0.9.4b-0.1) experimental; urgency=medium

  * Non-maintainer upload.
  * First shot on major upstream updates.
    - Re-packaged from scratch based on new dh primitives.
    - Thanks for help on debian-mentors!
  * New upstream release 0.9.4
    - Release 0.9.1 .. 0.9.3 was never packaged.
    - Old 'lirc' service split into separate systemd services:
      lircd.service, lircmd.service and irexec.service.
    - Remote definitions moved out of lirc to new project
      lirc-remotes; affects large number of LP issues.
    - Builds also on FreeBSD 10.3.
    - Fixes "Not updated to last version" (Closes: #777199),
      LP: #1443590.
    - Fixes "Default device for mode2 is /dev/lirc" (Closes: #702140).
    - Fixes "/var/run/lirc contents disappear..." (Closes: #676343).
    - Fixes "lircrcd segfaults" (Closes: #780062).
    - Fixes "'/etc/init.d/lirc restart' is broken" (Closes: #782091).
    - Fixes "Prompting due to modified conffiles..." (Closes: #655969).
    - Fixes "LIRC installs bad udev rule" (Closes: #804397),
      users depending on this rule will need to explicitly start lircd.
    - Fixes "lirc init script can create circular symlinks", LP: #698007.
    - Fixes "Update Uploaders List (Closes: #762554).
    - Fixes "Please switch to libftdi1" (Closes: #810370).
    - Fixes LP: #153457 "iguanaIR support not functional".
    - Fixes LP: #460027 "using lirc init script restart function fails
      sometimes".
    - Fixes LP: #499588 "lirc udev rule causes unreliable startup".
    - Fixes LP: #567519 "lircd(8) mentions non-existent
      /dev/input/uinput".
    - Fixes LP: #1029604 "mce remote doesn't work due to out of date
      lircd.conf.devinput".
    - Fixes LP: #1312287 "lircd start problem".
  * The built-in irman support is moved to the lirc-drv-irman package.
  * Revised package structure: keep old liblircclient0 (renamed to
    liblirc-client0). Adding new packages liblirc0, liblirc-dev and
    lirc-doc. Former liblircclient-dev merged into new liblirc-dev.
  * Don't overwrite existing lircd.conf file.
  * Ship sysV scripts from the svn tree [Stefan Lippers-Hollmann]
  * Add handling of obsolete 0.9.0 udev rule restarting lircd
  * Old lircd output socket link /dev/lirc dropped. Use
    /var/run/lirc/lircd.
  * Updated copyright
  * Update compiler flags: -Wl,as-needed + hardening
    [Stefan Lippers-Hollmann]
  * Avoid negative architecture deps like [!hurd] (Closes: #634807)
    [Stefan Lippers-Hollmann]
  * Add patch 0007-tools-remove-configs-symlink.patch + explicit link
    to walk around #801719 (dh_python3 shortcomings).
  * Last parts of libirman dependencies removed.
  * Changing Vcs-* headers to point to upstream packaging branch.
  * Fixes existing large number of upgrade bugs.
  * Enhance hardening flags.
  * Add a lintian pbuilder test, this requires --hookdir and B92-test-pkg
    therein.
  * Tested (build-wise) on stretch and sid.

 -- Alec Leamas <email address hidden> Thu, 26 May 2016 11:14:25 +0100

lirc (0.9.0~pre1-1.2) unstable; ur...

Read more...

Changed in lirc (Ubuntu):
status: Triaged → 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.