New Mesa drivers

I am running on the RC kernel and I have never installed kodi before. I will try to revert this kodi install but I need to fix my X11 first. It has issues at the moment, chrome is messed-up and displays like a candy cane… swirled, I can not see the systems settings window contents (all black).

If this libva issue is normal, I am lost at the moment as to what is wrong. I will keep looking into it.

OK, backing up a bit. I hate when things are not repeatable… and the first thing is the video driver.

$ cat /boot/config.txt

# See /boot/overlays/README for all available options

# firmware
#total_mem=4096
#gpu_mem=64
gpu_mem=320
arm_64bit=1
enable_gic=1

# overclocking
over_voltage=6
arm_freq=2000
gpu_freq=750

# vc4
dtoverlay=vc4-fkms-v3d, cma-384
dtoverlay=rpivid-v4l2
#dtoverlay=vc4-kms-v3d-pi4

# display
disable_overscan=1
max_framebuffers=2
#hdmi_enable_4kp60=1

# sound
dtparam=audio=on
hdmi_drive=2

# bluetooth
dtoverlay=disable-bt

# os
initramfs initramfs-linux.img followkernel
kernel=kernel8.img

$ pacman -Ss mesa | grep installed

extra/glu 9.0.1-2 [installed]
extra/mesa-demos 8.4.0-4 [installed]
extra/mesa-git 21.0.0_devel.131403.5b77b14448c-1 [installed]

$ glxinfo | grep -i “OpenGL renderer”

OpenGL renderer string: V3D 4.2

I assume this should be llvmpipe since you specified that I install xf86-video-fbturbo-git. If I have mesa-git installed, it always finds the v3d driver. If I revert to mesa-20.2.3-1 and reboot, llvmpipe will be used.

If I understand @darksky correctly, this is not the behavior he experiences. llvmpipe will load for him with mesa-git installed.

If I “force” llvmpipe to load by rolling back the mesa version, I have X11 issues and kodi does not use HW acceleration.

As for kodi, I have never installed it before.

$ pacman -Ss kodi | grep installed

community/kodi-bin 18.9-1 [installed]
community/p8-platform 2.1.0.1-4 [installed]

I would think the provided kodi packages that I downloaded and installed would be listed. But kodi does run without issue except for the lack of hw acceleration and the libva error.

$ pacman -Qi kodi

Name            : kodi-rbp4-git
Version         : 19.0b1.56668.d9e7154f52-1
Description     : A software media player and entertainment hub for digital media (Raspberry Pi4/gbm only)
Architecture    : aarch64
URL             : http://kodi.tv
Licenses        : GPL2
Groups          : None
Provides        : xbmc  kodi
Depends On      : desktop-file-utils  hicolor-icon-theme  mesa  python-pycryptodomex  python-pillow  python-simplejson  xorg-xdpyinfo  bluez-libs  curl  lcms2  libass  libbluray  libcdio  libinput
                  libmicrohttpd  libnfs  libpulse  libva  libxkbcommon  libxslt  lirc  mariadb-libs  python2  smbclient  taglib  tinyxml  polkit  linux>=5.4.35  shairplay  dav1d  libplist  libcec
Optional Deps   : afpfs-ng: Apple shares support
                  bluez: Blutooth support [installed]
                  python-pybluez: Bluetooth support
                  lsb-release: log distro information in crashlog [installed]
Required By     : kodi-bin  kodi-dev-rbp4-git
Optional For    : None
Conflicts With  : xbmc  kodi  arm-mem-git  shairplay-git
Replaces        : xbmc-rbp-git
Installed Size  : 89.78 MiB
Packager        : Unknown Packager
Build Date      : Fri 27 Nov 2020 06:14:23 PM CST
Install Date    : Sat 28 Nov 2020 04:06:04 PM CST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : None

$ pacman -Qdtq

kodi-bin
python2-pillow
python2-pycryptodomex
python2-simplejson
sndio

Edit: The python2 packages were installed when I installed the kodi packages. I did not have any python2 packages installed previously.

That is what I have also but this kodi not run in graphical mode and you will not get any glxinfo when you switch out of graphical mode.

You need to get rid of all of the kodi packages including the kodi 19 ones of mine. The p8-platform needs to stay installed:

[ray@pi4 kodi-git]$ pacman -Ss kodi | grep installed
community/p8-platform 2.1.0.1-4 [installed]
[ray@pi4 kodi-git]$ 
[ray@pi4 kodi-git]$ pacman -Qm | grep kodi
kodi-dev-rbp4-git 19.0b1.56668.d9e7154f52-1
kodi-eventclients-rbp4-git 19.0b1.56668.d9e7154f52-1
kodi-rbp4-git 19.0b1.56668.d9e7154f52-1
kodi-tools-texturepacker-rbp4-git 19.0b1.56668.d9e7154f52-1

Also in config.txt I have found out the gpu_mem can stay at gpi_mem=64.

And since you can do dtoverlay=vc4-kms-v3d (which I can not they say this is recommended. You can try it:

dtoverlay=vc4-kms-v3d, cma-384

For high bitrates and large monitors the cma values might even need to be 512

I am starting to get some intermittent issues with kodi 18 showing up now. Looking at that guy’s PKGBUILD he has provides=(‘kodi-dev’) and there is also a kodi-dev 18 package in the repo so I am thinking pacman at times think it is installed. I will have to change the provides for all 4 of those packages but that should not affect running kodi 19 I would think.

Interesting, well, at least to me. First attempt at using the kms version and my boot stalled at starting the graphical interface. I will mess around a bit with this before moving back to my kodi issue.

You do have xf86-video-fbturbo-git installed and /etc/X11/xorg.conf.d/99-fbturbo.conf exists?

Well the situation just got weird and now I will have to put my thinking hat on. I noticed my fbturbo was disabled and kodi was working just fine so I enabled it and it still worked ok but I now have llvmpipe in glxinfo.

The guy never said anything about disabling fbturbo and since he uses arch-arm I know it normally gets installed.

The problem is with fbturbo enabled the gpu uses gpu_mem= for it’s memory and with out fbturbo it gets it from cma. Since in his directions he said to disable any custom gpu_mem= that means that it would use the system default gpu_mem=64.

I am unable to get my graphical system started with

dtoverlay=vc4-kms-v3d, cma-384

It just hangs during boot. The sddm process starts but X11 does not, no errors, no log file. If I use

dtoverlay=vc4-kms-v3d-pi4, cma-384

booting continues and my graphical interface comes up… but is messed up.

Chromium:

System Settings:

I got that a few weeks ago when I compiled the upstream kernel to test where they were with support for the pi4. The problem was my VIZIO tv not getting recognized properly. I had an old computer monitor I hooked up and the picture was perfect. But your issue seems to be with a program. Mine was with the desktop and all programs

The strange think with the issue is I took a screenshot to show strit and the screenshot looked perfect.

Have you tried deleting the ~/.config/chromium ~/.cache/chromium directories to flush things out?

No, I have not really tried much to fix things. It starts to get into the “if it is hard, I’m probably doing it wrong” area. :slight_smile:

If I revert to this config.txt,

# See /boot/overlays/README for all available options

# firmware
#total_mem=4096
#gpu_mem=384
gpu_mem=64
arm_64bit=1
enable_gic=1

# overclocking
over_voltage=6
arm_freq=2000
gpu_freq=750

# vc4
#dtoverlay=vc4-fkms-v3d, cma-384
#dtoverlay=vc4-kms-v3d, cma-384
dtoverlay=vc4-kms-v3d-pi4
#dtoverlay=rpivid-v4l2

# display
disable_overscan=1
max_framebuffers=2
hdmi_enable_4kp60=1

# sound
dtparam=audio=on
hdmi_drive=2

# bluetooth
dtoverlay=disable-bt

# os
initramfs initramfs-linux.img followkernel
kernel=kernel8.img

chromium is fine and so is my System Settings. However, still have the kwin compositor failing but glxgears runs properly.

And to clarify, you get the same libva errors with vainfo and kodi but your desktop and kodi work as expected?

Yes. No VAAPI support on the RPi yet.

Try this and reboot and see what happens. Might have to increase the gpu_mem=

sudo mv /etc/X11/xorg.conf.d/99-fbturbo.conf /etc/X11/xorg.conf.d/99-fbturbo~

Might have to have this if you get Can not create GUI

dtoverlay=vc4-fkms-v3d, cma-384

I have tried moving the 99-fbturbo file before too. It did not seem to change things.

If I login via Wayland, all seems to be good… kwin compositor works. So this is at least a reversible process to a stable setup.

Edit: But I will try moving the file and making the config.txt changes.

With dtoverlay=vc4-kms-v3d-pi4 and xf86-video-fbturbo-git installed, llvmpipe is the driver and my X11 is now wonky again, as expected.

The 99-fbturbo file is in place. I will now move it and reboot.