Merge lp:~jooooooon/ubuntu/lucid/lirc/lucid-fix-567512 into lp:ubuntu/lucid-proposed/lirc

Proposed by Jonathan Clarke
Status: Approved
Approved by: Benjamin Drung
Approved revision: 41
Proposed branch: lp:~jooooooon/ubuntu/lucid/lirc/lucid-fix-567512
Merge into: lp:ubuntu/lucid-proposed/lirc
Diff against target: 56 lines (+36/-0)
3 files modified
debian/changelog (+11/-0)
debian/patches/series (+1/-0)
debian/patches/uinput-send-syn.patch (+24/-0)
To merge this branch: bzr merge lp:~jooooooon/ubuntu/lucid/lirc/lucid-fix-567512
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+34837@code.launchpad.net

Description of the change

Fix bug where remote button presses are passed to uinput to be handled as standard key presses in X, but are ignored until lircd is stopped or restarted (LP: #567512).

This change simply applies upstream patch d987ce9c68239f637dddb9de9f9668f6e8f9fc1d to restore passing of events to uinput. This patch is present in the next version, currently in maverick.

This can be tested by setting up lirc, using an appropriate /etc/lirc/lircd.conf for your remote controller (examples in /usr/share/lirc/remotes), and setting in /etc/lirc/hardware.conf:
REMOTE_MODULES="uinput"
REMOTE_LIRCD_ARGS="--uinput"

After restarting lirc, button presses on the remote should be passed via uinput and interpreted as key strokes (ie, a Play/Pause button or Volume Up/Down buttons will behave as if the equivalent key was pressed on a multimedia keyboard).

However, before this fix, button presses have no effect. After pressing buttons, with no effect, stop lirc, and all presses will suddenly take effect.

With this fix, button presses take effect immediately.

To post a comment you must log in.

Unmerged revisions

41. By Jonathan Clarke

* Fix bug where remote button presses are passed to uinput to be handled as
  standard key presses in X, but are ignored until lircd is stopped or
  restarted (LP: #567512).
  - debian/patches/uinput-send-syn.patch: Apply upstream patch
    d987ce9c68239f637dddb9de9f9668f6e8f9fc1d to restore passing of events to
    uinput.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-05-09 00:00:50 +0000
3+++ debian/changelog 2010-09-08 07:48:46 +0000
4@@ -1,3 +1,14 @@
5+lirc (0.8.6-0ubuntu4.2) lucid-proposed; urgency=low
6+
7+ * Fix bug where remote button presses are passed to uinput to be handled as
8+ standard key presses in X, but are ignored until lircd is stopped or
9+ restarted (LP: #567512).
10+ - debian/patches/uinput-send-syn.patch: Apply upstream patch
11+ d987ce9c68239f637dddb9de9f9668f6e8f9fc1d to restore passing of events to
12+ uinput.
13+
14+ -- Jonathan Clarke <jonathan.clarke@normation.com> Wed, 08 Sep 2010 07:57:50 +0200
15+
16 lirc (0.8.6-0ubuntu4.1) lucid-proposed; urgency=low
17
18 * Add hauppauge-tv-card.patch to fix detection of Hauppauge TV Card as
19
20=== modified file 'debian/patches/series'
21--- debian/patches/series 2010-05-09 00:00:50 +0000
22+++ debian/patches/series 2010-09-08 07:48:46 +0000
23@@ -4,3 +4,4 @@
24 lirc_dev-2.6.33.patch
25 appleir_repeat_issue.patch
26 hauppauge-tv-card.patch
27+uinput-send-syn.patch
28
29=== added file 'debian/patches/uinput-send-syn.patch'
30--- debian/patches/uinput-send-syn.patch 1970-01-01 00:00:00 +0000
31+++ debian/patches/uinput-send-syn.patch 2010-09-08 07:48:46 +0000
32@@ -0,0 +1,24 @@
33+## Description: When forwarding button presses to uinput, it is now necessary
34+## to send a "SYN" message after each keypress.
35+## Origin/Author: Upstream LIRC project, commit d987ce9c68239f637dddb9de9f9668f6e8f9fc1d
36+## Bug: https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/567512
37+--- a/daemons/lircd.c 2009-12-30 14:37:13.000000000 -0600
38++++ b/daemons/lircd.c 2009-12-30 14:39:42.000000000 -0600
39+@@ -1909,6 +1909,17 @@
40+ logprintf(LOG_ERR, "writing to uinput failed");
41+ logperror(LOG_ERR, NULL);
42+ }
43++
44++ /* Need to write sync event */
45++ memset(&event, 0, sizeof(event));
46++ event.type = EV_SYN;
47++ event.code = SYN_REPORT;
48++ event.value = 0;
49++ if(write(uinputfd, &event, sizeof(event)) != sizeof(event))
50++ {
51++ logprintf(LOG_ERR, "writing EV_SYN to uinput failed");
52++ logperror(LOG_ERR, NULL);
53++ }
54+ }
55+ }
56+ #endif

Subscribers

People subscribed via source and target branches

to all changes: