Most recent kernel where this bug did not occur: unknown Distribution: Xubuntu Hardware Environment: x86 system, Leadtek TV2000 XP Expert TV tuner card Software Environment: Xubuntu default + lirc Problem Description: I'm using an Winfast TV2000XP Expert tuner card. I configured the remote control to work with lirc, with the dev/input driver. And although it does work, I sometimes have to press a key on the remote control 7 times before it actually does what it was supposed to do. Usually it will do what it's supposed to do after 2 or 3 key presses, but that's still too much. I used to use Slackware, and recompile the kernel myself. I found that there was a problem in the cx88-input.c file, where if a key release event was received without a prior key press event, nothing would happen. That would typically be ok, except that quite a significant percentage of the events were key release events without a matching key press event. So I patched the file to treat that as a key press and release event, at the same time. Details of the patch can be found here: http://lists-archives.org/video4linux/16875-fwd-cx88-ir-issue.html - that made the remote control work ok, as long as you didn't repeatedly press the same button. That still didn't work ok, and I didn't figure that out yet. But because I no longer have time to compile stuff from source and troubleshoot little things I am considering switching to Ubuntu or Fedora. Interestingly enough, in Fedora 7, with kernel 2.6.22-65.fc7, the remote control works perfectly fine (as it did in every version of Windows I ever used). I suspect one of the kernel patches they incorporate into the kernel gets the job done, and although I looked through them, I didn't manage to identify exactly which one is responsible for fixing this problem. Steps to reproduce: Just install Ubuntu and lirc and start lirc with the devinput driver. Then start irw, and press remote control buttons.
It would be best if you tried current kernel such as recent git, this way you get most upstream patches, especially if you know that it's been fixed upstream.
I tried the latest kernel a couple of times, most recently in December 2007. I'll try it again now, and post the results asap - most likely in a couple of days.
Just tried the kernel that is shipped with Ubuntu 8.04 Alpha, it's no good. ~# uname -r 2.6.24-7-generic I'll get the latest git version as soon as posssible and post the results here. Adrian
Kernel 2.6.24.1 released 2 days ago has the same issue. ~# uname -r 2.6.24.1 Should I still try the git version?
As of yesterday, June 22nd 2008, with kernels 2.6.24-19-generic (shipped with Ubuntu) and 2.6.25.7 (vanilla), the problem is still present.
I bumped up the kernel version number as this has been confirmed also on 2.6.26 and 2.6.27.
FWIW, I seem to recall that the value of HZ matters, namely, at HZ=1000 the remote control works OK but with lower values of HZ it doesn't. Which doesn't make it a non-bug, it really should work regardless of the value of HZ, but it may explain the difference between tested kernels, and help reproduce the bug.
I have solved this problem using high resolution timers, I have submitted the patch to http://www.mail-archive.com/linux-media@vger.kernel.org/msg05636.html .
Will this be included in the final version of 2.6.30? I am very interested in testing it.
Ok, I have patched the cx88-input.c file manually for 2.6.30-rc7 and I can confirm it works flawlessly. It took a couple of years, but it's finally done. :) As far as I am concerned, the bug can be closed if the patch makes it into the mainline kernel.
Andrzej, can you please attach your patch to this bug? I would like to test it but copy-and-pasting from web archives never works.
Created attachment 21604 [details] High resolution timer for Remote Controls
Comment on attachment 21604 [details] High resolution timer for Remote Controls Patch against changeset 315bc4b65b4f of http://linuxtv.org/hg/v4l-dvb mercurial repo.
Patch tested successfully on top of kernel 2.6.30-rc7. I've also reviewed it and it looks OK to me, except for two long lines which should be folded. Then you can add: Acked-by: Jean Delvare <khali@linux-fr.org> Let's push this upstream quickly.
Created attachment 21632 [details] cx88: High resolution timer for Remote Controls Patch against changeset 315bc4b65b4f of http://linuxtv.org/hg/v4l-dvb mercurial repo. Signed-off-by: Andrzej Hajda <andrzej.hajda@wp.pl> Acked-by: Jean Delvare <khali@linux-fr.org>
Did you resend this patch to the V4L/DVB maintainers? I would like to have this fix in kernel 2.6.31, which doesn't leave us much time.
I did not know it should be resend. But I have just sent it on the list.
For reference: the patch has been committed to the v4l-dvb tree.
Fixed in kernel 2.6.32.