Black screen
#1
Hi,

I did run sucessfully Fedora 35 with Kodi 19.4. with an older Intel CPU and motherboard (Z87 chipset), which is connected to SmartTV.
Only the onboard iGPU with Intel driver 965 was used.
The Hardware acceleration worked for x264 and also software decode for x265 was smooth enough for 2K.

Now i bought an new 4K SmartTV and replaced the motherboard and CPU for 4K x265 decoder support and 60Mhz frequency.
The new CPU is a Intel i3 12100 and the Motherboard has a Z690 chipset.
Also Fedora is now loading the newer Intel iHD driver for iGPU.

With the new hardware, Fedora is loading the normal Kodi menu.
Unfortunately when i play a movie with x264 or x265 codec and the hardware acceleration (x264 and x265) is enabled, i only get a black screen.
If the hardware acceleration is disabled, the video is played with software decoder, but even more worse then on old hardware.
Audio is always working normal.

Here is the Kodi debug log:
https://paste.kodi.tv/fetuzenivo.kodi

Output from vainfo:
https://paste.kodi.tv/jabesitidu

What could be the reason for this?
How can i test the video decoder outside from Kodi?

Please help me fixing this hardware acceleration problem.

Regards,
Cynrik
Reply
#2
Quote:CVaapi2Texture::Map: DRM-exported layer has 2 planes - only 1 supported
You're seeing Intel media driver issue 1210. Kodi doesn't work when E2E compression is enabled in the media driver.
Reply
#3
Exactly, look at these threads 366806 and 362073.

You would have to compile the driver yourself with these changes:
Code:
diff --git a/media_driver/linux/gen12/ddi/media_sku_wa_g12.cpp b/media_driver/linux/gen12/ddi/media_sku_wa_g12.cpp
index 5694f9892..0623de720 100644
--- a/media_driver/linux/gen12/ddi/media_sku_wa_g12.cpp
+++ b/media_driver/linux/gen12/ddi/media_sku_wa_g12.cpp
@@ -231,7 +231,7 @@ static bool InitTglMediaSku(struct GfxDeviceInfo *devInfo,
     MEDIA_WR_SKU(skuTable, FtrTileY, 1);

     bool disableMMC = false;
-    MEDIA_WR_SKU(skuTable, FtrE2ECompression, 1);
+    MEDIA_WR_SKU(skuTable, FtrE2ECompression, 0);

     if (drvInfo->devRev <= 2)
     {
@@ -267,7 +267,7 @@ static bool InitTglMediaSku(struct GfxDeviceInfo *devInfo,

     if (userFeatureData.bData)
     {
-        MEDIA_WR_SKU(skuTable, FtrE2ECompression, 1);
+        MEDIA_WR_SKU(skuTable, FtrE2ECompression, 0);
     }

     MEDIA_WR_SKU(skuTable, FtrLinearCCS, 1);
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#4
That did the trick.
Thank you.

Videos are still jerky even when hardware acceleration is active.
Do you please have some additional advise for this?
Reply
#5
I see you are using X11 as window manager, paste your /var/log/Xorg.0.log please.

Are you using the modeset driver?
That has hw accelration enabled but gives you microstuttering.

You have to compile the "xf86-video-intel" driver also with these changes (or else the intel driver doesn't recognize the GPU):
Code:
diff --git a/src/i915_pciids.h b/src/i915_pciids.h
index 1d2c1221..ac0dea20 100644
--- a/src/i915_pciids.h
+++ b/src/i915_pciids.h
@@ -599,6 +599,58 @@
        INTEL_VGA_DEVICE(0x9A60, info), \
        INTEL_VGA_DEVICE(0x9A68, info), \
        INTEL_VGA_DEVICE(0x9A70, info), \
-       INTEL_VGA_DEVICE(0x9A78, info)
+       INTEL_VGA_DEVICE(0x9A78, info), \
+       INTEL_VGA_DEVICE(0x9AC0, info), \
+       INTEL_VGA_DEVICE(0x9AC9, info), \
+       INTEL_VGA_DEVICE(0x9AD9, info), \
+       INTEL_VGA_DEVICE(0x9AF8, info)
+
+/* RKL */
+#define INTEL_RKL_IDS(info) \
+       INTEL_VGA_DEVICE(0x4C80, info), \
+       INTEL_VGA_DEVICE(0x4C8A, info), \
+       INTEL_VGA_DEVICE(0x4C8B, info), \
+       INTEL_VGA_DEVICE(0x4C8C, info), \
+       INTEL_VGA_DEVICE(0x4C90, info), \
+       INTEL_VGA_DEVICE(0x4C9A, info)
+
+/* DG1 */
+#define INTEL_DG1_IDS(info) \
+       INTEL_VGA_DEVICE(0x4905, info), \
+       INTEL_VGA_DEVICE(0x4906, info), \
+       INTEL_VGA_DEVICE(0x4907, info), \
+       INTEL_VGA_DEVICE(0x4908, info), \
+       INTEL_VGA_DEVICE(0x4909, info)
+
+/* ADL-S */
+#define INTEL_ADLS_IDS(info) \
+       INTEL_VGA_DEVICE(0x4680, info), \
+       INTEL_VGA_DEVICE(0x4682, info), \
+       INTEL_VGA_DEVICE(0x4688, info), \
+       INTEL_VGA_DEVICE(0x468A, info), \
+       INTEL_VGA_DEVICE(0x4690, info), \
+       INTEL_VGA_DEVICE(0x4692, info), \
+       INTEL_VGA_DEVICE(0x4693, info)
+
+/* ADL-P */
+#define INTEL_ADLP_IDS(info) \
+       INTEL_VGA_DEVICE(0x46A0, info), \
+       INTEL_VGA_DEVICE(0x46A1, info), \
+       INTEL_VGA_DEVICE(0x46A2, info), \
+       INTEL_VGA_DEVICE(0x46A3, info), \
+       INTEL_VGA_DEVICE(0x46A6, info), \
+       INTEL_VGA_DEVICE(0x46A8, info), \
+       INTEL_VGA_DEVICE(0x46AA, info), \
+       INTEL_VGA_DEVICE(0x462A, info), \
+       INTEL_VGA_DEVICE(0x4626, info), \
+       INTEL_VGA_DEVICE(0x4628, info), \
+       INTEL_VGA_DEVICE(0x46B0, info), \
+       INTEL_VGA_DEVICE(0x46B1, info), \
+       INTEL_VGA_DEVICE(0x46B2, info), \
+       INTEL_VGA_DEVICE(0x46B3, info), \
+       INTEL_VGA_DEVICE(0x46C0, info), \
+       INTEL_VGA_DEVICE(0x46C1, info), \
+       INTEL_VGA_DEVICE(0x46C2, info), \
+       INTEL_VGA_DEVICE(0x46C3, info)
 
 #endif /* _I915_PCIIDS_H */

diff --git a/src/intel_module.c b/src/intel_module.c
index 7ea0f5d3..b29b3579 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -158,6 +158,10 @@ static const struct intel_device_info intel_tigerlake_info = {
        .gen = 0140,
 };
 
+static const struct intel_device_info intel_alderlake_info = {
+       .gen = 0151,
+};
+
 static const SymTabRec intel_chipsets[] = {
        {PCI_CHIP_I810,                         "i810"},
        {PCI_CHIP_I810_DC100,                   "i810-dc100"},
@@ -415,6 +419,36 @@ static const SymTabRec intel_chipsets[] = {
        {0x9A70, "HD Graphics"},
        {0x9A78, "HD Graphics"},
 
+       /* AlderLake */
+       /* ADLS */
+       {0x4680, "HD Graphics"},
+       {0x4682, "HD Graphics"},
+       {0x4688, "HD Graphics"},
+       {0x468A, "HD Graphics"},
+       {0x4690, "HD Graphics"},
+       {0x4692, "HD Graphics"},
+       {0x4693, "HD Graphics"},
+
+       /* ADLP */
+       {0x46A0, "HD Graphics"},
+       {0x46A1, "HD Graphics"},
+       {0x46A2, "HD Graphics"},
+       {0x46A3, "HD Graphics"},
+       {0x46A6, "HD Graphics"},
+       {0x46A8, "HD Graphics"},
+       {0x46AA, "HD Graphics"},
+       {0x462A, "HD Graphics"},
+       {0x4626, "HD Graphics"},
+       {0x4628, "HD Graphics"},
+       {0x46B0, "HD Graphics"},
+       {0x46B1, "HD Graphics"},
+       {0x46B2, "HD Graphics"},
+       {0x46B3, "HD Graphics"},
+       {0x46C0, "HD Graphics"},
+       {0x46C1, "HD Graphics"},
+       {0x46C2, "HD Graphics"},
+       {0x46C3, "HD Graphics"},
+
        /* When adding new identifiers, also update:
         * 1. intel_identify()
         * 2. man/intel.man
@@ -481,6 +515,9 @@ static const struct pci_id_match intel_device_match[] = {
 
        INTEL_TGL_12_IDS(&intel_tigerlake_info),
 
+       INTEL_ADLS_IDS(&intel_alderlake_info),
+       INTEL_ADLP_IDS(&intel_alderlake_info),
+
        INTEL_VGA_DEVICE(PCI_MATCH_ANY, &intel_generic_info),
 #endif
 
diff --git a/test/dri3-test.c b/test/dri3-test.c
index 4346aa97..fc920d1a 100644
--- a/test/dri3-test.c
+++ b/test/dri3-test.c
@@ -97,6 +97,9 @@ static const struct pci_id_match ids[] = {
        INTEL_HSW_IDS(075),
        INTEL_VLV_IDS(071),
        INTEL_BDW_IDS(0100),
+
+       INTEL_ADLS_IDS(0151),
+       INTEL_ADLP_IDS(0151),
 };
 
 static int i915_gen(int device)

With that, you can configure the intel-driver in your Xorg config and it will run smoothly with hw accelration.

Also if you are using Kodi as a standalone Mediacenter, you should probably use ALSA instead of pipewire or PulseAudio.
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#6
I'm using the default Fedora 35 Kodi package which is starting Kodi with systemd and X Server:
# cat /etc/systemd/system/kodi.service
[Unit]
Description = kodi-standalone using xinit
After = remote-fs.target systemd-user-sessions.service

[Service]
User = kodi
Group = kodi
PAMName = login
Type = simple
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch /usr/bin/kodi-standalone -- :0 -nolisten tcp

I'm using X with modesetting and early KMS.
I git the infos from here:
https://wiki.archlinux.org/title/intel_graphics
https://wiki.archlinux.org/title/Hardwar...celeration

Here ist the X11 Log.
https://paste.kodi.tv/batezijuku

Do i need to patch the source?
Reply
#7
You are using the modeset X11 driver and that has really annoying microstuttering issues.
Try using the "xf86-video-intel" driver, with the addition of the PCI-IDs I mentioned above, even if it's not really maintained anymore, it still runs smoother.

After that, your xorg config should look like this:
Code:
Section "Device"
        Identifier "Intel"
        BusId      "PCI:0:2.0"

        #Option "TripleBuffer" "false"
        Option "TearFree"     "true"
        Option "Throttle"     "false"

        Option "CustomEDID" "HDMI2:/lib/firmware/edid/edid.bin"
        Option "IgnoreEDID" "false"
        Option "UseEDID"    "true"
EndSection

Section "Monitor"
        Identifier      "LG"

        Option "PreferredMode"  "3840x2160@60"
        Option "DPMS"           "false"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Monitor         "LG"
        Device          "Intel"
#       DefaultDepth    30

        SubSection "Display"
                Modes   "3840x2160@60"
#               Depth    30
        EndSubSection
EndSection
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#8
Thank you so much for all this information!

The posted xorg.conf is your actual setting?
I'm asking because of CustomEDID and i have a Panasonic Smile

What version of xf86-video-intel did you create the diff?
Reply
#9
Yeah, actually it's one of two config files I have to switch between modeset driver and intel driver.
You can search the forum on howto create an EDID file or you comment that line out.

Looks like I used the repo from freedesktop
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply
#10
Would using Wayland makes a difference, because it uses it's own driver?
Does Wayland support hardware accelerated decoding anyway?
Reply
#11
You would have to install the latest intel driver of course but I guess you would have not such a hassle regarding hardware accelration.
I'm not sure how smooth it will run in windows, it's been more than a decade that I used kodi in Windows Smile

I've never tried it with wayland as I have a selfmade ambilight which is depending on X11
Kodi 21.0α | Ubuntu 22.04.3 | Kernel 6.4.x | intel i5-12600K | Gigabyte Z690 Gaming X DDR4 | Corsair 2x8192MB (DDR4-3200) | HDPlex H5v2 | HDPlex 400W HiFi DC-ATX | Pioneer VSX-934 | LG 65B7D
Reply

Logout Mark Read Team Forum Stats Members Help
Black screen0