"no free adapter available" after kodi/machine resume from sleep - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167) +---- Forum: Tvheadend (https://forum.kodi.tv/forumdisplay.php?fid=168) +---- Thread: "no free adapter available" after kodi/machine resume from sleep (/showthread.php?tid=321448) |
"no free adapter available" after kodi/machine resume from sleep - IssacBinary - 2017-09-13 I have tvheadend set up and working great. However when the box goes into sleep, when it resumes I can't play any live TV. "no free adapter available". Restarting the box fixes it. I have doubled checked and there's no other PVR add-ons that could be using the card. I'm using openelec. I can only seem to find similar issues where restarting the box causes this. But restarting the box for me fixes it! Only caused by resuming from sleep. Has anyone encountered this before? Thanks RE: "no free adapter available" after kodi/machine resume from sleep - ninjafuchs - 2017-09-13 I know this problem quite well. Although i dont use openelec. I set up a normal lubuntu 16.04 and start into kodi on startup. But I encountered your problem because my system didnt unmount the driver for m tv-card when going to sleep. so the adapter is already in use, when you resume. As I use lubuntu 16.04 and systemd and I am only a user not a developer I kinda did try and error and solved the problem for me. If you are interested I can share my config with you. RE: "no free adapter available" after kodi/machine resume from sleep - IssacBinary - 2017-09-13 Yes please ninjafuchs that would be great. I think I remember seeing an option relating to unmounting, but it was a text entry field and I didn't know what to enter or what it required.. RE: "no free adapter available" after kodi/machine resume from sleep - ninjafuchs - 2017-09-14 Maybe that is something, that you could try out. I for myself wrote a little service file. First you have to find out which modules you have to unload. you can use: dmesg|grep DVB or lsmod|grep dvb so my modules are: budget, budget_core, dvb_core and saa7146 Unfortunately the order of unmounting and mounting seems to have influence on this topic. So you need sudo rights and create a file: I chose: /etc/systemd/system/kodi-suspend.service and wrote in it: [Unit] Description=stop tvheadend, dvb-module und xbox-controller treiber Before=sleep.target StopWhenUnneeded=yes [Service] User=root Type=oneshot RemainAfterExit=yes ExecStart=/bin/systemctl stop tvheadend.service ExecStart=/sbin/modprobe -r budget ExecStart=/sbin/modprobe -r budget_core ExecStart=/sbin/modprobe -r dvb_core ExecStart=/sbin/modprobe -r saa7146 ExecStop=/sbin/modprobe saa7146 ExecStop=/sbin/modprobe dvb_core ExecStop=/sbin/modprobe budget_core ExecStop=/sbin/modprobe budget ExecStop=/bin/systemctl start tvheadend.service [Install] WantedBy=sleep.target afterwards save the file and enable it with this command: sudo systemctl enable kodi-suspend.service I hope this will help you. Again I like to point out that this worked for me and I dont use openelec (never tried it) and I am on a lubuntu 16.04 system with systemd. RE: "no free adapter available" after kodi/machine resume from sleep - IssacBinary - 2017-09-14 (2017-09-14, 11:23)ninjafuchs Wrote: Unfortunately the order of unmounting and mounting seems to have influence on this topic.Ah! I did try doing Code: lsmod Does your order of unmounting have any relationship to Code: lsmod RE: "no free adapter available" after kodi/machine resume from sleep - IssacBinary - 2017-09-14 Tried several combinations and none seem to work. I've tried several combinations of Code: rc_dvbsky m88ds3103 rc_core dvb_core If I also include smipcie it causes Kodi to become unresponsive when suspend is select. It doesn't freeze as the fanart background slideshow still rolls. This is my output of lsmod Code: ############################################## RE: "no free adapter available" after kodi/machine resume from sleep - ninjafuchs - 2017-09-15 I am sorry to disappoint you but, but this is beyond my knowledge. But I think that you almost found all modules. But for testing you can try to unmount the modules one after the other and mount them afterwards manually. Maybe this will give you a hint to the correct order. See this topic kept me testing for days. Maybe there is a other way, but I simply dont know it. RE: "no free adapter available" after kodi/machine resume from sleep - IssacBinary - 2017-09-16 Is there any logs or anywhere to check if the unmounting is happening and happening correctly? Also is there a way I can simulate the sleep, (unmounting and mounting manually and then restarting tvheadend manually?) so I can try different combinations without having to reboot / sleep and wake the machine each time? RE: "no free adapter available" after kodi/machine resume from sleep - ninjafuchs - 2017-09-18 Of course is this possible. Just try and execute every line after the other (without the ExecStart or ExecStop in the beggining but most likely you will need sudo rights). If nothing is returned then the command succeded. If there is a return something went wrong. RE: "no free adapter available" after kodi/machine resume from sleep - zeke2135 - 2017-09-26 This is pretty puzzling to me. I have the same issue using an hdhomerun device on LibreELEC. I can see in the tvheadend web gui that the adapters are not there after resume. I don't really see anything that I can identify as a related kernel module, nothing like the modules mentioned above. Mostly what I see in journalctl is errors relating to the system trying to run user space drivers like dvb_hdhomerun and dvb_hdhomerun_fe in a startup script. Everything in the journalctl entries has tvheadend as part of the message. I would be very curious and grateful if someone could point me in the right direction to solve this issue. RE: "no free adapter available" after kodi/machine resume from sleep - rpcameron - 2017-09-26 (2017-09-26, 02:31)zeke2135 Wrote: This is pretty puzzling to me. I have the same issue using an hdhomerun device on LibreELEC. I can see in the tvheadend web gui that the adapters are not there after resume. I don't really see anything that I can identify as a related kernel module, nothing like the modules mentioned above. Mostly what I see in journalctl is errors relating to the system trying to run user space drivers like dvb_hdhomerun and dvb_hdhomerun_fe in a startup script. Everything in the journalctl entries has tvheadend as part of the message. I would be very curious and grateful if someone could point me in the right direction to solve this issue. This is puzzling, as the dvb_hdhomerun drivers are quite outdated. They were needed previously to tie the HDHR network tuners into Linux's v4l/dvb subsystem. However, there are HDHR drivers and a frontend in Tvheadend, and they have been there for quite some time now; conversely, the dvb_hdhomerun drivers have not been updated in ages. The fact that LE is shipping such kludges in a current release is one more reason to stay away from them. LE's version of Tvheadend has also had quite a few issues about network connectivity and not properly starting up or binding to an interface is there was no internet connection; perhaps this problem is a further extension of LE's poor Tvheadend install. RE: "no free adapter available" after kodi/machine resume from sleep - IssacBinary - 2017-09-26 I actually switched to Libreelec from openelec to see if that would solve the issue for me but it hasn't. I need to try and do more manual testing of manually unmounting and remounting. But I'm not quite sure what I should be looking for our checking when doing it manually to confirm it is working. RE: "no free adapter available" after kodi/machine resume from sleep - zeke2135 - 2017-09-26 (2017-09-26, 09:58)IssacBinary Wrote: I actually switched to Libreelec from openelec to see if that would solve the issue for me but it hasn't.Yes me too. Actually in openelec 8 tvheadend will not even start. Anyway, I discovered a workaround that works for me. I simply disabled stopping and starting the tvheadend service on sleep and resume by modifying the tvheadend.power script. I have no idea if that is a good idea in general but it works for me so far. All I do is watch live tv, in particular I don't have scheduled recordings. So I would be really nervous about recommending doing this workaround to anyone else w/o knowing why the default is to stop and start the service and w/o considering any unintended consequences. RE: "no free adapter available" after kodi/machine resume from sleep - zeke2135 - 2017-09-26 (2017-09-26, 03:02)rpcameron Wrote: This is puzzling, as the dvb_hdhomerun drivers are quite outdated. They were needed previously to tie the HDHR network tuners into Linux's v4l/dvb subsystem. However, there are HDHR drivers and a frontend in Tvheadend, and they have been there for quite some time now; conversely, the dvb_hdhomerun drivers have not been updated in ages. I'm not clear on how all this is organized and works. I think I understand what you're saying, and I think the drivers in my installation are the ones in tvheadend you referred to. I don't think the dvb_hdhomerun drivers are there, but the scripts to run them are. Why, I don't know. It might actually be from the openelec installation that I had originally, in which tvheadend did not run at all, and from which I migrated to libreelec. |