[solved] Raspberry Pi 5 with Gentoo
I compiled Gentoo on Raspberry Pi 5 with 8GB RAM, and my own custom kernel. But there is no hardware acceleration when playing videos, either in browser or using mpv. Mpv say vo is gpu, but playback is worse than on Raspberry Pi 4. Same result with official kernel.
Mesa is at ver. 23.3.3 with v3d and vc4 videocards enabled, kernel is 6.6.12, DE is xfce 4.19, firefox is v121, also vivaldi was used, ffmpeg has support for v4l2 mml. Tried also hyprland (full wayland), but same result. Of course, glxinfo report: direct rendering: Yes.
Video playback is very good only at HD resolution, CPU usage is relatively high, but no framedrop, is acceptable at 2K and completely broken at 4K resolution.
Why I am posting here and not in Gentoo section: I something that Bookworm on Pi have and is not upstreamed in mesa ? Is a setting in config.txt ?
Display resolution is not autodected, I had to put dtoverlay=vc4-kms-v3d-pi5 in config.txt to gain 4K resolution (both framebuffer and graphical interface).
Full config.txt
Any hint ?
Thank you!
Mesa is at ver. 23.3.3 with v3d and vc4 videocards enabled, kernel is 6.6.12, DE is xfce 4.19, firefox is v121, also vivaldi was used, ffmpeg has support for v4l2 mml. Tried also hyprland (full wayland), but same result. Of course, glxinfo report: direct rendering: Yes.
Video playback is very good only at HD resolution, CPU usage is relatively high, but no framedrop, is acceptable at 2K and completely broken at 4K resolution.
Why I am posting here and not in Gentoo section: I something that Bookworm on Pi have and is not upstreamed in mesa ? Is a setting in config.txt ?
Display resolution is not autodected, I had to put dtoverlay=vc4-kms-v3d-pi5 in config.txt to gain 4K resolution (both framebuffer and graphical interface).
Full config.txt
Code: Select all
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Additional overlays and parameters are documented
# /boot/firmware/overlays/README
# Automatically load overlays for detected cameras
camera_auto_detect=1
# Automatically load overlays for detected DSI displays
# display_auto_detect=1
# Automatically load initramfs files, if found
auto_initramfs=1
# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d-pi5
dtoverlay=rpivid-v4l2
max_framebuffers=2
gpu_mem=512
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
# disable_fw_kms_setup=1
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
[pi5]
dtparam=pwr_led_trigger=default-on
dtparam=pwr_led_activelow=off
dtparam=act_led_trigger=default-on
dtparam=act_led_activelow=off
usb_max_current_enable=1
disable_poe_fan=1
[all]
disable_splash=1
Thank you!
Last edited by costel78 on Sun Jan 21, 2024 2:42 pm, edited 1 time in total.
- keyboardman
- Posts: 272
- Joined: Tue Nov 21, 2023 6:48 pm
Re: Raspberry Pi 5 with Gentoo
Pi5 only supports h265 hardware acceleration.
Re: Raspberry Pi 5 with Gentoo
Oh, I forgot about this. So, smooth video playback waiting for Pi 6. h264 decoding support missing it's strange, as it's still a common standard.
But, anyway, video playback on Raspios it's still much better, than on my Gentoo.
But, anyway, video playback on Raspios it's still much better, than on my Gentoo.
[solved] Re: Raspberry Pi 5 with Gentoo
Problem solved , at least for HD and 2K.
First compiled mesa, ffmeg and mpv with -Ofast. Better, but not enough. What solved problem was using vo=x11 and hwdec=no for mpv and disable Hardware video decode for vivaldi and firefox.
Now thing are smoother than on RaspiOS up to 2K resolution. For 4K, waiting for Pi 6 ;)
First compiled mesa, ffmeg and mpv with -Ofast. Better, but not enough. What solved problem was using vo=x11 and hwdec=no for mpv and disable Hardware video decode for vivaldi and firefox.
Now thing are smoother than on RaspiOS up to 2K resolution. For 4K, waiting for Pi 6 ;)
Re: [solved] Raspberry Pi 5 with Gentoo
Start a github with wiki please.
When Sakaki vanished Gentoo64 lost a champion.
Even I could follow along when Sakaki left a trail.
When Sakaki vanished Gentoo64 lost a champion.
Even I could follow along when Sakaki left a trail.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: [solved] Raspberry Pi 5 with Gentoo
Unfortunately, my level of expertise is not even close to Sakaki. She was the expert. It would be turning into a blind leading another.
- jamesh
- Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator - Posts: 35174
- Joined: Sat Jul 30, 2011 7:41 pm
Re: Raspberry Pi 5 with Gentoo
The software-based H264 decoder on Pi 5 is better than the HW one on the PI4. It can cope with more formats and larger frames. You should get smooth playback up to 1080p60 at least (4kp30 possible I believe) when using VLC or Kodi. Bit less performant in browsers because of all the extra layers of SW that need to be traversed.
Software guy, working in the applications team.
Re: [solved] Raspberry Pi 5 with Gentoo
Yes, software decoding on Pi 5 is better. The issue was that, by default, hardware decoding was attempted with both h264 or VP9 codecs.
Playback it's OK with mpv, also.
What I still find strange is: same video VP9 1080@60 play smooth at HD - 1920x1080 resolution, few frame drops at 2K - 2650x1440 and is horrible at 4K 3840x2160 screen resolution. Does not matter if video are playing in window or full screen.
Playback it's OK with mpv, also.
What I still find strange is: same video VP9 1080@60 play smooth at HD - 1920x1080 resolution, few frame drops at 2K - 2650x1440 and is horrible at 4K 3840x2160 screen resolution. Does not matter if video are playing in window or full screen.
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion