Autor Thema: how to restart driver  (Gelesen 552 mal)

tomasl

  • Newbie
  • *
  • Beiträge: 22
    • Profil anzeigen
how to restart driver
« am: Oktober 25, 2024, 05:36:19 Nachmittag »
Hi, I have both skytv 6 dongle and dual tuner and use them with TVHeadend inside docker container.
I don't know why, the tuners disappear from TVHeadend Configuration/DVB Inputs/Adapters tab.
recently I found out that it might help just to restart the container. before I was recreating the whole container including recreating the nodes. now the question is. if it's possible just to restart the driver instead of the whole docker container so I can set it up in the container's crontab to test.

tomasl

  • Newbie
  • *
  • Beiträge: 22
    • Profil anzeigen
Re: how to restart driver
« Antwort #1 am: Oktober 25, 2024, 06:38:05 Nachmittag »
nevermind, I think I found it.

*/1 * * * * /usr/bin/timeout 1m bash -c "dmesg -w | tail -f | grep -qsm 1 'Sundtek' && docker exec tvh /opt/bin/mediaclient --shutdown && sleep 10 && docker exec tvh /opt/bin/mediaclient --start"

I'll try to restart it using crontab this way.
« Letzte Änderung: Oktober 25, 2024, 08:55:49 Nachmittag von tomasl »

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8593
    • Profil anzeigen
Re: how to restart driver
« Antwort #2 am: Oktober 26, 2024, 07:20:39 Vormittag »
They should not disappear, there might be another issue there. Check your system logs and enable the driver logs.

sundtek.conf (you need to check where this is in your container maybe in /config/etc/sundtek.conf you have to create this file because it's optional, the driver loads the most common default values if it's not there)
add:
loglevel=max

/var/log/syslog
Failure is a good thing! I'll fix it

tomasl

  • Newbie
  • *
  • Beiträge: 22
    • Profil anzeigen
Re: how to restart driver
« Antwort #3 am: Oktober 26, 2024, 04:33:15 Nachmittag »
I suspect part of the problem are power outages. it happens at my place, there are split of the second outages. but I'll enable debug logging as you suggested. I think already second time, but I'm idiot, so I have to open 3 different threads for one issue.  ;D

tomasl

  • Newbie
  • *
  • Beiträge: 22
    • Profil anzeigen
Re: how to restart driver
« Antwort #4 am: November 02, 2024, 06:34:31 Nachmittag »
ok, it happened twice in past few days. this is output from dmesg

[829781.271485] usb 1-2.4: usbfs: usb_submit_urb returned -19
[829781.271488] usb 1-2.4: USB disconnect, device number 9
[829781.549966] usb 1-2.4: new high-speed USB device number 10 using xhci-hcd
[829781.675198] usb 1-2.4: New USB device found, idVendor=2659, idProduct=1802
[829781.675204] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[829781.675207] usb 1-2.4: Product: Dual S2
[829781.675209] usb 1-2.4: Manufacturer: Sundtek
[829781.675212] usb 1-2.4: SerialNumber: U220618172741
[829781.683682] usb 1-2.4: Unsupported device
[830891.207803] usb 1-2.4: USB disconnect, device number 10
[830891.482322] usb 1-2.4: new high-speed USB device number 11 using xhci-hcd
[830891.607588] usb 1-2.4: New USB device found, idVendor=2659, idProduct=1802
[830891.607595] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[830891.607597] usb 1-2.4: Product: Dual S2
[830891.607600] usb 1-2.4: Manufacturer: Sundtek
[830891.607603] usb 1-2.4: SerialNumber: U220618172741
[830891.618709] usb 1-2.4: Unsupported device

I only enabled the debug logging of the sundtek driver after first time it happened, so the driver debug log should have at least one set of events recorded, if I'm lucky. where should I look for the driver debug log file?

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8593
    • Profil anzeigen
Re: how to restart driver
« Antwort #5 am: November 05, 2024, 01:18:19 Vormittag »
/etc/sundtek.conf
loglevel=max

that will show what the driver is doing.

The log is stored in /var/log/mediasrv.log

also try ir_disabled=1 in /etc/sundtek.conf it's using interrupt transfers, which is a little bit different from the rest.
« Letzte Änderung: November 05, 2024, 04:18:54 Nachmittag von Sundtek »
Failure is a good thing! I'll fix it