disabling in-kernel support should be optional

Bug #1038371 reported by Joel Ebel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I have an Antec case with an iMon knob device, as well as a serial port IR receiver. The knob produces events, so I don't need lirc for it. I also use the imon device for lcdproc. I run lirc, solely to communicate with the serial IR device. The current lirc init script attempts to modify the imon device in /sys/class/rc/rc0/protocols. This is unnecessary, as I don't intend to use that device with lirc, and furthermore, for reasons unknown, it occasionally causes the computer to fail to shut down. I don't particularly care why echoing "none" to /sys/class/rc/rc0/protocols hangs occasionally, because it isn't an operation that needs to be done at all on my system. I can edit the init script to prevent this happening, but I'd much prefer for there to be an option in /etc/lirc/hardware.conf to prevent in-kernel support from being disabled while i run lirc, and re-enabled when I stop it.

Attached is a patch with a suggested method.

Tags: patch

Related branches

Revision history for this message
Joel Ebel (jbebel) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch to allow preventing the disabling of in-kernel ir support" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Colin Watson (cjwatson) wrote :

This patch is syntactically incorrect, which leads me to question how much it's been tested :-)

+ if [ -d /sys/class/rc -a "$DISABLE_KERNEL_SUPPORT" = "true"]; then

There's a missing space before the ] there. Also, I would generally advise avoiding the use of -a and -o inside [ ] as the rules are arcane and not as portable as you might hope. So I would write this as:

  if [ -d /sys/class/rc ] && [ "$DISABLE_KERNEL_SUPPORT" = true ]; then

Also, all changes need to be made in the development release (currently quantal) first. If they meet the criteria in https://wiki.ubuntu.com/StableReleaseUpdates, you can then work through those to apply the patch to precise.

Revision history for this message
Joel Ebel (jbebel) wrote :

Here's a new patch I've tested against Oneiric.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

In addition to the fact that the debdiff is reversed, it changes the default behavior of the initscript. Specifically, this line:
if [ -d /sys/class/rc ] && [ "$DISABLE_KERNEL_SUPPORT" = "true" ]; then

'"$DISABLE_KERNEL_SUPPORT" = "true"' won't ever succeed because hardware.conf doesn't set DISABLE_KERNEL_SUPPORT at all:
#DISABLE_KERNEL_SUPPORT="true"

I think you intended for that to be uncommented to preserve the old behavior. Can you please confirm and provide an updated debdiff?

Changed in lirc (Ubuntu):
status: New → Incomplete
Revision history for this message
Joel Ebel (jbebel) wrote :

Here it is in the proper order. Including DISABLE_KERNEL_SUPPORT in hardware.conf isn't required because lirc.init.d includes DISABLE_KERNEL_SUPPORT=true on line 112. That way there will be no changes if upgraders choose to not get the new hardware.conf. If you prefer to leave DISABLE_KERNEL_SUPPORT="true" uncommented in hardware.conf, I can, but it won't change the behavior.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Oh, I missed that (though I'm not sure how since I looked for it and it is right there in the patch... oh well :).

ACK. Thanks! :)

Changed in lirc (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
lirc (0.9.0-0ubuntu3) quantal; urgency=low

  * Add an option to prevent disabling in-kernel IR device support while lirc
    is running (LP: #1038371)
 -- Joel Ebel <email address hidden> Mon, 17 Sep 2012 12:02:34 -0400

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

Other bug subscribers

Remote bug watches

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