Hi all!
Ich habe vor zwei Wochen mein openSuse von 15.3 nach 15.4 "ge-updated".
Nach dem Update ging mein LIRCD Service nicht mehr.
Ich benutze einen FTDI USB Adapter als LIRC hardware.
Das Starten des LIRCD via systemctl (re)start lircd funktioniert ohne Problem:
Oct 24 09:08:11.521799 atom lircd: Warning: ------------------------ Log re-opened ----------------------------
Oct 24 09:08:11.521850 atom lircd: Info: lircd: Opening log, level: Info
Oct 24 09:08:11.521866 atom lircd: Notice: Version: lircd 0.10.1
Oct 24 09:08:11.524968 atom lircd: Notice: System info: Linux atom 5.14.21-150400.24.21-default #1 SMP PREEMPT_DYNAMIC Wed Sep 7 06:51:18 UTC 2022 (974d0aa) x86_64 x86_64 x86_64 GNU/Linux
Oct 24 09:08:11.532291 atom lircd: Info: Initial device: serial=FTUEE9GE
Oct 24 09:08:11.532319 atom lircd: Info: Initial device: serial=FTUEE9GE
Oct 24 09:08:11.532329 atom lircd: Notice: Options: driver: ftdi
Oct 24 09:08:11.532337 atom lircd: Notice: Options: output: /var/run/lirc/lircd
Oct 24 09:08:11.532347 atom lircd: Notice: Options: nodaemon: 1
Oct 24 09:08:11.532359 atom lircd: Notice: Options: plugindir: /usr/lib64/lirc/plugins
Oct 24 09:08:11.532373 atom lircd: Notice: Options: logfile: /var/log/lirc.log
Oct 24 09:08:11.532382 atom lircd: Notice: Options: immediate-init: 0
Oct 24 09:08:11.532395 atom lircd: Notice: Options: permission: 666
Oct 24 09:08:11.532438 atom lircd: Notice: Options: driver-options:
Oct 24 09:08:11.532447 atom lircd: Notice: Options: pidfile: /var/run/lirc/lircd.pid
Oct 24 09:08:11.532456 atom lircd: Notice: Options: listen: 0
Oct 24 09:08:11.532471 atom lircd: Notice: Options: connect: (null)
Oct 24 09:08:11.532482 atom lircd: Notice: Options: userelease: 0
Oct 24 09:08:11.532490 atom lircd: Notice: Options: effective_user: (null)
Oct 24 09:08:11.532497 atom lircd: Notice: Options: release_suffix: _EVUP
Oct 24 09:08:11.532508 atom lircd: Notice: Options: allow_simulate: 0
Oct 24 09:08:11.532518 atom lircd: Notice: Options: repeat_max: 600
Oct 24 09:08:11.532529 atom lircd: Notice: Options: configfile: /etc/lirc/lircd.conf
Oct 24 09:08:11.532540 atom lircd: Notice: Options: dynamic_codes: (null)
Oct 24 09:08:11.532548 atom lircd: Notice: Current driver: ftdi
Oct 24 09:08:11.532559 atom lircd: Notice: Driver API version: 3
Oct 24 09:08:11.532569 atom lircd: Notice: Driver version: 0.10.0
Oct 24 09:08:11.532578 atom lircd: Notice: Driver info: See file:///usr/share/doc/lirc/plugindocs/ftdi.html
Oct 24 09:08:11.532601 atom lircd: Warning: ------------------------ Log re-opened ----------------------------
Oct 24 09:08:11.532617 atom lircd: Debug: lircd: Opening log, level: Debug
Oct 24 09:08:11.532674 atom lircd: Debug: No systemd fd found
Oct 24 09:08:11.532897 atom lircd: Notice: Running as user root
Oct 24 09:08:11.532912 atom lircd: Debug: Groups: [0]: 0
Oct 24 09:08:11.532984 atom lircd: Info: Using remote: RM-887.
Oct 24 09:08:11.533125 atom lircd: Notice: lircd(ftdi) ready, using /var/run/lirc/lircd
Alles anzeigen
Sobald ich einen client attache (z.B. irw), faellt der Lirc Service in eine Endlos-Fehlerscheife...auch nach dem Stoppen des Clients laeuft die Endlosschleife weiter:
Oct 24 09:11:55.475139 atom lircd: Error: unable to open FTDI device (usb_open() failed)
Oct 24 09:11:55.975273 atom lircd: Error: unable to open FTDI device (usb_open() failed)
Oct 24 09:11:56.228472 atom lircd: Info: removed client
Oct 24 09:11:56.475412 atom lircd: Error: unable to open FTDI device (usb_open() failed)
Oct 24 09:11:56.975551 atom lircd: Error: unable to open FTDI device (usb_open() failed)
Ich habe dann mal mit strace angeschaut, was der lircd daemon macht:
recvmsg(9, {msg_namelen=128}, 0) = -1 EAGAIN (Resource temporarily unavailable)
openat(AT_FDCWD, "/dev/bus/usb/002/003", O_RDWR|O_CLOEXEC) = -1 EPERM (Operation not permitted)
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2298, ...}) = 0
write(5, "Oct 24 09:13:46.692533 atom lirc"..., 89) = 89
clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=500000000}, NULL) = 0
Dann habe ich die permission vom USB device zum Testen auf 0777 gesetzt:
Keine Verbesserung!?
AppArmor ist auf meinem System abgeschaltet.
Ich habe zum Testen eine udev rule mit 0666 eingefuegt:
Alles keine Verbesserung!?
Dann habe ich den /usr/sbin/lircd von der Shell aus gestartet...und siehe da...geht einwandfrei
Langer Prolog...nun endlich meine Frage:
"What the heck" blockiert den LIRCD Zugriff auf das FTDI-USB Device...aber nur wenn ich den lircd als system.service starte!?
Vielleicht hat einer der Admin Profis hier im Forum eine Idee bzw. einen Tipp. Mein bescheidenes Wissen ueber LInux Systemadministration ist erschoepft
...have fun...
Michi