<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 26, 2015 at 8:40 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 Jerry,<br>
<div><div><br>
Wednesday, May 27, 2015, 2:41:20 AM, you wrote:<br>
<br>
> On Tue, May 26, 2015 at 7:19 PM, Hika van den Hoven <<a href="mailto:hikavdh@gmail.com" target="_blank">hikavdh@gmail.com</a>><br>
> wrote:<br>
<br>
>> Hoi Hika,<br>
>><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.<br>
>> I'm<br>
>> >> watching comedy central on live tv at the moment. I had a bit of an<br>
>> 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<br>
>> 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<br>
>> 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<br>
>> 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:<br>
>> 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<br>
>> 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<br>
>> /dev/lirc0<br>
>> >> May 26 18:28:59 htpc lircd-0.9.2a[2199]: default_init(): Permission<br>
>> 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():<br>
>> 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():<br>
>> Permission<br>
>> >> denied<br>
>> >> May 26 18:29:00 htpc lircd-0.9.2a[2199]: Error: could not open<br>
>> /dev/lirc0<br>
>> >> May 26 18:29:00 htpc lircd-0.9.2a[2199]: default_init(): Permission<br>
>> 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():<br>
>> Permission<br>
>> >> denied<br>
>> >> May 26 18:29:01 htpc lircd-0.9.2a[2199]: Error: could not open<br>
>> /dev/lirc0<br>
>> >> May 26 18:29:01 htpc lircd-0.9.2a[2199]: default_init(): Permission<br>
>> 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<br>
>> /dev/lirc0<br>
>> >> May 26 18:29:02 htpc lircd-0.9.2a[2199]: default_init(): Permission<br>
>> 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<br>
>> 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>
>> 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>
>><br>
>><br>
> After a reboot, the permissions on /dev/lirc0 did not change. Shouldn't<br>
> the device have been changed? Is lircd creating the device afterward or<br>
> before the udev rule does? I have two other rules in that directory.<br>
<br>
> [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 ><br>
> /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>
> If I change the ownership to root:lirc and chmod 660, lircd still complains<br>
> as above. If I chmod 666 /dev/lirc0, everything works! Why is that? Why<br>
> does it need "other" permissions? The process is owned by lirc. I think.<br>
<br>
> Anyway, for now I just added a line to devil sign (chmod 666) the device in<br>
> rc.local. It works, but it just feels wrong.<br>
<br>
> Thanks!<br>
> Jerry<br>
<br>
<br>
</div></div>/dev/lirc0 is created by udev. /dev/lircd (or /var/run/lirc/lircd) by<br>
lircd.<br>
<br>
I notice that the serial on your lirc.rules is very low. They are<br>
processed in that order. It should be at least in the 60, so make it<br>
80<br>
mv /etc/udev/rules.d/10-lirc.rules /etc/udev/rules.d/80-lirc.rules<br>
<br>
What is the ownership of /var/run/lirc/lircd? Try to mimic that<br>
ownership.<br>
<div><div><br></div></div></blockquote><div><br></div><div>I changed it to 80-lirc.rules and put 0666 as the MODE<br></div></div>[root@htpc rules.d]# ls -l /var/run/lirc/lircd<br>srw-rw-rw- 1 root root 0 May 26 20:43 /var/run/lirc/lircd<br>[root@htpc rules.d]#<br><br></div><div class="gmail_extra">after a reboot:<br></div><div class="gmail_extra"><br>[syn4pse@htpc ~]$ ls -l /dev/lirc0<br>crw------- 1 root root 246, 0 May 26 21:13 /dev/lirc0<br>[syn4pse@htpc ~]$<br><br></div><div class="gmail_extra">It does not seem to be responding for some reason.<br><br></div><div class="gmail_extra">Thanks for your help, Hika. I have to take a break until tomorrow but I'll be ready to try something else in the morning. :)<br></div></div>