LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 01-11-2019, 08:06 AM   #1
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,278

Rep: Reputation: 251Reputation: 251Reputation: 251
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.
 
Old 01-12-2019, 12:17 AM   #2
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
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.
Old 01-12-2019, 04:33 AM   #3
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by stormtracknole View Post
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.
Old 01-12-2019, 06:14 AM   #4
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Quote:
Originally Posted by drmozes View Post
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.
Old 01-12-2019, 07:58 AM   #5
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,278

Original Poster
Rep: Reputation: 251Reputation: 251Reputation: 251
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.
 
Old 01-12-2019, 04:46 PM   #6
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
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!
 
Old 01-12-2019, 06:20 PM   #7
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,634

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
Alternatively, you might be able to nick the Chromium from Raspbian and run it on Slackware ARM.
https://slackbuilds.org/repository/14.2/misc/deb2tgz/
https://archive.raspberrypi.org/debi...omium-browser/
https://archive.raspberrypi.org/debi...chromium-mods/

Pretty lame, but if it works it'll save you a lot of time.
 
Old 01-12-2019, 06:44 PM   #8
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,278

Original Poster
Rep: Reputation: 251Reputation: 251Reputation: 251
Quote:
Originally Posted by abga View Post
Alternatively, you might be able to nick the Chromium from Raspbian and run it on Slackware ARM.
https://slackbuilds.org/repository/14.2/misc/deb2tgz/
https://archive.raspberrypi.org/debi...omium-browser/
https://archive.raspberrypi.org/debi...chromium-mods/

Pretty lame, but if it works it'll save you a lot of time.
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!
 
  


Reply

Tags
browsers, hardware acceleration, raspberry pi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware ARM Raspberry Pi - armv6 and armv7 - optimized FFMPEG with HW Acceleration abga Slackware - ARM 32 11-15-2019 07:09 PM
LXer: Raspberry Strudel: My Raspberry Pi in Austria LXer Syndicated Linux News 0 08-23-2013 06:12 AM
LXer: Raspberry Pi becomes Raspberry PC via Mini-ITX carrier LXer Syndicated Linux News 0 07-17-2013 01:20 PM
LXer: Enter the element14 Pi Day ??Raspberry RoadTest? Challenge for a chance to win a Raspberry Pi c LXer Syndicated Linux News 0 03-08-2012 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration