We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

8 posts • Page 1 of 1
costel78
Posts: 22
Joined: Wed Sep 18, 2019 6:14 am

[solved] Raspberry Pi 5 with Gentoo

Sat Jan 20, 2024 5:10 pm

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

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
Any hint ?
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

Sat Jan 20, 2024 6:40 pm

Pi5 only supports h265 hardware acceleration.

costel78
Posts: 22
Joined: Wed Sep 18, 2019 6:14 am

Re: Raspberry Pi 5 with Gentoo

Sat Jan 20, 2024 7:31 pm

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.

costel78
Posts: 22
Joined: Wed Sep 18, 2019 6:14 am

[solved] Re: Raspberry Pi 5 with Gentoo

Sun Jan 21, 2024 2:41 pm

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 ;)

Gavinmc42
Posts: 8346
Joined: Wed Aug 28, 2013 3:31 am

Re: [solved] Raspberry Pi 5 with Gentoo

Sun Jan 21, 2024 2:52 pm

Start a github with wiki please.
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

costel78
Posts: 22
Joined: Wed Sep 18, 2019 6:14 am

Re: [solved] Raspberry Pi 5 with Gentoo

Mon Jan 22, 2024 11:21 am

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

Mon Jan 22, 2024 12:11 pm

costel78 wrote:
Sat Jan 20, 2024 7:31 pm
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.
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.

costel78
Posts: 22
Joined: Wed Sep 18, 2019 6:14 am

Re: [solved] Raspberry Pi 5 with Gentoo

Mon Jan 22, 2024 12:31 pm

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.

8 posts • Page 1 of 1

Return to "Gentoo"

AltStyle によって変換されたページ (->オリジナル) /