LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64
User Name
Password
slarm64 This forum is for the discussion of slarm64.

Notices


Reply
  Search this Thread
Old 12-17-2022, 12:59 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Graphics issues


I'm on meetings with Zoom here which are overpowering my cpu. I'll update once the 6.2x kernels come out. But meantime, I did some hunting with vcgencmd (well hidden in /opt/vc/bin) and measured clocks. The vcgencmd Man page says:
Code:
...
measure_clock clock
              This returns the current frequency of the specified clock. The options are:

              Clock   Description
              ──────  ────────────────────────────────
              arm     ARM cores
              core    VC4 scaler cores
              h264    H.264 block
              isp     Image Signal Processor
              v3d     3D block
              uart    UART
              pwm     PWM block (analog audio output)
              emmc    SD card interface
              pixel   Pixel valve
              vec     Analog video encoder
              hdmi    HDMI
              dpi     Display Peripheral Interface
...
So I ran the same command on slarm64-15.0 & the 64bit Debian bullseye while running the same h264 video in vlc. Here's the outputs
Code:
Slarm64-15.0
bash-5.1$ sudo vcgencmd measure_clock arm core h264 isp isp hdmi v3d vec
frequency(48)=1400361344
frequency(1)=599998528
frequency(28)=0
frequency(45)=0
frequency(45)=0
frequency(0)=0
frequency(46)=599998528
frequency(10)=0
dec@SparrowFart:~$

Debian Bullseye
frequency(1)=500000992
frequency(28)=500000992
frequency(45)=500000992
frequency(46)=500000992
frequency(29)=74988280
frequency(10)=0
frequency(9)=0
frequency(4)=0
I had the command line saved and copied & pasted it in both instances, so it's unlikely to be different. I do have slarm64 mildly overclocked, CPU @2GHz, GPU@600MHz. To my less educated eye, it seems there's a lot more GPU running in debian than there is in slarm64. The h264 & isp blocks are running, which you would expect running a h264 video.

Any thoughts why so little GPU runs in slarm64? Will 6 kernel 6.2.x do anything to improve things?
 
Old 12-18-2022, 08:17 AM   #2
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,917

Rep: Reputation: Disabled
all this is configurable and has nothing to do with the system.
 
Old 12-18-2022, 12:36 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Thanks for the reply.

The page you linked is rpi-0 & rpi-1 specific and seems not even to cover the Pi 2, and doesn't have anything on the Pi 3/4. Nevertheless, there are some useful utilities in the rpi-userland package and I'll see what I can do with them. I can also compare debian's config, which does seem to get better video results. Any link that's Pi-4 specific and works would be great, because I'm heading out of hardware config (my area) and into software. Anything on the rpi-4 on raspberrypi.org seems out of date and/or broken links.

One thing I noticed is that the dtoverlay command errors out with
Code:
/config/device-tree: mount point does not exist
 * Failed to mount configfs - 2
From what I've read, that's buried in /sys, and some guy on stackoverflow even cobbled up a module for it. But the device-tree doesn't show under /sys with kernel-5.16.7. If I knew what it was looking for and could mount it, there's an option allowing me to specify another directory.
 
Old 12-19-2022, 11:02 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Well, I discovered a few things. I found this one section of video that wouldn't render on slarm64. VLC had 6-8 threads open, and because of the way the load was unevenly spread, the video was stopping as htop showed the load was looking for >100% on two cores, and they could only give 100% each. Total CPU load on top showed at about 280%, with two cores more than maxed out.

I then booted Debian Bullseye (the rpiOS 64bit), loaded the same section of the same video in VLC on Debian Bullseye. Bullseye rendered it well. The total cpu load was about 80% between the 4 cores. That's a pretty striking difference.

As for 'everything being configurable,' the option
Code:
vcgencmd get_config [int|str]
returns the settings on the two command options, int & string. This paste is a comparison of the debian and slarm64 configs, and there's more differences there than I seem to be able to adjust with config.txt. I have caught debian out patching the wifi firmware, so it's certainly not beyond them to patch anything.

It is difficult to get any real data. Stuff on config.txt covers rpi 0-4, cm4 & 400 and the hardware differs greatly. I can only find the odd explanation for some random fact online. One such is the difference between the vc4-kms-v3d.dtbo & vc4-fkms-v3d.dtbo. There are two conflicting explanations in the RazPi documentation, and forum. The f stands for "fake kms" and gives a degree of leniency to the software. My box switches off the GPU and graphics are all kernel done by the kernel & Mesa. Debian makes the GPU work, with superior results and much lower cpu load.

Last edited by business_kid; 12-19-2022 at 11:05 AM.
 
Old 12-19-2022, 11:50 AM   #5
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,917

Rep: Reputation: Disabled
is the kernel version the same?
 
Old 12-19-2022, 12:40 PM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by sndwvs View Post
is the kernel version the same?
Debian*(not updated) has 5.15.16 and I have 5.16.7. I also unearthed that
Code:
dtoverlay=upstream
loads the vc4-kms-v3d driver, so if you want the vc4-fkms-v3d driver, you have to disable that. I gather the 6.2.x kernel is on the long finger. Conflicting explanations don't help, but it seems vc4-kms-v3d seems to use firmware to set video modes, whereas vc4-fkms-v3d lets the kernel set them. I still haven't found why the gpu is unused, and it's not the firmware, because debian turns it on witrh the same firmware.
 
Old 12-20-2022, 11:32 AM   #7
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,917

Rep: Reputation: Disabled
well, these are different kernels, 5.15.y is stable and it includes and implements something that is not in 6.x.y
 
Old 12-21-2022, 06:38 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
I've chased up the differences as much as I can, and stopped. Here's what I found. Slarm64's Software versions are a a few minor numbers up on RPi OS, although Debian test more and patch things.

Xorg.0.log seems similar in both systems. I compared Xorg.0.log files. They load the same modules get the same reactions in the logs. The RazPi firmware & hardware remained the same. I compared file sizes. The only patch I suspected was an (earlier) version of the vc4-kms-v3d overlay being 1K bigger, so I tried that in slarm64. It may have made a small improvement.

To eliminate vlc, I tried your other mp4 players. Firefox offers to play .mp4s using QAV. It gave me a small black window, I heard the soundtrack, but saw nothing. MPV played the test video section just about, but it was spreading cpu load better over 4 cores whereas vlc seemed to concentrate the load on three. Load was up to 325% at times, to judge by the htop graphical output.

Next thing is the kernel. I can't compare module size because theirs are compressed; I can't compare configs, because Debian don't supply one. Suspiciously, all their module trees are numbers like '5.15.16+' which nearly implies patching, but what I've found is a long way off Red Hat's revisions.

Lastly, I'll mention my test video is 1080p, and I'm using one hdmi-1.0 monitor. I'd have no chance on 4k, requiring four times the bandwidth, let alone 2 of them! That's what the Pi is supposed to drive.
 
Old 12-22-2022, 06:38 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
One last try. I got your latest current on an sdcard, and tried that. It just about works with mpv at 350% cpu with tell-tale signs of overloading, e.g. legs moving jerkily. Shrinking the size of displayed video did next to nothing. Slackware Arm seems little better. Kernel 6.0.9 seems to have no acceleration enabled.

The latest kernel is 6.1.1, so 6.2 could be three months away. Debian beckons.....

EDIT: I'm not a Debian fan, but on my test video, Debian is showing 60-70% on top...

Last edited by business_kid; 12-22-2022 at 08:06 AM.
 
Old 12-22-2022, 12:49 PM   #10
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,917

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
One last try. I got your latest current on an sdcard, and tried that. It just about works with mpv at 350% cpu with tell-tale signs of overloading, e.g. legs moving jerkily. Shrinking the size of displayed video did next to nothing. Slackware Arm seems little better. Kernel 6.0.9 seems to have no acceleration enabled.

The latest kernel is 6.1.1, so 6.2 could be three months away. Debian beckons.....

EDIT: I'm not a Debian fan, but on my test video, Debian is showing 60-70% on top...
Everyone chooses what is more comfortable for him.
you can try kernel 5.15.34 and use
Code:
dtoverlay=vc4-fkms-v3d-pi4,cma-512
 
Old 12-23-2022, 04:40 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Slackware is much more comfortable for me, and slarm64 of the Aarch64 offerings.

But Debian doesa the business, and slarm64 doesn't, unfortunately. I have debian 64bit on an sdcard but not on disk. I'm mounting the Slackware /home to access the videos. But slarm64 isn't driving the GPU, and that needs rethinking.
 
Old 12-23-2022, 07:47 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
This might help you finger it. I tried three videos
  • An mkv
  • An mp4
  • An avi

On Slarm64, the same few bits of the gpu regardless. All were pretty cpu heavy.
On Debian, different cpu configurations were applied. The h264 block was on for the h264 video. It remained off on Slarm64.

Their Xorg modules are smaller than yours. Maybe it's a kernel thing?
 
Old 12-23-2022, 08:40 AM   #13
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,917

Rep: Reputation: Disabled
I wrote above that you need to change to the kernel 5.15.y and change the driver to fkms
 
Old 12-23-2022, 08:46 AM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
OK, I will.
 
Old 12-24-2022, 08:35 AM   #15
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,404

Original Poster
Rep: Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337Reputation: 2337
Quote:
Originally Posted by business_kid View Post
OK, I will.
I couldn't change to 5.15.34, but your site did have 5.15.80-generic, so I "Upgraded" to that from 5.16.7-bcm2711. That gave me no sound. It evidently didn't recognise the audio. It also crashes on shutdown, but I know what will fix that . My considered opinion is that that kernel isn't very generic. The 6.0.9-bcm2711 kernel had sound. My only output device option on 5.15.80-generic is 'dummy output.'
I tried the video regardless of sound on 5.15.80, and it's worse. So I said to myself "Never mind, I'll stick in Debian," but the sdcard chose that moment to remind me how unreliable sdcards are. I don't see any point in trying 5.15.19-generic. So I'm stuck restoring my backup of 5.16.7-bcm2711 because I never had the package, without disturbing my recent installs.

Debian isn't all plain sailing either, btw. The key difference is that when debian sets up the gpu for the job on hand, but slarm64 is doing all software. So when debian plays a h264 video, it wakes up the h264 block in the gpu, but slarm uses the cpu. That's why debian performs better.

EDIT: The firmware is in the bcm2711 kernels, so that explains loads

Last edited by business_kid; 12-24-2022 at 08:57 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Solution for graphics issues on some Intel graphics chipsets in Fedora 22 LXer Syndicated Linux News 0 06-15-2015 01:50 PM
Graphics draw issues with Silicon Motion Graphics in ThinkPad ToniCipriani Linux - Laptop and Netbook 7 05-18-2012 06:28 AM
Thinkpad T410 graphics issues / Intel HD Graphics Landshark Linux - Laptop and Netbook 1 04-02-2010 06:13 PM
graphics issues at xfstartup, screen seems "stretched", resolution issues(?), Ubunoob001 Slackware 4 03-11-2010 01:07 PM
Graphics issues with Intel 82856G Graphics Adapter herrmag Linux - Newbie 1 08-09-2004 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64

All times are GMT -5. The time now is 11:42 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