Ubuntu, lirc and the Antec Black Fusion (15c2:0038)
After getting my Antec Black Fusion, I just couldn’t get it to work in Ubuntu with lirc 0.8.4a, so I went ahead and created some simple packages for lirc 0.8.5pre1 which do appear to work with this case / device.
Notice: Please note in preparing these lirc 0.8.5pre1 packages I’ve dropped a fair few of the Ubuntu specific enhancements to lirc since this is intended as a fix solely for adding support for this device. Debdiffs welcome. 😉
Firstly add my repository key to apt so that the packages authenticate:
$ wget -O - http://packages.kennynet.co.uk/repository.key | sudo apt-key add -
(note: trailing dash)
Next grab the sources.list entries for my repository so you can download the 0.8.5pre1 packages:
$ sudo wget -O /etc/apt/sources.list.d/kennynet-testing.list http://packages.kennynet.co.uk/intrepid-testing.list
Now we’re ready to install the packages as follows:
$ sudo apt-get update $ sudo apt-get install lirc lirc-modules-source
With these packages installed, you only need the following line in /etc/lircd.conf:-
include "/usr/share/lirc/remotes/imon/lircd.conf.imon-antec-veris"
I’ve also made a custom (somewhat hacky) startup script which’ll launch the required two lircd daemons for the two lirc devices created under /dev.
You can download the script here, just put it in /etc/init.d/: lirc-imon
Now make it executable and set it to run on startup:
$ sudo chmod +x /etc/init.d/lirc-imon $ sudo update-rc.d -f lirc remove $ sudo update-rc.d lirc-imon defaults 51
This’ll disable the default lirc init.d script and enable the lirc-imon one that I’ve created.
From then on I’d make sure it’s loaded the new modules / started lirc as follows then test it out using irw:-
$ sudo /etc/init.d/lirc stop $ sudo modprobe -r lirc_dev lirc_imon $ sudo /etc/init.d/lirc-imon start $ irw
Press some buttons, they should now show up.
All works for me, let me know how it goes… there are numerous debug steps at each stage if it doesn’t work but I’ve left these out to try and keep the e-mail relatively short. We can go through those if you still experience problems. Please leave comments if you have any questions.
I’ll package the very latest imonlcd patch for lcdproc and upload that to my testing repositories soon and make another quick post.
Btw, I’m using kubuntu 9.04 (which I suppose is the same as ubuntu 9.04), if that makes a difference.
@filigran
I get the impression that your lircd.conf file has other lines in it as well as the include line, please change it so that it only contains that include line and reboot / restart lirc (/etc/init.d/lirc-imon restart) and try irw again.
Failing that, show me “ps -ef | grep -i lirc”.
AS for LCDproc that appears to be working fine and it’s up to you to configure it in your application, e.g. mythtv.
Hope this helps and reply with any questions / progress. 🙂
I removed all the lines in the lircd.conf except the include line, which were only comments, and rebooted, this is immediately after reboot:
mediasmurf@mediasmurf:~$ irw
01000000000002ee 00 KEY_VOLUMEDOWN Antec_Veris_Premiere
00010000000002ee 04 KEY_VOLUMEUP Antec_Veris_Premiere
^C
mediasmurf@mediasmurf:~$
The knob reacts, but nothing from the buttons.
“ps -ef | grep -i lirc” gives me:
mediasmurf@mediasmurf:~$ ps -ef | grep -i lirc
root 1598 1 0 15:30 ? 00:00:00 /usr/sbin/lircd –device=/dev/lirc0
root 2997 1 0 15:30 ? 00:00:00 /usr/sbin/lircd –driver=default –device=/dev/lirc0 –pidfile=/var/run/lirc0.pid –listen=8765
root 2999 1 0 15:30 ? 00:00:01 /usr/sbin/lircd –driver=default –device=/dev/lirc1 –pidfile=/var/run/lirc1.pid –output=/dev/lircd –connect=localhost 8765
1000 3570 3515 0 15:34 pts/1 00:00:00 grep -i lirc
mediasmurf@mediasmurf:~$
I played around for a bit, and found this:
1. Killing LCDd doesn’t affect lirc (expected)
mediasmurf@mediasmurf:~$ sudo /etc/init.d/LCDd stop
Stopping LCDd: LCDd.
mediasmurf@mediasmurf:~$ ps -ef | grep -i lirc
root 1598 1 0 15:30 ? 00:00:00 /usr/sbin/lircd –device=/dev/lirc0
root 2997 1 0 15:30 ? 00:00:00 /usr/sbin/lircd –driver=default –device=/dev/lirc0 –pidfile=/var/run/lirc0.pid –listen=8765
root 2999 1 0 15:30 ? 00:00:02 /usr/sbin/lircd –driver=default –device=/dev/lirc1 –pidfile=/var/run/lirc1.pid –output=/dev/lircd –connect=localhost 8765
1000 3583 3515 0 15:35 pts/1 00:00:00 grep -i lirc
mediasmurf@mediasmurf:~$ irw
01000000000002ee 00 KEY_VOLUMEDOWN Antec_Veris_Premiere
00010000000002ee 00 KEY_VOLUMEUP Antec_Veris_Premiere
^C
2. Killing lirc, irw doesn’t work and the processes go away and the modules get unloaded (also expected)
mediasmurf@mediasmurf:~$ sudo /etc/init.d/lirc-imon stop
Stopping lirc-imon…done.
mediasmurf@mediasmurf:~$ irw
connect: Connection refused
mediasmurf@mediasmurf:~$ ps -ef | grep -i lirc
1000 3621 3515 0 15:36 pts/1 00:00:00 grep -i lirc
mediasmurf@mediasmurf:~$ lsmod | grep -i lirc
3. Starting lirc back up, only one process is found (is this expected?)
mediasmurf@mediasmurf:~$ sudo /etc/init.d/lirc-imon start
Starting lirc-imon…done.
mediasmurf@mediasmurf:~$ ps -ef | grep -i lirc
root 3693 1 0 15:36 ? 00:00:00 /usr/sbin/lircd –device=/dev/lirc0
1000 3695 3515 0 15:36 pts/1 00:00:00 grep -i lirc
mediasmurf@mediasmurf:~$
4. Starting LCDd back up, still only one process (is this expected?):
mediasmurf@mediasmurf:~$ sudo /etc/init.d/LCDd start
Starting LCDd: LCDd.
mediasmurf@mediasmurf:~$ ps -ef | grep -i lirc
root 3693 1 0 15:36 ? 00:00:00 /usr/sbin/lircd –device=/dev/lirc0
1000 3707 3515 0 15:39 pts/1 00:00:00 grep -i lirc
mediasmurf@mediasmurf:~$
5. Running irw, now the knob doesn’t react (probably since there is only one process?)
mediasmurf@mediasmurf:~$ irw
^C
mediasmurf@mediasmurf:~$
6. Restarting lirc, with LCDd still running (hence the FATAL warning), the process get started:
mediasmurf@mediasmurf:~$ sudo /etc/init.d/lirc-imon restart
Stopping lirc-imon…FATAL: Module lirc_imon is in use.
done.
Starting lirc-imon…done.
mediasmurf@mediasmurf:~$ ps -ef | grep -i lirc
root 3693 1 0 15:36 ? 00:00:00 /usr/sbin/lircd –device=/dev/lirc0
root 3893 1 0 15:41 ? 00:00:00 /usr/sbin/lircd –driver=default –device=/dev/lirc0 –pidfile=/var/run/lirc0.pid –listen=8765
root 3895 1 0 15:41 ? 00:00:00 /usr/sbin/lircd –driver=default –device=/dev/lirc1 –pidfile=/var/run/lirc1.pid –output=/dev/lircd –connect=localhost 8765
1000 3897 3515 0 15:41 pts/1 00:00:00 grep -i lirc
mediasmurf@mediasmurf:~$
7. And, as expected, the knob works:
mediasmurf@mediasmurf:~$ irw
01000000000002ee 00 KEY_VOLUMEDOWN Antec_Veris_Premiere
00010000000002ee 00 KEY_VOLUMEUP Antec_Veris_Premiere
^C
mediasmurf@mediasmurf:~$
Is all this expected behavior? Or should lirc start all three processes from the beginning, or atleast when LCDd is started? Or is LCDd supposed to be required to start first, to get lirc to start all its processes?
The bottom line is, the knob works when I boot up, but the buttons don’t, and they wont fire any events even after removing the lines. Any more suggestions? 🙂
Perhaps I have some paths wrong, so it’s looking in the wrong place? Seems unlikely since the knob is working, and the LCD is working (I suppose, haven’t really tested it).
Also, could this all be due to a hardware/wiring issue?
I have an antec fusion remote silver/black (http://www.antec.com/Believe_it/product.php?id=NzE3), and the first time I tried to fix this I followed another guide (http://www.avenard.org/media/Patches_&_Add-Ons/Entries/2009/4/10_LIRC_to_work_with_Antec_Fusion_Remote_Black_%28jaunty%29.html) and got the remote working (irw gave me output, never tried the knob though), but then did some fiddling inside the case, trying to get the remote to start the system, and haven’t gotten it working inside ubuntu/kubuntu after that. I can power up/down the system though, and therefore I know the IR and remote is working.
Arr, I’m all out of ideas here.
Atleast I got the LCD displaying system info (however it doesn’t look the way I want it, probably ’cause the display is so friggin small (actually, the display isn’t but the part that is used is)). Some progress, atleast. 🙂
@filigran
I want to suggest something really brain-dead so my apologies in advance, but can you / have you tried changing the batteries in the remote? just incase….
Although you did say the power button works…. hm….well, nothing to lose in trying still I guess. Will have a think and see if something springs to mind.
Yep, tried it, didn’t work. :/
Hi Kenny,
Is your patch required for karmic still? If so, do you plan to make a package for that as well?
Thanks,
/klaus
@Klaus Agnoletti
Nope. karmic has lirc 0.8.5 so it should work just fine.
Some more words about karmic…
1. lirc 0.8.5 does indeed work fine although it either overwrote my lircd.conf or I didn’t notice and told it to, either way, restore your old one with the include line in and it’ll be fine.
2. lcdproc has been updated and it’ll overwrite my patched jaunty package, I’m in the process of testing a new lcdproc 0.5.3 package which includes support for this case (out of the box, as it were) – I’ll release that in a separate blog post before karmic is released (assuming it works, or I’ll re-patch the karmic 0.5.2 version).
Karmic is now shipping with lcdproc 0.5.3 so no custom package or repository will be required.
About all you’ll need now is the custom lirc-imon init.d script and everything should just work…
Once lirc gets bumped to something newer than 0.8.5 you won’t even need the custom script. 🙂