I just installed DietPi and had Kodi working yesterday, but it’s not working now. When I start Kodi, the screen goes black for few seconds and comes back without any warning or error message.
I successfully setup squeezelite and RealVNC today. Is there a conflict among these softwares?
This time I try to run Kodi (by clicking on the icon or use startkodi), it shows a black screen with “Unable to Create GUI. Exiting.” on the top right corner. Then it freezes.
ok I setup a RPi3B+ using same version as you. Installed LEDX + Kodi and selected autostart option 2 : Automatic login. This way I’m able to start kodi from desktop without issues. What version of Kodi you are running
When I freshly installed DietPi two days ago, I was able to start Kodi and it was v19.3. Then I setup RealVNC and Squeezelite, and turned off my RPi. Then I couldn’t start Kodi the very next day.
Kodi cannot be viewed through VNC due to how it interacts with the display. It is direct and not via the normal routes, which basically makes it invisible to VNC and other remote desktop apps.
I removed Kodi and reinstalled it. Now Kodi works, well partially.
I have difficulties setting up the sound card, which is a Hifiberry DAC2 Pro.
In Audio Options, if I use the one in Auto Detection (hw:1,0), I don’t get sound in Kodi. I can’t even find hifiberry option in Kodi audio setup.
If I use hifiberry-dacplus, I get sound in Kodi, but lose sound from the system (no sound watching YouTube) and no sound from Squeezelite service.
Also, to get YouTube sound, I need to stop squeezelite service. This is so inconvenient.
I think this is due to the additional KMS audio devices which show up with different card index recently. Please check:
aplay -l
The DAC, depending on RPi model, shows as card 1 or card 2. Replace the card index in /etc/asound.conf accordingly, which should restore system sound. In Kodi you can define/select the sound card explicitly, which is why it works. When /etc/asound.conf is fixed, in Kodi you can also select “default” which should then be the DAC as well.
I’ll play a bit with the different conditions of the sound card appearance and indices to ship a reliable selection with DietPi v8.0, independant of KMS being used or not. The required logic has become more complicated.
Sorry I was on a trip over Christmas days. Strange that the USB DAC does not appear in Kodi audio settings, and also I was expecting a “default” ALSA device which now correctly points to the DAC. I’ll test this at home.
That only one player can access each audio device is normal on Linux with ALSA. There is a dmix plugin which allows concurrent payback, but the RPi VC4 HDMI audio device(s) do not support it, discussed just recently on the RPi GitHub . Probably Kodi does even hide the DAC as it is currently used by Squeezelite. Could be tested via:
systemctl stop squeezelite
startkodi
If this works, I can give you instructions about how to enable the dmix plugin. Looks like this is another reasonable addition for our audio options, apart of fixing the sound card selection when these VC4 HMDI devices are present.
Ah right, I forgot about that option. I just had a look, when installed via dietpi-software, the service file should start Squeezelite with -C 5 automatically . Did you install it manually?
Strange . I’ll test this as well, probably there is a minimum value or the other of the options play a role?
I could verify that a USB DAC shows up find in Kodi, when not in use by other software. Furthermore it is possible to disable the VC4 HDMI devices completely. One can add ,noaudio to the end of the dtoverlay=vc4-kms-v3d line. But RPi onboard audio must be completely disabled then, at least the onboard firmware HDMI devices. As long as not rpi-bcm2835-auto or rpi-bcm2835-hdmi is selected in dietpi-config audio options, this should be the case already, hence in your case it should work fine.
Background is that when ,noaudio is added while the firmware HDMI audio device is not disabled, it shows up again as “replacement” for the VC4 HDMI audio device, but it remains non-functional and worse: If anything (like Kodi, but also speaker-test etc) tries to play sound through the firmware HDMI device while KMS is enabled, HDMI output goes blank and cannot be recovered until a reboot or power cycle is done. I’ll implement it so that ,noaudio is added automatically when not rpi-bcm2835-auto or rpi-bcm2835-hdmi are selected as audio devices, so regardless whether KMS is enabled or not, both HDMI device variants are enabled/disabled always together.