Thefrank / jellyfin-server-freebsd

jellyfin-server component for freebsd
185 stars 16 forks source link

Attempting to start media playback kills network connection #50

Closed tdsotm closed 1 year ago

tdsotm commented 1 year ago

I followed the guide to install in TrueNAS Core. Jail instalation went fine, mount points look fine, media library loads as expected. But as soon as I hit play on the film I lose connection to both the jail and the host. Pinging to either the jail or the host result is mostly Request timed out, a few Destination host unreachable and a few correct responses. It doesn't matter if I assign DHCP or a static IP to the jail. If I don't start media playback everything works fine. Jellyfin logs do not throw errors. If I close the browser tab connectivity resumes in about 1 minute(or 2).

LE: This happens only AFTER I set up Intel HW encoding. If I don't transcode everything works, but defeats the point of me having wh acceleration. There is no log for transcodes after I enabled hw accel

Thefrank commented 1 year ago

It sounds like the jail is having an issue. are there any dmesg errors on the host about the jail when that happens?

tdsotm commented 1 year ago

I don't know how far back I should go, but here's the output of the dmesg: Just as a note, I was watching dmesg but when the connection is lost so was what my connection to the server.

ichsmb0: <Intel Sunrise Point-H SMBus controller> port 0xf040-0xf05f mem 0xf722a000-0xf722a0ff irq 16 at device 31.4 on pci0

smbus0: <System Management Bus> on ichsmb0

lo0: link state changed to UP

re0: link state changed to UP

GEOM_MIRROR: Device mirror/swap0 launched (3/3).

GEOM_ELI: Device mirror/swap0.eli created.

GEOM_ELI: Encryption: AES-XTS 128

GEOM_ELI:     Crypto: accelerated software

CPU: Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (2711.99-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x506e3  Family=0x6  Model=0x5e  Stepping=3

Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>

  Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>

  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>

  AMD Features2=0x121<LAHF,ABM,Prefetch>

  Structured Extended Features=0x29c67af<FSGSBASE,TSCADJ,SGX,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,NFPUSG,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PROCTRACE>

  Structured Extended Features3=0x9c002e00<MCUOPT,MD_CLEAR,TSXFA,IBPB,STIBP,L1DFL,SSBD>

  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>

  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID

  TSC: P-state invariant, performance statistics

re0: link state changed to DOWN

re0: link state changed to UP

hwpmc: SOFT/16/64/0x67<INT,USR,SYS,REA,WRI> TSC/1/64/0x20<REA> IAP/8/48
/0x3ff<INT,USR,SYS,EDG,THR,REA,WRI,INV,QUA,PRC> IAF/3/48/0x67<INT,USR,SYS,REA,WRI>

Security policy loaded: MAC/ntpd (mac_ntpd)

drmn0: <drmn> on vgapci0

vgapci0: child drmn0 requested pci_enable_io

vgapci0: child drmn0 requested pci_enable_io

[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).

VT: Replacing driver "efifb" with new "dummy".

[drm] Got stolen memory base 0xc6000000, size 0x2000000

[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[drm] Driver supports precise vblank timestamp query.

[drm] Connector HDMI-A-1: get mode from tunables:

[drm]   - kern.vt.fb.modes.HDMI-A-1

[drm]   - kern.vt.fb.default_mode

[drm] Connector HDMI-A-2: get mode from tunables:

[drm]   - kern.vt.fb.modes.HDMI-A-2

[drm]   - kern.vt.fb.default_mode

[drm] Connector DP-1: get mode from tunables:

[drm]   - kern.vt.fb.modes.DP-1

[drm]   - kern.vt.fb.default_mode

drmn0: successfully loaded firmware image 'i915/skl_dmc_ver1_27.bin'

[drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin (v1.27)

drmn0: Failed to program MOCS registers; expect performance issues.

sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!

[drm] Initialized i915 1.6.0 20190822 for drmn0 on minor 0

[drm] Cannot find any crtc or sizes

bridge0: Ethernet address: 58:9c:fc:00:15:7a

bridge0: link state changed to UP

re0: promiscuous mode enabled

epair0a: Ethernet address: 02:49:21:18:e2:0a

epair0b: Ethernet address: 02:49:21:18:e2:0b

epair0a: link state changed to UP

epair0b: link state changed to UP

epair0a: changing name to 'vnet0.1'

re0: link state changed to DOWN

vnet0.1: promiscuous mode enabled

[drm] Cannot find any crtc or sizes

lo0: link state changed to UP

re0: link state changed to UP

barnau%
Thefrank commented 1 year ago

does pciconf -lv list your device? Does it match the supported chipsets for the driver(s) installed in the jail? example from my system with video provided just by the server motherboard for console:

vgapci0@pci0:11:0:0:    class=0x030000 rev=0x00 hdr=0x00 vendor=0x102b device=0x0534 subvendor=0x1028 subdevice=0x0528
    vendor     = 'Matrox Electronics Systems Ltd.'
    device     = 'G200eR2'
    class      = display
tdsotm commented 1 year ago

It does:

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device 8694
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f6000000 (64-bit, non-prefetchable)
        Memory at e0000000 (64-bit, prefetchable)
        I/O ports at f000
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] Process Address Space ID (PASID)
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] Page Request Interface (PRI)

and

vgapci0@pci0:0:2:0:     class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x1912 subvendor=0x1043 subdevice=0x8694
    vendor     = 'Intel Corporation'
    device     = 'HD Graphics 530'
    class      = display
    subclass   = VGA
michaelburton commented 1 year ago

I suspect you might be running into the same problem I had in #46.

Check your system uptime, the hardware acceleration might be causing a kernel panic which then causes your system to reboot. That would explain why it goes down immediately, doesn't save a log file and takes a minute or two to come back up.

In my case, the problem was that it would not work without a display connected. You could try either attaching a monitor or using a cheap dummy HDMI plug.

Thefrank commented 1 year ago

Your chipset falls here: https://en.wikipedia.org/wiki/Intel_Graphics_Technology#Skylake. Double check that you have the libva-intel-media-driver package installed. libva-intel-driver is for older chipsets

edit: also see @michaelburton comment above

tdsotm commented 1 year ago

@Thefrank The package is installed in the jail, as it was written in the instructions. @michaelburton - plugging in a monitor fixed the issue, thanks! It's a bit sad the my iGPU can't transcode hevc 10 being a 6400, but the error is now gone.