Slackware - ARM This forum is for the discussion of Slackware ARM. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-11-2019, 08:06 AM
|
#1
|
Senior Member
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,278
|
Browser Hardware Acceleration on raspberry pi
So, one of the significant differences that I have noticed between raspbian and Slackware for the raspberry pi is the support for hardware acceleration. For example, using chromium on raspbian, I can watch just about any HD video without stuttering. They play very smooth. The closest browser that I can test with on Slackware is vivaldi. I cannot even come close to that kind of a performance, even after tweaking the gpu flags.
So my question is, does anyone know if raspbian is using some sort of closed source library to achieve that kind of performance? Obviously, I'm trying to replicate this on Slackware. I'm not overly familiar with deb packages, or Debian for that matter. So, I'm not sure how to view the source (their equivalent of a Slackbuild or spec file) to see what flags they are using when compiling chromium. Any thoughts would be greatly appreciated.
|
|
|
01-12-2019, 12:17 AM
|
#2
|
Senior Member
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634
|
I don't have experience with building chromium, because I don't use it in the first place, don't trust it protecting my privacy. You're right there are a lot of performance tweaks to be found in Raspbian that are not to be found in Slackware ARM, there are dedicated resources and concentrated focus on this, I mentioned this performance difference once before and almost got a $h1tstorm coming down my way, never understood why, as Raspberries are not officially supported by Slackware ARM, so I won't elaborate on this anymore.
The source of patches and code modifications is:
https://github.com/RPi-Distro
And they have a section for Chromium:
https://github.com/RPi-Distro/chromi...debian/patches
Note that those patches are for Debian, which is the base of Raspbian and you might need to adapt them for Slackware ARM.
I'm pretty sure you'll need to link the MESA libs from /opt/vc to your build and not sure if using the FFMPEG compilation I documented as shared libs would suffice. That build is fitted with all the required flags for HW Acceleration and should work, Kodi is happy with it.
https://www.linuxquestions.org/quest...on-4175612537/
Looks like Chromium is building FFMPEG on its own and you might want to disable that, or let it build it and don't use the FFMPEG build for Kodi. You'll need to study the Chromium build scripts a little closer.
I guess you'll also need to enable the HW acceleration in the Browser:
https://www.pcsuggest.com/chrome-hardware-acceleration/
If you'll need any further help on this, I'd suggest to get on the Raspberry Forums and ask about building details, say that you don't use Raspbian and be prepared to get banned, then come back here and fight your way back into the Slackware ARM suburbia/ghetto, but you'll be fine if you're into biscuits 
|
|
1 members found this post helpful.
|
01-12-2019, 04:33 AM
|
#3
|
Slackware Contributor
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675
|
Quote:
Originally Posted by stormtracknole
So, one of the significant differences that I have noticed between raspbian and Slackware for the raspberry pi is the support for hardware acceleration. For example, using chromium on raspbian, I can watch just about any HD video without stuttering. They play very smooth. The closest browser that I can test with on Slackware is vivaldi. I cannot even come close to that kind of a performance, even after tweaking the gpu flags.
So my question is, does anyone know if raspbian is using some sort of closed source library to achieve that kind of performance? Obviously, I'm trying to replicate this on Slackware. I'm not overly familiar with deb packages, or Debian for that matter. So, I'm not sure how to view the source (their equivalent of a Slackbuild or spec file) to see what flags they are using when compiling chromium. Any thoughts would be greatly appreciated.
|
The easiest way to view the build logs for Debian:
https://buildd.debian.org/status/log...f&pkg=chromium
I don't have much knowledge about video hardware acceleration, but mostly Mesa tends to need to have some drivers enabled.
Quite a few people start about recompiling Mesa, but the Slackware ARM -current version of Mesa already contains a few of the accelerations required (although I think most of them were included in the x86 build now, so there may not be much difference between the ARM and x86 SlackBuilds):
ftp://ftp.arm.slackware.com/slackwar...esa.SlackBuild
You also should check what X11 driver you're using in Raspbian. You may need to build it in Slackware, or if it exists already, configure X11 to use it.
These are the extra X11 drivers:
Code:
root@zippy:~# cat ~/ac/source/x/tagfile.addpkgs
# This file contains the additional X packages for Slackware ARM.
# This one's really useful:
xf86-video-fbdev:ADD
# Replacement fbdev driver. Also for some AllWinner SoCs.
xf86-video-fbturbo:REC
# Samsung Chromebook:
xf86-video-armsoc:REC
# NVIDIA Tegra:
xf86-video-opentegra:REC
# OMAP AM57x for EXA and Xv GC320 2D acceleration with etnaviv
xf86-video-armsoc_omap5:REC
root@zippy:~#
Remember that Raspbian is built specifically for Raspberry Pi's where as other distributions aren't, so it _may_ be that you can never match the performance.
Last edited by drmozes; 01-12-2019 at 04:53 AM.
|
|
2 members found this post helpful.
|
01-12-2019, 06:14 AM
|
#4
|
Senior Member
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634
|
Quote:
Originally Posted by drmozes
I don't have much knowledge about video hardware acceleration, but mostly Mesa tends to need to have some drivers enabled.
Quite a few people start about recompiling Mesa, but the Slackware ARM -current version of Mesa already contains a few of the accelerations required (although I think most of them were included in the x86 build now, so there may not be much difference between the ARM and x86 SlackBuilds):
ftp://ftp.arm.slackware.com/slackwar...esa.SlackBuild
|
You're right, the vc4 driver for the GPU that is used in all Raspberry boards is newly (half a year or so) already included in the mesa.Slackbuild
Code:
export GALLIUM_DRIVERS="radeonsi,swrast,r600,freedreno,vc4,virgl,r300,nouveau"
But I'm not sure it'll suffice, there might be some other optimizations in the code Raspberry is providing (compiled and residing in /opt/vc)
https://github.com/raspberrypi/userland
I'll try to build FFMPEG & Kodi with the default Slackware MESA libs if I'll get some spare time - in a week or two - and will report back.
|
|
1 members found this post helpful.
|
01-12-2019, 07:58 AM
|
#5
|
Senior Member
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,278
Original Poster
|
Thank both so very much for your input. Raspbian definitely feels a lot snappier for obvious reasons since they have a team works on this and I'm sure they use their userland stuff to maximize every bit of their hardware. I wonder why Firefox cannot take advantage of the custom FFMPEG using the hardware acceleration tweak that you posted. I don't know of a way that Firefox can link to /opt/vc, but I haven't tried. I would think you don't need to if ffmpeg is already doing that for you. I wonder why it doesn't work? I'll keep pocking around this weekend. Thanks again for your valuable inputs.
|
|
|
01-12-2019, 04:46 PM
|
#6
|
Senior Member
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634
|
The standard MESA package that comes with Slackware ARM looks to support OpenMAX:
https://www.mesa3d.org/intro.html
Quote:
Over the years the project has grown to implement more graphics APIs, including OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC and Vulkan.
|
But I couldn't find anything about the MMAL HW acceleration.
Reference OpenMAX (OMX) & MMAL:
https://elinux.org/Raspberry_Pi_VideoCore_APIs
https://kodi.wiki/view/Raspberry_Pi_...normal_Kodi.3F
The userland stuff (including MESA) from Raspberry include both MMAL & OpenMAX:
https://github.com/raspberrypi/userl...interface/mmal
https://github.com/raspberrypi/userl...erface/khronos
Ref:
https://github.com/techyian/MMALShar...hat-is-MMAL%3F
https://www.khronos.org/openmaxil
And FFMPEG looks to fully support MMAL & OpenMAX only for Raspberry:
https://trac.ffmpeg.org/wiki/HWAccel...PIAvailability
To recap, I still believe you need to link, if possible, Chromium to the MESA stuff in /opt/vc (the one provided by Raspberry), for FFMPEG I used:
Code:
export LDFLAGS="-L /opt/vc/lib/"
and only use the Raspberry specific FFMPEG build (documented in the other thread). Not sure if the application that calls FFMPEG should know how to call it, specifying which HW Acceleration engine should be used - MMAL or, does FFMPEG automatically check the platform and switch to MMAL if available. No clue, but in Kodi you can specify that.
I doubt Firefox is able to do this by default and I'd suggest to focus on Chromium and the patches I presented in post #2
Good Luck! 
|
|
|
01-12-2019, 06:20 PM
|
#7
|
Senior Member
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634
|
|
|
|
01-12-2019, 06:44 PM
|
#8
|
Senior Member
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,278
Original Poster
|
Quote:
Originally Posted by abga
|
I'll have some time this week to play around with building chromium. I have attempted it in the past, but have not been successful. Gotta make sure that I have enough disk space to do it.
Yes, I have tried using deb2tgz recently. After manually fixing some libraries, I can't run the binary as it throws out errors (not related to libraries). No shame in using deb2tgz though. Ha, ha!
|
|
|
All times are GMT -5. The time now is 11:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|