[armv7][kodi] Pi3B+ - FBIOPUT_VSCREENINFO Invalid argument

Problems with packages? Post here, using [tags] of the package name.

[armv7][kodi] Pi3B+ - FBIOPUT_VSCREENINFO Invalid argument

Postby kieto » Thu Oct 29, 2020 8:09 pm

Hi everyone,

I have an armv7 raspberry pi 3B+ running Kodi and Wireguard, which I updated today:

$this->bbcode_second_pass_code('', '
$ pacman -Syu

Running 'pacman -Syu'
synchronizing package lists
starting full system upgrade
running '71-dkms-remove.hook'...
==> dkms remove --no-depmod -m wireguard -v 1.0.20200908 -k 5.4.72-1-ARCH
==> depmod 5.4.72-1-ARCH
transaction started
upgraded libevdev (1.9.1-1 -> 1.10.0-1)
upgraded libgcrypt (1.8.6-1 -> 1.8.7-1)
upgraded libpulse (13.99.2+13+g7f4d7fcf5-1 -> 13.99.2+22+ga9c6d43b7-1)
upgraded linux-raspberrypi (5.4.72-1 -> 5.4.73-1)
upgraded linux-raspberrypi-headers (5.4.72-1 -> 5.4.73-1)
upgraded raspberrypi-bootloader (20201016-1 -> 20201029-1)
upgraded raspberrypi-bootloader-x (20201016-1 -> 20201029-1)
upgraded raspberrypi-firmware (20201016-1 -> 20201029-1)
transaction completed
running '30-systemd-update.hook'...
running '60-depmod.hook'...
running '60-linux-raspberrypi.hook'...
running '70-dkms-install.hook'...
==> dkms install --no-depmod -m wireguard -v 1.0.20200908 -k 5.4.73-1-ARCH
==> depmod 5.4.73-1-ARCH
running '90-linux-raspberrypi.hook'...
==> Building image from preset: /etc/mkinitcpio.d/linux-raspberrypi.preset: 'default'
-> -k 5.4.73-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.4.73-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
running 'texinfo-install.hook'...
')

After that, I rebooted the machine and Kodi was not shown on the TV screen anymore. Looking at kodi.service, I found that it had failed:

$this->bbcode_second_pass_code('', '
$ systemctl status kodi.service

* kodi.service - Kodi standalone
Loaded: loaded (/usr/lib/systemd/system/kodi.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-10-29 20:25:31 CET; 11s ago
Process: 297 ExecStartPre=/bin/sh -c echo 0 > /sys/class/vtconsole/vtcon1/bind (code=exited, status=0/SUCCESS)
Process: 301 ExecStartPre=/usr/bin/fbset -g 4 2 4 2 32 (code=exited, status=1/FAILURE)
Process: 306 ExecStopPost=/usr/bin/fbset -g $RESTOREMODE (code=exited, status=0/SUCCESS)
Process: 315 ExecStopPost=/bin/sh -c echo 1 > /sys/class/vtconsole/vtcon1/bind (code=exited, status=0/SUCCESS)

Oct 29 20:25:31 alarmpi systemd[1]: Starting Kodi standalone...
Oct 29 20:25:31 alarmpi fbset[301]: ioctl FBIOPUT_VSCREENINFO: Invalid argument
Oct 29 20:25:31 alarmpi systemd[1]: kodi.service: Control process exited, code=exited, status=1/FAILURE
Oct 29 20:25:31 alarmpi systemd[1]: kodi.service: Failed with result 'exit-code'.
Oct 29 20:25:31 alarmpi systemd[1]: Failed to start Kodi standalone
')

I've then downgraded the installed packages using the pacman cache, except libgcrypt which I couldn't find in pacman cache directory:

$this->bbcode_second_pass_code('', '
$ cd /var/cache/pacman/pkg/
$ pacman -U libevdev-1.9.1-1-armv7h.pkg.tar.xz libpulse-13.99.2+13+g7f4d7fcf5-1-armv7h.pkg.tar.xz linux-raspberrypi-5.4.72-1-armv7h.pkg.tar.xz linux-raspberrypi-headers-5.4.72-1-armv7h.pkg.tar.xz raspberrypi-bootloader-20201016-1-any.pkg.tar.xz raspberrypi-bootloader-x-20201016-1-any.pkg.tar.xz raspberrypi-firmware-20201016-1-armv7h.pkg.tar.xz

warning: downgrading package libevdev (1.10.0-1 => 1.9.1-1)
warning: downgrading package libpulse (13.99.2+22+ga9c6d43b7-1 => 13.99.2+13+g7f4d7fcf5-1)
warning: downgrading package linux-raspberrypi (5.4.73-1 => 5.4.72-1)
warning: downgrading package linux-raspberrypi-headers (5.4.73-1 => 5.4.72-1)
warning: downgrading package raspberrypi-bootloader (20201029-1 => 20201016-1)
warning: downgrading package raspberrypi-bootloader-x (20201029-1 => 20201016-1)
warning: downgrading package raspberrypi-firmware (20201029-1 => 20201016-1)
resolving dependencies...
looking for conflicting packages...

Packages (7) libevdev-1.9.1-1 libpulse-13.99.2+13+g7f4d7fcf5-1 linux-raspberrypi-5.4.72-1 linux-raspberrypi-headers-5.4.72-1
raspberrypi-bootloader-20201016-1 raspberrypi-bootloader-x-20201016-1 raspberrypi-firmware-20201016-1

Total Installed Size: 103.57 MiB
Net Upgrade Size: 0.05 MiB

:: Proceed with installation? [Y/n]
(7/7) checking keys in keyring [######################################################] 100%
(7/7) checking package integrity [######################################################] 100%
(7/7) loading package files [######################################################] 100%
(7/7) checking for file conflicts [######################################################] 100%
(7/7) checking available disk space [######################################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove DKMS modules
==> dkms remove --no-depmod -m wireguard -v 1.0.20200908 -k 5.4.73-1-ARCH
==> depmod 5.4.73-1-ARCH
:: Processing package changes...
(1/7) downgrading libevdev [######################################################] 100%
(2/7) downgrading libpulse [######################################################] 100%
(3/7) downgrading linux-raspberrypi [######################################################] 100%
(4/7) downgrading linux-raspberrypi-headers [######################################################] 100%
(5/7) downgrading raspberrypi-bootloader [######################################################] 100%
(6/7) downgrading raspberrypi-bootloader-x [######################################################] 100%
(7/7) downgrading raspberrypi-firmware [######################################################] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Updating linux-raspberrypi module dependencies...
(4/5) Install DKMS modules
==> dkms install --no-depmod -m wireguard -v 1.0.20200908 -k 5.4.72-1-ARCH
==> depmod 5.4.72-1-ARCH
(5/5) Updating linux-raspberrypi initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-raspberrypi.preset: 'default'
-> -k 5.4.72-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.4.72-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
')

After that, I rebooted again the machine, and kodi.service was able to work again:

$this->bbcode_second_pass_code('', '
$ systemctl status kodi.service

* kodi.service - Kodi standalone
Loaded: loaded (/usr/lib/systemd/system/kodi.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-10-29 20:33:11 CET; 35s ago
Process: 291 ExecStartPre=/bin/sh -c echo 0 > /sys/class/vtconsole/vtcon1/bind (code=exited, status=0/SUCCESS)
Process: 296 ExecStartPre=/usr/bin/fbset -g 4 2 4 2 32 (code=exited, status=0/SUCCESS)
Main PID: 298 (kodi-rbpi)
Tasks: 31 (limit: 1606)
CGroup: /system.slice/kodi.service
`-298 /usr/lib/kodi/kodi-rbpi --standalone

Oct 29 20:33:11 alarmpi systemd[1]: Starting Kodi standalone...
Oct 29 20:33:11 alarmpi systemd[1]: Started Kodi standalone.
')

It seems that everything comes down to the following service command:

$this->bbcode_second_pass_code('', '
/usr/bin/fbset -g 4 2 4 2 32
')

This command shows no output on kernel 5.4.72-1-ARCH, but fails with the following error on kernel 5.4.73-1-ARCH:

$this->bbcode_second_pass_code('', '
ioctl FBIOPUT_VSCREENINFO: Invalid argument
')

Any idea how to be able to fix this in the newer kernel? Any help on how to debug this is appreciated, thanks :)

UPDATE (2020-10-30): removing the fbset command from the kodi.service file seems to fix Kodi, as said by someone in the #archlinux-arm IRC channel on Freenode. But anyway, is there a reason to have that command there modifying the framebuffer? Is the removal of the command the proper way to fix it?
kieto
 
Posts: 2
Joined: Fri Oct 16, 2020 4:15 pm

Re: [armv7][kodi] Pi3B+ - FBIOPUT_VSCREENINFO Invalid argume

Postby blacksad » Sat Oct 31, 2020 7:31 pm

This happened after changes in kernel 5.4.73
https://github.com/raspberrypi/linux/co ... 5e38af7176

Replacing the fbset command with
$this->bbcode_second_pass_code('', '/usr/bin/fbset -g 8 8 8 8 32')
should fix this.
blacksad
 
Posts: 12
Joined: Sat Oct 31, 2020 7:10 pm

Re: [armv7][kodi] Pi3B+ - FBIOPUT_VSCREENINFO Invalid argume

Postby graysky » Sat Oct 31, 2020 8:21 pm

@kieto - Thank you for reporting this. To answer your question, the command frees up memory allowing more for video decoding. A trick that LibreLE uses.

@blacksad - Thank you for sharing a fix and calling out the upstream commit. Very helpful. I modified the kodi.service as you directed and it works on my test 3B+. Fix should hit the repos shortly.
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to Packages

Who is online

Users browsing this forum: No registered users and 4 guests