Kodi renistall fails (v7.9.3)

Hi,

tried to reinstall Kodi on Raspberry Pi 4B 8GB. Just freshly updated to v7.9.3. Got this juicy error:

APT install for: kodi                                                                                                │ 
             │  - Command: apt-get -qq --allow-change-held-packages install kodi                                                    │ 
             │  - Exit code: 100                                                                                                    │ 
             │  - DietPi version: v7.9.3 (MichaIng/master) | HW_MODEL: 4 | HW_ARCH: 3 | DISTRO: 6                                   │ 
             │  - Image creator: DietPi Core Team                                                                                   │ 
             │  - Pre-image: from scratch                                                                                           │ 
             │  - Error log:                                                                                                        │ 
             │ (Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading dat │ 
             │ ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M│ 
             │ database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database │ 
             │ (Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading │ 
             │ database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 27272 files and direc │ 
             │ currently installed.)^M                                                                                              │ 
             │ Preparing to unpack .../kodi_2%3a19.3-1~bullseye_all.deb ...^M                                                       │ 
             │ Unpacking kodi (2:19.3-1~bullseye) over (2:19.1+dfsg2-2) ...^M                                                       │ 
             │ dpkg: error processing archive /var/cache/apt/archives/kodi_2%3a19.3-1~bullseye_all.deb (--unpack):^M                │ 
             │  trying to overwrite '/usr/share/icons/hicolor/128x128/apps/kodi.png', which is also in package kodi-data            │ 
             │ 2:19.1+dfsg2-2^M                                                                                                     │ 
             │ dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)^M                                               │ 
             │ Preparing to unpack .../kodi-bin_2%3a19.3-1~bullseye_arm64.deb ...^M                                                 │ 
             │ Unpacking kodi-bin (2:19.3-1~bullseye) over (2:19.1+dfsg2-2) ...^M                                                   │ 
             │ dpkg: error processing archive /var/cache/apt/archives/kodi-bin_2%3a19.3-1~bullseye_arm64.deb (--unpack):^M          │ 
             │  trying to overwrite '/usr/bin/kodi', which is also in package kodi 2:19.1+dfsg2-2^M                                 │ 
             │ dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)^M                                               │ 
             │ Errors were encountered while processing:^M                                                                          │ 
             │  /var/cache/apt/archives/kodi_2%3a19.3-1~bullseye_all.deb^M                                                          │ 
             │  /var/cache/apt/archives/kodi-bin_2%3a19.3-1~bullseye_arm64.deb^M                                                    │ 
             │ E: Sub-process /usr/bin/dpkg returned an error code (1)

Sent the bug report. Reference code: e43fe383-fc5f-4f1a-a4fc-70f3942b4b31

The install of DietPi is quite fresh itself, just previous version, it’s not updated from Buster.

Please purge the Debian Kodi packages first. The Raspberry Pi one seems to be composed a bit differently which causes this conflict:

apt purge --autoremove kodi
dietpi-software reinstall 31

That worked. But I’ve got another error while trying to install the addon repository.

apt install kodi-repository-kodi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  kodi-repository-kodi
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 55.2 kB of archives.
After this operation, 151 kB of additional disk space will be used.
Get:1 https://deb.debian.org/debian bullseye/main arm64 kodi-repository-kodi all 2:19.1+dfsg2-2 [55.2 kB]
Fetched 55.2 kB in 0s (269 kB/s)          
(Reading database ... 26804 files and directories currently installed.)
Preparing to unpack .../kodi-repository-kodi_2%3a19.1+dfsg2-2_all.deb ...
Unpacking kodi-repository-kodi (2:19.1+dfsg2-2) ...
dpkg: error processing archive /var/cache/apt/archives/kodi-repository-kodi_2%3a19.1+dfsg2-2_all.deb (--unpack):
 trying to overwrite '/usr/share/kodi/addons/repository.xbmc.org/addon.xml', which is also in package kodi 2:19.3-1~bullseye
Errors were encountered while processing:
 /var/cache/apt/archives/kodi-repository-kodi_2%3a19.1+dfsg2-2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is installing this package redundant?

maybe, can you check inside kodi if your already able to add repositories?

Hmm, I can’t because after reinstall it seems like nothing is going to HDMI. TV is saying “no signal”, even if I switch to console on autostart.

Must be related to either Kodi reinstall or DietPi upgrade, because it was working two days ago.

you even don’t see any boot output on screen while booting?

Nope. Surprisingly enough, it turns on the TV when I reboot the RPi, but then just “no signal”.

just for testing, are you able to connect the DietPi device to a different screen?

MichaIng
there seems to be an issue with the vc4-kms-v3d driver. As soon as it set in /boot/config.txt, the screen stays black. If I switch to the fake driver vc4-fkms-v3d output on screen is working again.

I just want to chime in that I’m getting the same problem on my end too, RPI4 B here. However, initially I did run into a

ERROR: Unable to create GUI. Exiting

So I decided to just purge and reinstall like the above and now after booting in I’m losing signal after I startx. Have not tried testing using fkms.
Edit: ok after a series of uninstall/reinstall, I’m back to square one with the Unable to create GUI error
I looked on kodi.tv forum and someone said " vc4 driver in order to use Kodi 19 on an RPi " but I am using that in my /boot/config.txt and still getting this issue.
Ok, I’m a little further now, I am now getting XDG_Runtime_dir not set or something, it flashes too quickly on screen but kodi launches, and in dietpi acc I lose my mouse and kb controls, so I decided to try using root acc and my kb and mouse work there so I suppose there is a permissions issue happening, but I still get the xdg_runtime_dir error, and this version of kodi runs painfully slow compared to the last version for some reason. I’m on LXDE

the Kodi version is the one provide by upstream Debian/Raspbian repository. We need to have a look what and how 19.3 changed. Give us some time.

The addons repository is integrated with the Kodi package on RPi, hence it is not required to install anything additionally and kodi-repository-kodi conflicts with the RPi kodi package. See also the different versions 19.1 vs 19.3.

The “no signal” is indeed an issue. I recognise that with full KMS the screen goes off (also “no signal”) for ~1 second when kernel logs switch over to userland logs, but then turns back on. Maybe some HDMI screens do not correctly react to this wakeup. I guess the KMS driver is enabled a bit later while early boot messages are done via legacy framebuffer driver. Just one idea I have is to raise the HDMI signal strength. Can be done in dietpi-config or /boot/dietpi.txt directly.

Also can you paste:

cat /boot/config.txt
# Docs: https://github.com/raspberrypi/documentation/blob/master/configuration/config-txt/README.md
# Overlays: https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

#-------Display---------
# Max allocated framebuffers: Set to "0" in headless mode to reduce memory usage
# - Defaults to "2" on RPi4 and "1" on earlier RPi models
#max_framebuffers=2

# If you get no picture, set the following to "1" to apply most compatible HDMI settings.
#hdmi_safe=1

# Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display.
# - Values from "0" to "11" are allowed, use values above "7" only if required, e.g. with very long
# - Default on first RPi1 A/B is "2", else "5", on RPi4 this setting is ignored.
#config_hdmi_boost=5

# Uncomment if HDMI display is not detected and composite is being outputted.
#hdmi_force_hotplug=1

# Uncomment to disable HDMI even if plugged, e.g. to force composite output.
#hdmi_ignore_hotplug=0

# Uncomment to force a console size. By default it will be display's size minus overscan.
framebuffer_width=1920
framebuffer_height=1080

# Uncomment to enable SDTV/composite output on RPi4. This has no effect on previous RPi models.
#enable_tvout=0
# SDTV mode
#sdtv_mode=0

# Uncomment to force a specific HDMI mode (this will force VGA).
#hdmi_group=1
#hdmi_mode=1

# Uncomment to force an HDMI mode rather than DVI. This can make audio work in DMT (computer monito
#hdmi_drive=2

# Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes without input.
# With default value "0", the display shows a blank screen instead, but will not go into standby.
# NB: With "1" some applications (e.g. Kodi, OMXPlayer) cannot prevent display standby due to missi
#hdmi_blanking=0

# Set to "1" if your display has a black border of unused pixels visible.
disable_overscan=1

# Uncomment the following to adjust overscan. Use positive numbers if console goes off screen, and 
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# Rotation
#display_hdmi_rotate=0
#lcd_rotate=0

#-------RPi camera module-------
#start_x=1
#disable_camera_led=1

#-------GPU memory splits-------
gpu_mem_256=192
gpu_mem_512=448
gpu_mem_1024=512

#-------Boot splash screen------
disable_splash=1

#-------Onboard sound-----------
dtparam=audio=on

#-------I2C-------------
dtparam=i2c_arm=on
#dtparam=i2c_arm_baudrate=100000

#-------SPI-------------
#dtparam=spi=off

#-------Serial/UART-----
# NB: "enable_uart=1" will forcefully set "core_freq=250" on WiFi/BT-capable RPi models, unless "fo
enable_uart=0

#-------SD card HPD-----
# Comment to enable SD card hot-plug detection, while booting via USB or network.
# NB: This causes contant CPU load and kernel errors when no SD card is inserted.
dtparam=sd_poll_once

#-------Overclock-------
temp_limit=75
initial_turbo=20

#over_voltage=0
#arm_freq=1500
#core_freq=500

#over_voltage_min=0
#arm_freq_min=300
#core_freq_min=250
#sdram_freq_min=400
arm_64bit=1
dtoverlay=disable-wifi
hdmi_enable_4kp60=1
dtoverlay=rpivid-v4l2
dtoverlay=vc4-kms-v3d,cma-512,cma-512

Okay four things to try:

  1. Remove/comment the three gpu_mem_ settings. Since Bullseye, Kodi does not make use of the additional GPU memory anymore. This is now done via CMA which can be shared with system memory instead of being reserved. So that additional ~450 MiB are wasted when reserving them for the GPU.

  2. There is a bug in the script which applies 512 MiB CMA, so that the parameter is doubled. I’m not sure whether this can cause issues, but try to solve by running this command:

sed -Ei '/dtoverlay=vc4-f?kms-v3d.*,cma-.*,cma-/s/,cma-[^,]*//' /boot/config.txt

Fixed also our end: https://github.com/MichaIng/DietPi/commit/a35ce55

  1. Comment framebuffer_width and framebuffer_height and let it adapt to screen dimensions.

  2. Try:

G_CONFIG_INJECT 'config_hdmi_boost=' 'config_hdmi_boost=7' /boot/config.txt

Remember that all changes to config.txt require a reboot to take effect.

Applied and can confirm HDMI functionality. :+1:

You didn’t try one after another to know which one was the solution, did you? :smiley:
However, I can do the tests myself by times, at least with fixed resolution and too weak HDMI signal. Great that it works now :slight_smile:.

You didn’t try one after another to know which one was the solution, did you? > :smiley:

No, it actually downed on me I should have right after I’ve put everything there. :slight_smile:

I have another Pi4 with Kodi, which I assume gonna have the same problem. I’ll be on it’s location over the weekend and can redeem myself. :smiley:

No problem, at least your HDMI output is back up :slight_smile:.

The first option (comment the three gpu_mem_ settings) resolved the issue with no HDMI signal on my second RPi 4. :slight_smile:

Thanks for the support and the best SBC OS.

Happy holidays.