You are not logged in.

#1 2011-04-09 04:21:51

akb825
Member
Registered: 2011-03-27
Posts: 81

lirc update from 4/5/11 may break your configuration. Here's the fix.

The lirc update on 4/5/11 may break your configuration due to two changes.

The first change was the legacy kernel modules (such as lirc_mceusb) have been removed, which means that the module that comes with the kernel (such as mceusb) will be used instead. With this module, the kernel will treat your remote as a keyboard by default, which causes lircd to fail to recognize remote input. An easy way to verify this is to run irw and see if it recognizes remote input.

To get the module to treat the input as something lirc can understand, you need to execute the following command as root:

echo lirc > /sys/class/rc/rc0/protocols

You may also put this in /etc/rc.local to run every time you boot. I have also emailed the developer of lirc about this, asking him to execute that command when lircd starts.

Note that since the kernel modules changed, you won't notice the problem after updating until you reload the modules or reboot.

The second change is the default provided lircd.conf file for mceusb (and possibly other remote types as well) has changed. They changed all the button names, so if you updated your lircd.conf file after upating, or include the default file in your lircd.conf file, your existing lircrc configuration will break. To fix this, copy the configuration file I posted on the wiki to your /etc/lircd.conf file.

I have documented both of these problems and fixes on the wiki at this page. (https://wiki.archlinux.org/index.php/LI … ed_working)

Offline

#2 2011-04-09 16:55:19

guisacouto
Member
From: Portugal
Registered: 2009-06-27
Posts: 107

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thank you soo much for this post!

I experienced this problem when I updated, and reported it has a bug in bugs.archlinux until someone told me that lirc-mceusb no long exists and it was on the kernel as mceusb. Loaded the module and everything was working just fine until last night, that started to recognize my remote as a keyboard again...

Now with the 'echo lirc > /sys/class/rc/rc0/protocols' its working just fine! Don't know why it didn't need this at first..

Thanks again, best regards!

Offline

#3 2011-04-09 20:50:36

banan
Member
Registered: 2010-03-01
Posts: 13

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Any idea why I don't have the folders rc/rc0 or the file protocols? in my /sys/class/ folder?

Offline

#4 2011-04-09 21:02:57

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

From what I can tell, loading your remote's kernel module (such as mceusb) will create the rc folder. Having your remote receiver plugged in will create a folder and contents for it. (such as rc0 for the first remote)  Also, at least for me, the module is automatically loaded when I boot with my receiver plugged in.

Offline

#5 2011-04-09 21:23:11

banan
Member
Registered: 2010-03-01
Posts: 13

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

akb825 wrote:

From what I can tell, loading your remote's kernel module (such as mceusb) will create the rc folder. Having your remote receiver plugged in will create a folder and contents for it. (such as rc0 for the first remote)  Also, at least for me, the module is automatically loaded when I boot with my receiver plugged in.

You are right smile

I made a silly mistake..

Offline

#6 2011-04-09 21:45:43

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

When trying this:

> sudo echo lirc > /sys/class/rc/rc0/protocols 
bash: /sys/class/rc/rc0/protocols: Permission denied

Same with "none +lirc". Using ls I can see there is /sys/class/rc/rc0/protocols. irw still showing no button presses sad

Offline

#7 2011-04-10 00:26:40

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

The problem is you can't redirect to a file using '>' with sudo, since sudo only gives you superuser permissions for the command, not the file redirection. One way to get around that is to use "su" to change to root. Another way is to execute the following command:

echo lirc | sudo tee /sys/class/rc/rc0/protocols

Offline

#8 2011-04-10 00:36:57

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thank you!!! That worked. Just tested remote, picked up buttons w/irw so ran XBMC and all buttons work as normal, whew wink Thanks a lot for your help!

Offline

#9 2011-04-10 04:17:59

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

The developer of lirc responded to my email, and said that executing that command should be the responsibility of the distribution's init scripts instead of within lircd itself. I reported a bug so this can be added to Arch's init scripts. (https://bugs.archlinux.org/index.php?do … k_id=23673) Once this is added to the lircd init script, it will no longer be  necessary to execute that command at startup.

Offline

#10 2011-04-10 14:45:14

plantoschka
Member
Registered: 2011-04-08
Posts: 9

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

The fix worked fine for me but after a reboot i always get an error message:

$echo lirc > /sys/class/rc/rc0/protocols
bash: echo: Schreibfehler: Das Argument ist ungültig.

In english: "Write Error: The argument is invalid."

$cat /sys/class/rc/rc0/protocols 
[builtin]

Last edited by plantoschka (2011-04-10 14:47:40)

Offline

#11 2011-04-10 18:34:17

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Make sure that your remote receiver is plugged in and the mceusb (or whatever module corresponds to your remote) is loaded before that command gets executed. If you're putting that command in rc.local to happen at boot time, the simplest way is to make sure that your remote receiver is always plugged in. If your remote receiver is plugged in, and for some reason it doesn't automatically load the module, you may have to put it in your MODULES array.

Offline

#12 2011-04-10 20:40:32

plantoschka
Member
Registered: 2011-04-08
Posts: 9

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

mceusb is in the MODULES array in rc.conf and lircd in daemons

The directional keys and the volume + play/pause keys are working perfectly fine so everything is all right. All other keys are not working.

Like i said after echoing lirc to "/sys/class/rc/rc0/protocols" it worked fine but after a reboot it stopped and i get the error 2 posts above.

Offline

#13 2011-04-11 06:52:01

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Since this command worked for me:

echo lirc | sudo tee /sys/class/rc/rc0/protocols

Do I put it in rc.local? And if so, as is or without the sudo?

Thanks!

Offline

#14 2011-04-11 07:03:10

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

without, there's no need for sudo there.

Offline

#15 2011-04-11 08:13:01

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

colbert wrote:

Since this command worked for me:

echo lirc | sudo tee /sys/class/rc/rc0/protocols

Do I put it in rc.local? And if so, as is or without the sudo?

Thanks!

Yes, you can put that in rc.local. (without sudo) Since rc.local is executed as root, you can also put my original command instead, though there really isn't any difference.

Offline

#16 2011-04-11 18:35:17

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thanks a lot smile smile

Offline

#17 2011-04-11 21:20:09

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thanks for this post. Unfortunately it doesn't seem to be working for me.

I upgraded the kernel and lirc last night -

[2011-04-11 20:56] upgraded kernel26 (2.6.37.5-1 -> 2.6.38.2-1)
...
[2011-04-11 20:56] upgraded lirc-utils (0.9.0.pre1-2 -> 1:0.9.0-2)
[2011-04-11 20:56] >>> Updating module dependencies. Please wait ...
[2011-04-11 20:56] upgraded lirc (0.9.0.pre1-4 -> 1:0.9.0-2)

With IRW there is no response at all to my remote keypresses.

I put echo lirc > /sys/class/rc/rc0/protocols in rc.local and replaced the contents of /etc/lircd.conf as suggested.

I am not sure whether to remove lirc-mceusb2 from my modules array in /etc/rc.conf but have booted with it in and out of the array and still get no response from irw.

A ps -ef | grep lirc gives -
root      2021     1  0 06:57 ?        00:00:00 /usr/sbin/lircd -d /dev/lirc0

(BTW My remote is working and the receiver is plugged into the pc and blinks red with keypresses on the remote).

What am I missing? Any help would be appreciated.

Thanks

belbo

Last edited by belbo (2011-04-11 21:29:56)

Offline

#18 2011-04-12 03:30:39

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

You should remove lirc-mceusb2 from your modules array, since that module is no longer present.

The mceusb module may not be loaded. You can see if it's loaded by executing the command:

lsmod | grep mceusb

If it's not loaded, there could be a couple reasons. First, check your modules array and see if you were disabling any lirc modules with your previous configuration. (if in doubt, you can post all the modules you're disabling) If so, then delete those entries. Even if you don't disable any lirc modules, it's possible that it isn't loading the module automatically for some reason, in which case you can add mceusb to your modules array.

If the mceusb module is loaded, then please post the output of the following command:

cat /sys/class/rc/rc0/protocols

Offline

#19 2011-04-12 03:53:53

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thanks for helping.

lsmod | grep mceusb gives -

mceusb                  9658  0
rc_core                12840  15 rc_rc6_mce,mceusb,dvb_usb_af9015,dvb_usb,rc_winfast,ir_lirc_codec,ir_sony_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_rc5_decoder,ir_nec_decoder,cx88xx
usbcore               113783  12 mceusb,usbhid,dvb_usb_af9015,dvb_usb,uvcvideo,usb_storage,uas,uhci_hcd,ohci_hcd,ehci_hcd,usblp

Presumably this means it is loaded?

cat /sys/class/rc/rc0/protocols gives no output.

I don't think I'm disabling any modules. My modules array in /etc/rc.conf (after removing lirc-mceusb2) is -

MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(powernow-k8 fuse usblp)

Any further help appreciated.

Cheers

Last edited by belbo (2011-04-12 03:55:43)

Offline

#20 2011-04-12 04:23:57

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

It looks like the mceusb module is loaded correctly, and as far as I can see your modules array should be fine. It's weird that the cat command provides no output, though. Can you post the output of the following commands?

ls -l /sys/class/rc/
ls -l /sys/class/rc/rc0/

(note: the trailing slashes are important in this case)

Unfortunately, since you upgraded the kernel at the same time, it could also be an issue with the kernel upgrade with no easy way to find out.

Last edited by akb825 (2011-04-12 04:25:35)

Offline

#21 2011-04-12 05:12:28

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thanks.

Output of: ls -l /sys/class/rc/ -

total 0
lrwxrwxrwx 1 root root 0 Apr 12 13:47 rc0 -> ../../devices/pci0000:00/0000:00:14.4/0000:03:06.0/rc/rc0
lrwxrwxrwx 1 root root 0 Apr 12 15:00 rc1 -> ../../devices/pci0000:00/0000:00:14.4/0000:03:07.2/usb3/3-1/rc/rc1
lrwxrwxrwx 1 root root 0 Apr 12 15:00 rc2 -> ../../devices/pci0000:00/0000:00:12.1/usb6/6-1/6-1:1.0/rc/rc2

ls -l /sys/class/rc/rc0/ -

total 0
lrwxrwxrwx 1 root root    0 Apr 12 15:01 device -> ../../../0000:03:06.0
drwxr-xr-x 6 root root    0 Apr 12 06:55 input3
drwxr-xr-x 2 root root    0 Apr 12 15:01 power
-rw-r--r-- 1 root root 4096 Apr 12 06:58 protocols
lrwxrwxrwx 1 root root    0 Apr 12 15:01 subsystem -> ../../../../../../class/rc
-rw-r--r-- 1 root root 4096 Apr 12 15:01 uevent

Fortunately I tarred my system partition prior to this upgrade - so I can get back to how things were if required. I'd prefer to fix it if possible though (as presumably the issue will arise some time in the future anyway).

Being noob to Arch I'm puzzled how one is 'meant' to upgrade. I thought it was best / standard practice to always -Suy and upgrade everything prior to installing any single new package (to avoid the risk of libraries getting out of date / conflicting) - hence why I got the new kernel (and woudl have thought everyone would be in the same boat). I thought the idea was to always be up to date with latest releases of all packages and kernels. Not so? How is one 'meant to do it' ?

Cheers

Offline

#22 2011-04-12 05:39:25

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Don't worry, you didn't do anything wrong. It's just that if anything goes wrong, it's easier to debug if fewer things change, but that doesn't mean you should upgrade every package individually. In this case, it's just bad luck that you happened to update and get this error on the same day the kernel update was released.

It looks like you have multiple remotes recognized by your computer, so you can try putting the following in your rc.local:

echo lirc > /sys/class/rc/rc0/protocols
echo lirc > /sys/class/rc/rc1/protocols
echo lirc > /sys/class/rc/rc2/protocols

Also, since you have multiple remotes in your /sys/class/rc directory, I'm wondering if you also have multiple lirc sockets. Can you post the output of this?

ls /dev/lirc*

Last edited by akb825 (2011-04-12 05:44:31)

Offline

#23 2011-04-12 05:48:18

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thanks. I'll be able to test the effect of the rc.local echo statements when I get home (at work at the moment).

ls /dev/lirc* gives -

/dev/lirc0
/dev/lircd

Offline

#24 2011-04-12 06:00:53

akb825
Member
Registered: 2011-03-27
Posts: 81

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Hm, that seems really weird. One guess is maybe your remote supports multiple protocols and is being recognized three times. (I'm assuming you only have one remote plugged in?) If after putting all three echos in rc.local results in each button pressed being processed multiple times, you might have to try them one at a time until you get one to work properly.

Offline

#25 2011-04-12 06:10:21

belbo
Member
From: Sydney, Australia
Registered: 2011-02-25
Posts: 51

Re: lirc update from 4/5/11 may break your configuration. Here's the fix.

Thanks. Will give the echo statements a go when I get home. I only have one remote receiver plugged in (Microsoft - came with this remote http://www.mythtv.org/wiki/File:MCE-Remote-2.jpg). I use a Logitech 525 but that simply emulates the MCE remote. I tested with the MCE remote and Logitech and the issue is the same with both - no response from irw.

I'm curious about the meaning and functionality of these echo statements (and the one presented as a solution in your op) if you're happy to explain.

Offline

Board footer

Powered by FluxBB