<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 26, 2015 at 7:19 PM, Hika van den Hoven <span dir="ltr"><<a href="mailto:hikavdh@gmail.com" target="_blank">hikavdh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hoi Hika,<br>
<div><div class="h5"><br>
Wednesday, May 27, 2015, 12:57:59 AM, you wrote:<br>
<br>
> Hoi Jerry,<br>
<br>
> Wednesday, May 27, 2015, 12:51:01 AM, you wrote:<br>
<br>
>> I have not changed a thing except for adding this non-working udev rule.<br>
>> Everything worked fine until this afternoon.<br>
<br>
>> Other than that, every service seems to be working on the new install.  I'm<br>
>> watching comedy central on live tv at the moment.  I had a bit of an issue<br>
>> with rpmfusion's nVidia drivers (no 22 rpms for the new kernel) but I<br>
>> solved that by installing the Fedora 21 akmod-nvidia-340xx rpms, in case<br>
>> anyone else has issues.  I should have switched to akmod a long time ago.<br>
<br>
>> Ok, on to lirc:<br>
<br>
>> [root@htpc ~]# ls -l /dev/lirc0<br>
>> crw------- 1 root root 246, 0 May 26 18:17 /dev/lirc0<br>
>> [root@htpc ~]# more /etc/udev/rules.d/10-lirc.rules<br>
>> KERNEL=="lirc0", NAME=="lirc0", GROUP="root", MODE=="0777"<br>
>> [root@htpc ~]#<br>
<br>
>> If I change the permissions of /dev/lirc0 to 777, everything works. I'd<br>
>> rather not do that, but I will for now just temporarily.<br>
<br>
>> If I start it up without changing the permissions, this shows up in the log:<br>
<br>
>> May 26 18:28:58 htpc systemd: Started LIRC Infrared Signal Decoder.<br>
>> May 26 18:28:58 htpc systemd: Starting LIRC Infrared Signal Decoder...<br>
>> May 26 18:28:58 htpc audit: <audit-1130> pid=1 uid=0 auid=4294967295<br>
>> ses=4294967295 msg='unit=lircd comm="systemd"<br>
>> exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'<br>
>> May 26 18:28:58 htpc lircd: lircd-0.9.2a[2199]: Notice: Running as user lirc<br>
>> May 26 18:28:58 htpc lircd-0.9.2a[2199]: Notice: Running as user lirc<br>
>> May 26 18:28:58 htpc lircd: lircd-0.9.2a[2199]: Info: Using remote: mceusb.<br>
>> May 26 18:28:58 htpc lircd-0.9.2a[2199]: Info: Using remote: mceusb.<br>
>> May 26 18:28:58 htpc lircd: lircd-0.9.2a[2199]: Notice: lircd(default)<br>
>> ready, using /var/run/lirc/lircd<br>
>> May 26 18:28:58 htpc lircd-0.9.2a[2199]: Notice: lircd(default) ready,<br>
>> using /var/run/lirc/lircd<br>
>> May 26 18:28:59 htpc lircd: lircd-0.9.2a[2199]: Notice: accepted new client<br>
>> on /var/run/lirc/lircd<br>
>> May 26 18:28:59 htpc lircd-0.9.2a[2199]: Notice: accepted new client on<br>
>> /var/run/lirc/lircd<br>
>> May 26 18:28:59 htpc lircd-0.9.2a[2199]: Error: could not open /dev/lirc0<br>
>> May 26 18:28:59 htpc lircd-0.9.2a[2199]: default_init(): Permission denied<br>
>> May 26 18:28:59 htpc lircd-0.9.2a[2199]: Warning: Failed to initialize<br>
>> hardware<br>
>> May 26 18:28:59 htpc lircd: lircd-0.9.2a[2199]: Error: could not open<br>
>> /dev/lirc0<br>
>> May 26 18:28:59 htpc lircd: lircd-0.9.2a[2199]: default_init(): Permission<br>
>> denied<br>
>> May 26 18:28:59 htpc lircd: lircd-0.9.2a[2199]: Warning: Failed to<br>
>> initialize hardware<br>
>> May 26 18:29:00 htpc lircd: lircd-0.9.2a[2199]: Error: could not open<br>
>> /dev/lirc0<br>
>> May 26 18:29:00 htpc lircd: lircd-0.9.2a[2199]: default_init(): Permission<br>
>> denied<br>
>> May 26 18:29:00 htpc lircd-0.9.2a[2199]: Error: could not open /dev/lirc0<br>
>> May 26 18:29:00 htpc lircd-0.9.2a[2199]: default_init(): Permission denied<br>
>> May 26 18:29:01 htpc lircd: lircd-0.9.2a[2199]: Error: could not open<br>
>> /dev/lirc0<br>
>> May 26 18:29:01 htpc lircd: lircd-0.9.2a[2199]: default_init(): Permission<br>
>> denied<br>
>> May 26 18:29:01 htpc lircd-0.9.2a[2199]: Error: could not open /dev/lirc0<br>
>> May 26 18:29:01 htpc lircd-0.9.2a[2199]: default_init(): Permission denied<br>
>> May 26 18:29:02 htpc lircd: lircd-0.9.2a[2199]: Error: could not open<br>
>> /dev/lirc0<br>
>> May 26 18:29:02 htpc lircd-0.9.2a[2199]: Error: could not open /dev/lirc0<br>
>> May 26 18:29:02 htpc lircd-0.9.2a[2199]: default_init(): Permission denied<br>
<br>
>> ...and it goes on and on.<br>
<br>
>> Is it possible for me to make a working udev rule for /dev/lirc0?  What<br>
>> should the permissions be?<br>
>> I tried changing the group to lirc and setting the permissions<br>
<br>
>> [root@htpc ~]# ps aux | grep lirc<br>
>> lirc      2199  0.0  0.0  57956  3836 ?        Ss   18:28   0:00<br>
>> /usr/sbin/lircd --nodaemon<br>
>> root     14117  0.0  0.0 114328  2304 pts/0    R+   18:33   0:00 grep<br>
>> --color=auto lirc<br>
>> [root@htpc ~]#<br>
<br>
>> I tried changing the group to lirc and changing permissions to 770 but that<br>
>> failed.<br>
<br>
>> Since it's stuck on an initialization loop until the device allows<br>
>> permission, I am going to add a line in /etc/rc.d/rc.local:<br>
<br>
>> chmod 777 /dev/lirc0<br>
<br>
>> This seems like an awful hack.  Does anyone have a better idea?<br>
<br>
>> Thanks!<br>
>> Jerry<br>
<br>
> It says it is running as user lirc! and the original permission is<br>
> only rw to root. So either change ownership to user lirc or to the<br>
> group lirc is in and changing permissions to 660. (no x flag needed)<br>
> So if that group is also lirc:<br>
<br>
>> KERNEL=="lirc0", NAME=="lirc0", GROUP="lirc", MODE=="0660"<br>
<br>
> Or run the service as root<br>
<br>
</div></div>Sorry I missed that you tried changing permission, but that it failed.<br>
What failed? The changing permission or like before? Dit you verify<br>
that user lirc has/is in group lirc?<br>
<br>
I have it running as root, which is normal for such a basic service.<br>
<div class=""><div class="h5"><br></div></div></blockquote></div><br></div><div class="gmail_extra">After a reboot, the permissions on /dev/lirc0 did not change.  Shouldn't the device have been changed?  Is lircd creating the device afterward or before the udev rule does?  I have two other rules in that directory.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">[root@htpc ~]# more /etc/udev/rules.d/10-lirc.rules<br>KERNEL=="lirc0", NAME=="lirc0", GROUP="lirc", MODE=="0660"<br>[root@sirius ~]# ls -l /dev/lirc0<br>crw------- 1 root root 246, 0 May 26 20:28 /dev/lirc0<br>[root@htpc ~]#<br><br>[root@htpc ~]# ls -l /etc/udev/rules.d/<br>total 12<br>-rw-r--r--  1 root root  59 May 26 20:25 10-lirc.rules<br>-rw-r--r--. 1 root root 104 Sep 18  2013 81-remote-control-lirc.rules<br>-rw-r--r--  1 root root  68 Mar 10 19:56 85-rtc.rules<br>[root@htpc ~]# more /etc/udev/rules.d/81-remote-control-lirc.rules<br>SUBSYSTEM=="rc", ATTRS{protocols}=="*lirc*" RUN+="/bin/sh -c 'echo lirc > /sys$env{DEVPATH}/protocols'"<br>[root@sirius ~]# more /etc/udev/rules.d/85-rtc.rules<br>KERNEL=="rtc0", ATTR{name}=="rtc_cmos", GROUP="mythtv", MODE="0660"<br>[root@htpc ~]#<br><br></div><div class="gmail_extra">If I change the ownership to root:lirc and chmod 660, lircd still complains as above.   If I chmod 666 /dev/lirc0, everything works!  Why is that?  Why does it need "other" permissions?  The process is owned by lirc.  I think.<br><br></div><div class="gmail_extra">Anyway, for now I just added a line to devil sign (chmod 666) the device in rc.local.  It works, but it just feels wrong.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks!<br></div><div class="gmail_extra">Jerry<br></div></div>