LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-05-2022, 12:19 PM   #46
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,263

Rep: Reputation: 231Reputation: 231Reputation: 231

Quote:
Originally Posted by mralk3 View Post
Here is the "work in progress" documentation to build forked kernels on Slackware ARM.

https://docs.slackware.com/slackwarearm:cstmz_kernel

This is being tested with the Raspberry Pi kernel source from:

https://github.com/raspberrypi/linux/tree/rpi-5.18.y

I have a Raspberry Pi 4 running this kernel, without any patches, with minimal changes (2 to be exact) to the bcm2711_defconfig.


Kernel 5.20 (a ways off) should have the better support for the V3D driver on bcm2711 in a few months.
Code:
x@fourb:~$ dmesg | grep vc4
[   12.680623] fb0: switching to vc4 from simple
[   12.776298] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[   12.780725] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[   12.780948] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input0
[   12.836466] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[   12.838627] rc rc0: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[   12.838834] input: vc4 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input1
[   12.864249] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[   12.870687] rc rc1: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[   12.870901] input: vc4 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input2
[   12.895243] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[   12.895686] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[   12.896035] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[   12.896379] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[   12.896684] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[   12.896949] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[   12.897269] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[   12.900866] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[   13.023593] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
x@fourb:~$ dmesg | grep v3d
[    2.859609] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[10287.083441] v3d fec00000.v3d: MMU error from client L2T (0) at 0x6861000, pte invalid
What other two changes did you do by any chance? I'm still getting:
Code:
[   15.400442] fb0: switching to vc4 from simple
[   15.404810] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[   15.704332] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[   15.988341] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
which it seems that it doesn't want to completely load the driver. I'm using version 5.18.9 from the official rpi source.
 
Old 07-05-2022, 08:03 PM   #47
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Quote:
Originally Posted by stormtracknole View Post
What other two changes did you do by any chance? I'm still getting:
Code:
[   15.400442] fb0: switching to vc4 from simple
[   15.404810] vc4-drm gpu: bound fe600000.firmwarekms (ops vc4_fkms_ops [vc4])
[   15.704332] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[   15.988341] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
which it seems that it doesn't want to completely load the driver. I'm using version 5.18.9 from the official rpi source.
They were related to the kernel LOCALVERSION and one other change involving the kernel local version naming. I ran into a problem where the kernel was named similar to 5.18.x-armv8+. I also had to modify the boot/extlinux/extlinux.conf to add in the plus sign to the naming of Image-armv8 and the ramdisk. Those issues are already fixed now and should not be problematic going forward.

It looks like you have the FKMS driver loaded. Grab the default Rpi config for Slackware arm from here:

https://slackware.uk/slackwarearm/pl...ets/config.txt
 
Old 07-05-2022, 08:30 PM   #48
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,263

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by mralk3 View Post
They were related to the kernel LOCALVERSION and one other change involving the kernel local version naming. I ran into a problem where the kernel was named similar to 5.18.x-armv8+. I also had to modify the boot/extlinux/extlinux.conf to add in the plus sign to the naming of Image-armv8 and the ramdisk. Those issues are already fixed now and should not be problematic going forward.

It looks like you have the FKMS driver loaded. Grab the default Rpi config for Slackware arm from here:

https://slackware.uk/slackwarearm/pl...ets/config.txt
Good catch! I forgot to set it back when I was doing some testing.

I'm still having the issue with the renderer still set to llvmpipe though:

Code:
OpenGL renderer string: llvmpipe (LLVM 14.0.6, 128 bits)
I'm using the exact same config.txt as the one provided in the link.

Thank you also for all the work on getting the rpi kernel going.
 
Old 07-05-2022, 09:16 PM   #49
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Quote:
Originally Posted by stormtracknole View Post
Good catch! I forgot to set it back when I was doing some testing.

I'm still having the issue with the renderer still set to llvmpipe though:

Code:
OpenGL renderer string: llvmpipe (LLVM 14.0.6, 128 bits)
I'm using the exact same config.txt as the one provided in the link.

Thank you also for all the work on getting the rpi kernel going.
Yeah, no problem!

Did you build with --noconfig and --nopatches? My kernel was built with the stock bcm2711_defconfig and no patches. Basically a vanilla Raspberry Pi kernel fork. Technically should work for all Pi models, but I have not tried the Pi 3 just yet.
 
Old 07-05-2022, 09:59 PM   #50
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,263

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by mralk3 View Post
Yeah, no problem!

Did you build with --noconfig and --nopatches? My kernel was built with the stock bcm2711_defconfig and no patches. Basically a vanilla Raspberry Pi kernel fork. Technically should work for all Pi models, but I have not tried the Pi 3 just yet.
I did. I used:
Code:
./arm/build --srcdir /usr/src/rpikernel --noconfig --nopatches
This is a Pi4 with 4GB of RAM.
 
Old 07-05-2022, 10:31 PM   #51
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
After first boot you should run as root then reboot:

Code:
os-initrd-mgr -F
What is the output of lsmod for v3d and vc4? Do you have wifi and bluetooth?
 
Old 07-06-2022, 12:20 AM   #52
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,551

Rep: Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314Reputation: 1314
Try this RPi boot loader config.txt

http://armed.slackware.com/tmp/config.txt

The settings to use the Broadcom VC4 driver are:
gpu_mem=128
dtoverlay=vc4-kms-v3d

I'll retest the mainline Kernel with those settings and assuming video works, make it the new default so it works out of the box with the rpi kernel fork.

Secondly, ensure that you don't have any X11 config within /etx/X11/xorg.conf.d that's configuring for the "Device".
There shouldn't be any by default.

Now VC4 is used rather than llvmpipe:

Code:
bash-5.1$ glxgears -info
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER   = V3D 4.2
GL_VERSION    = 2.1 Mesa 21.3.8
GL_VENDOR     = Broadcom

Last edited by drmozes; 07-06-2022 at 12:23 AM.
 
Old 07-06-2022, 07:12 AM   #53
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,263

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by mralk3 View Post
After first boot you should run as root then reboot:

Code:
os-initrd-mgr -F
What is the output of lsmod for v3d and vc4? Do you have wifi and bluetooth?
Here's what I have:

v3d
Code:
v3d                    86016  0
gpu_sched              53248  1 v3d
drm_shmem_helper       28672  1 v3d
drm                   548864  7 drm_cma_helper,gpu_sched,drm_kms_helper,v3d,vc4,drm_shmem_helper
vc4
Code:
vc4                   307200  6
drm_cma_helper         24576  1 vc4
snd_soc_core          258048  2 vc4,snd_soc_hdmi_codec
cec                    57344  1 vc4
drm_kms_helper        200704  4 drm_cma_helper,vc4
drm                   548864  7 drm_cma_helper,gpu_sched,drm_kms_helper,v3d,vc4,drm_shmem_helper
Wifi is working, but not bluetooth.

Quote:
Originally Posted by drmozes View Post
Try this RPi boot loader config.txt

http://armed.slackware.com/tmp/config.txt

The settings to use the Broadcom VC4 driver are:
gpu_mem=128
dtoverlay=vc4-kms-v3d

I'll retest the mainline Kernel with those settings and assuming video works, make it the new default so it works out of the box with the rpi kernel fork.

Secondly, ensure that you don't have any X11 config within /etx/X11/xorg.conf.d that's configuring for the "Device".
There shouldn't be any by default.

Now VC4 is used rather than llvmpipe:

Code:
bash-5.1$ glxgears -info
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER   = V3D 4.2
GL_VERSION    = 2.1 Mesa 21.3.8
GL_VENDOR     = Broadcom
I tried this config file, but still getting llvmpipe. I've been doing a lot of testing on this machine. I probably need to start over clean. There is nothing in /etc/X11/xorg.conf.d/ that can be causing issues. I'm a bit perplexed as to why this is not working. It should since it is obviously working for me. Most likely something on my end. :/
 
Old 07-06-2022, 07:22 AM   #54
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
I uploaded what I have. The kernel is at 5.18.7. I uploaded my dmesg log and the config.txt too. I went as far as removing all my dtb files, elf files, etc, etc and reinstalled the kernel and the raspberry pi firmware package. I am building a 5.18.9 kernel at the moment to see if i can reproduce a functioning environment.

https://slackware.uk/slackwarearm/people/brent/
 
Old 07-06-2022, 08:53 AM   #55
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Ok! New 5.18.9 kernel, headers, and modules.

Same config.txt. Warning: It is very slow, and it appears the llvmpipe rendering is more responsive in some cases.

Packages here: https://slackware.uk/slackwarearm/people/brent/testing/

EDIT: The kernel source package is available now on the mirror.
Attached Thumbnails
Click image for larger version

Name:	v3d_vc4_rpi4b_5.18.9.jpg
Views:	8
Size:	274.5 KB
ID:	39226  

Last edited by mralk3; 07-06-2022 at 10:07 AM. Reason: forgot to add link.
 
1 members found this post helpful.
Old 07-06-2022, 04:53 PM   #56
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,263

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by mralk3 View Post
Ok! New 5.18.9 kernel, headers, and modules.

Same config.txt. Warning: It is very slow, and it appears the llvmpipe rendering is more responsive in some cases.

Packages here: https://slackware.uk/slackwarearm/people/brent/testing/

EDIT: The kernel source package is available now on the mirror.
So I just upgraded to your kernel. I have a raspberry pi active that I use for something else and I wanted to see how config.txt would be set when playing with raspi-config. This is the setting that I'm using now on my slackware aarch64:
Code:
dtoverlay=vc4-kms-v3d
#hdmi_enable_4kp60=1
Using vc4-kms-v3d instead of vc4-kms-v3d-pi4 is giving me a really good desktop experience. I still show llvmpipe, but everything is working much, much better. I have vlc and I'm able to play an 1080 video at full screen with no stuttering using XFCE. I tested KDE and KDE Wayland. Wayland is definitely the poorest performer. X11 works fine if you disable the Compositor. By far, XFCE works the best. Not sure if commenting out hdmi_enable_4kp60 did anything.

This is the raspberry version that I have:
Code:
Raspberry Pi 4 Model B Rev 1.2
Can you test your pi with that dtoverlay to see what kind of performance you get?

Also, the hdmi errors went away too.

Last edited by stormtracknole; 07-06-2022 at 05:42 PM. Reason: adding about the hdmi errors
 
Old 07-06-2022, 07:00 PM   #57
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Yes, those settings increase performance. I still see in glxinfo that I am using the v3d driver. Nothing says a thing about llvmpipe.

I compared the dtbs and other files in /boot to make sure I didn't have any extra firmware or driver related configuration. I cannot figure out the difference, other than the eeprom version and configuration being different.

Code:
root@fourb:/boot#  rpi-eeprom-config 
[all]
BOOT_UART=0
WAKE_ON_GPIO=0
POWER_OFF_ON_HALT=1
DHCP_TIMEOUT=45000
DHCP_REQ_TIMEOUT=4000
TFTP_FILE_TIMEOUT=30000
ENABLE_SELF_UPDATE=1
DISABLE_HDMI=0
BOOT_ORDER=0xf41

root@fourb:/boot# rpi-eeprom-update 
BOOTLOADER: up to date
   CURRENT: Tue Apr 26 10:24:28 UTC 2022 (1650968668)
    LATEST: Tue Apr 26 10:24:28 UTC 2022 (1650968668)
   RELEASE: critical (/usr/share/hwm-bw-raspberrypi/eeprom-firmware/bootloader/critical)
            Use a text editor to modify /etc/rpi-eeprom-update to change the release.

  VL805_FW: Dedicated VL805 EEPROM
     VL805: up to date
   CURRENT: 000138a1
    LATEST: 000138a1
root@fourb:/boot#
What does /dev/dri/* show for you?

Code:
root@fourb:/boot# ls -la /dev/dri/*
crw-rw----+ 1 root video 226,   0 Dec 31  1969 /dev/dri/card0
crw-rw----+ 1 root video 226,   1 Dec 31  1969 /dev/dri/card1
crw-rw-rw-  1 root video 226, 128 Dec 31  1969 /dev/dri/renderD128

/dev/dri/by-path:
total 0
drwxr-xr-x 2 root root 100 Dec 31  1969 ./
drwxr-xr-x 3 root root 120 Dec 31  1969 ../
lrwxrwxrwx 1 root root   8 Dec 31  1969 platform-fec00000.v3d-card -> ../card0
lrwxrwxrwx 1 root root  13 Dec 31  1969 platform-fec00000.v3d-render -> ../renderD128
lrwxrwxrwx 1 root root   8 Dec 31  1969 platform-gpu-card -> ../card1
What about any udev rules in /etc/udev/rules.d related to vchiq? Or possibly any black listed modules? Or possibly the snd_bcm2835 module blacklisted?

Last edited by mralk3; 07-06-2022 at 07:04 PM.
 
Old 07-06-2022, 07:06 PM   #58
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
Here is my lsmod output for v3d and vc4:

Code:
root@fourb:/boot# lsmod | grep vc4
vc4                   307200  36
drm_cma_helper         24576  1 vc4
snd_soc_core          258048  2 vc4,snd_soc_hdmi_codec
cec                    57344  1 vc4
drm_kms_helper        200704  4 drm_cma_helper,vc4
drm                   548864  22 drm_cma_helper,gpu_sched,drm_kms_helper,v3d,vc4,drm_shmem_helper
root@fourb:/boot# lsmod | grep v3d
v3d                    86016  8
drm_shmem_helper       28672  1 v3d
gpu_sched              53248  1 v3d
drm                   548864  22 drm_cma_helper,gpu_sched,drm_kms_helper,v3d,vc4,drm_shmem_helper
 
Old 07-06-2022, 07:40 PM   #59
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,904

Rep: Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053Reputation: 1053
It very well may be the rpi-userland package. Please remove it if it is installed. A reboot may be required. It handles the vchiq stuff for video.
 
1 members found this post helpful.
Old 07-06-2022, 09:53 PM   #60
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,263

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by mralk3 View Post
It very well may be the rpi-userland package. Please remove it if it is installed. A reboot may be required. It handles the vchiq stuff for video.
So I remembered that I had some userland stuff that ldconfig was loaded. I made sure to remove that. I also removed your userland package. My machine still shows llvmpip, but I am pretty sure that I have something else lingering. Probably starting clean would clear. Never the less, the kernel package you built, along with the config file settings that I suggested are working pretty darn good. Even firefox is loading hd videos with no issues. I'm actually quite impressed. Thank you for the patience dealing with this. At least this gave me a great opportunity to learn more things about the rpi.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SARPI (fatdog) on RPi4 - no HDMI video [SOLVED] arfon Slackware - ARM 4 03-17-2020 01:47 AM
fast scrolling screen on hdmi output , vga output is ok sumeet inani Linux - Newbie 7 08-24-2017 08:39 PM
Is it possible to play Blu Ray through a video card HDMI output to HDMI TV? SharpyWarpy Linux - Hardware 5 10-28-2012 01:01 AM
[ProLiant MicroServer, ATI R6xx HDMI, Digital Out, HDMI] No HDMI sound at all vnatius Linux - Hardware 15 08-16-2012 01:09 PM
HDMI Audio doesn't work - Debian Squeeze (Intel HDMI) felipefv Linux - Hardware 8 02-06-2012 09:47 AM

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

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