Any clues from the /var/log/lightdm/ or /var/log/Xorg.0.log files?
You do have vulkan support so your drivers are working. This is likely a display/settings issue.
You mention glxgears and vulkaninfo, so you can successfully run startx?
Any clues from the /var/log/lightdm/ or /var/log/Xorg.0.log files?
You do have vulkan support so your drivers are working. This is likely a display/settings issue.
You mention glxgears and vulkaninfo, so you can successfully run startx?
X appears to fail to start when using the vc4-fkms-v3d-pi4
.
When I looked at the Xorg log, I saw that X was unable to open a display.
I reverted all my settings to get my GUI back, then ran glxgears. Let me try again and report back after it crashes with the actual log outputs.
@0n0w1c , here we go:
Iāve modified the config.txt to look like this:
~]$ sudo cat /boot/config.txt
See /boot/overlays/README for all available options
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1#enable sound
dtparam=audio=on
hdmi_drive=2gpu_mem=128 # Set GPU memory to 128M
#enable vc4
dtoverlay=vc4-fkms-v3d-pi4,cma=512
max_framebuffers=2#Monitor Configuration
#hdmi_enable_4kp60=1 # Enable 4K60 display#overclock (ETA Prime @ https://www.youtube.com/watch?v=TwDbQ26_Mp8&t=398s )
over_voltage=6 # Overvolt CPU
arm_freq=2000 # Overclock to 2 GHz from 1.5 GHz
v3d_freq=600
#gpu_freq=600 (not recommended for Pi 4B. See: https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md)
As expected, X fails to start.
Logs:
~]$ sudo cat /var/log/Xorg.0.log | grep -i EE
[ 14.163] Current Operating System: Linux teletraan1 5.10.7-1-MANJARO-ARM #1 SMP PREEMPT Thu Jan 14 15:01:31 CST 2021 aarch64
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 14.165] (==) No Layout section. Using the first Screen section.
[ 14.165] (==) No screen section available. Using defaults.
[ 14.165] (**) |ā>Screen āDefault Screen Sectionā (0)
[ 14.165] (==) No monitor specified for screen āDefault Screen Sectionā.
[ 14.167] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 14.175] (EE) Failed to load module āfbdevā (module does not exist, 0)
[ 14.176] (EE) open /dev/dri/card0: No such file or directory
[ 14.176] (EE) open /dev/dri/card0: No such file or directory
[ 14.176] (EE) No devices detected.
[ 14.176] (EE)
[ 14.176] (EE) no screens found(EE)
[ 14.176] (EE)
[ 14.176] (EE) Please also check the log file at ā/var/log/Xorg.0.logā for additional information.
[ 14.176] (EE)
[ 14.182] (EE) Server terminated with error (1). Closing log file.
Meanwhile, at lightdm.log
:
lightdm]$ sudo cat lightdm.log
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=675
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for āgio-vfsā
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating greeter session
[+0.01s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process āplymouthā (No such file or directory)
[+0.01s] DEBUG: Using VT 7
[+0.01s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.01s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.01s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.01s] DEBUG: XServer 0: Launching X Server
[+0.01s] DEBUG: Launching process 682: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.01s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.02s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.06s] DEBUG: Process 682 exited with return value 1
[+0.06s] DEBUG: XServer 0: X server stopped
[+0.06s] DEBUG: Releasing VT 7
[+0.06s] DEBUG: XServer 0: Removing X server authority /run/lightdm/root/:0
[+0.06s] DEBUG: Seat seat0: Display server stopped
[+0.06s] DEBUG: Seat seat0: Stopping session
[+0.06s] DEBUG: Seat seat0: Session stopped
[+0.06s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+0.06s] DEBUG: Seat seat0: Stopping; greeter display server failed to start
[+0.06s] DEBUG: Seat seat0: Stopping
[+0.06s] DEBUG: Seat seat0: Stopped
[+0.06s] DEBUG: Required seat has stopped
[+0.06s] DEBUG: Stopping display manager
[+0.06s] DEBUG: Display manager stopped
[+0.06s] DEBUG: Stopping daemon
[+0.06s] DEBUG: Exiting with return value 1
And lightdm.log
references another log file within the lightdm
directory, so hereās x-0.log
from there:
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux teletraan1 5.10.7-1-MANJARO-ARM #1 SMP PREEMPT Thu Jan 14 15:01:31 CST 2021 aarch64
Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:67:EC:54 vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 root=LABEL=ROOT_MNJRO rw rootwait console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0 cgroup_enable=memory swapaccount=1
Build Date: 16 December 2020 11:52:03PMCurrent version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (ā) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: ā/var/log/Xorg.0.logā, Time: Sun Jan 24 21:38:03 2021
(==) Using system config directory ā/usr/share/X11/xorg.conf.dā
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at ā/var/log/Xorg.0.logā for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
I donāt think this is correct:
dtoverlay=vc4-fkms-v3d-pi4,cma=512
I think the options are:
dtoverlay=vc4-fkms-v3d,cma=512
or
dtoverlay=vc4-kms-v3d-pi4,cma=512
This is also supposed top be valid but I have not been successful getting it to work:
dtoverlay=vc4=kms-v3d,cma=512
Thanks!
I will try these later, when I get back to my Pi.
What exactly is the intended difference between:
dtoverlay=vc4-fkms-v3d,cma=512
And:
dtoverlay=vc4=kms-v3d,cma=512
Thanks again!
I have wondered that question myself. In my very primitive and likely misguided perspective, I believe āfkmsā is/was used to imitate true kms (kms = kernel mode setting). It is/was used before the linux kernel had the full vc4 video driver support. I think it mimics the true kernel mode setting and allows for the driver development to proceed.
But take this with a grain of salt, others I am sure know more.
Iām back, with a fully working GUI again. Thanks, @0n0w1c !
Hereās my config.txt
:
~]$ cat /boot/config.txt
# See /boot/overlays/README for all available options
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1
#enable sound
dtparam=audio=on
hdmi_drive=2
gpu_mem=128 # Set GPU memory to 128M
#enable vc4
#dtoverlay=vc4-fkms-v3d
dtoverlay=vc4-kms-v3d-pi4,cma=512
max_framebuffers=2
#Monitor Configuration
#hdmi_enable_4kp60=1 # Enable 4K60 display
#overclock (ETA Prime @ https://www.youtube.com/watch?v=TwDbQ26_Mp8&t=398s )
over_voltage=6 # Overvolt CPU
arm_freq=2000 # Overclock to 2 GHz from 1.5 GHz
core_freq=600 # Possibly may cause boot failure to have this enabled on Pi 4B
h264_freq=600
isp_freq=600
v3d_freq=600
hevc_freq=600
#gpu_freq=600 (not recommended for Pi 4B. See: https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md)
The performance on a 49" 4K TV (in 1080p mode):
]$ cat vulkan_glxgears_run1.txt
2627 frames in 5.0 seconds = 525.395 FPS
3076 frames in 5.0 seconds = 615.190 FPS
3105 frames in 5.0 seconds = 620.865 FPS
3123 frames in 5.0 seconds = 624.404 FPS
3200 frames in 5.0 seconds = 639.915 FPS
3207 frames in 5.0 seconds = 641.341 FPS
3518 frames in 5.0 seconds = 703.422 FPS
3275 frames in 5.0 seconds = 654.978 FPS
3109 frames in 5.0 seconds = 621.754 FPS
3036 frames in 5.0 seconds = 607.070 FPS
3084 frames in 5.0 seconds = 616.799 FPS
3038 frames in 5.0 seconds = 606.489 FPS
Is this the performance I should be expecting?
Put another way, how can I make sure itās working?
Should I adjust the config.txt
file further?
In particular, what should the memory settings be for my config? As it is, Iāve reduced myself to having 3.65 GiB of total memory visible to the systemā¦
All that said, Iām still getting an error about a non-conformant Vulkan install when I run glxgears
ā¦
I do not know what you are running that produced that output, but if you get output from vulkaninfo or vkcube runs, it is working.
This message
WARNING: v3dv is neither a complete nor a conformant Vulkan implementation. Testing use only.
has been there since before they announced Vulkan 1.0 compliance, I expected they would remove it, but they havenāt yet.
Dedicating more memory to video than is needed is kind of a waste. But then not having enough is not good either. So monitor your use, here is my current use at 1080.
$ cat /proc/meminfo
.
.
.
CmaTotal: 262144 kB
CmaFree: 174520 kB
However, I am sure that would change by running video or a game or even more desktop apps. So really, only you can find the best number for your use.
Edit: It would seem from my testing, cma-512 is the highest currently supported. So cma-256, which is the default, cma-384 and cma-512 are the possible settings.
Thatās output from vblank_mode=0 glxgears
. Everyone else was showing 1000+ fps on that one, so I was curious why mine was so much lower.
I wonder if thereās a practical difference between choosing:
dtoverlay=vc4-fkms-v3d,cma=512
OR
dtoverlay=vc4-kms-v3d-pi4,cma=512
Iām using the second one, right now.
vkcube
runs, so thatās excellent.
Iāll check the meminfo when Iām actually using the display again. Right now, Iāve just got nomachine
running on my Mac so I can see the desktop.
fkms seems to be more forgiving, works for more people. I find kms works better for KDE Plasma on Wayland (better performance numbers and smoother user experience), but Kwin occasionally crashes and I have to log back in, which is not so good. I am hoping the KDE 5.21 rewrite of the compositor will magically fix that, in addition to even better user experience. But I digress, both get the job done. I think kms is the long term plan, for what that is worth.
As for why your glxgears numbers differ, they differ greatly on the resolution, overclocking, desktop environment, compositor, etc. So many things. So really the numbers are a relative measurement. They are what they are, and now you can compare them to after updates and config changes to check for improvement. And I expect there will be improvement.
Interesting.
So, I mis-spoke earlier.
I was actually using dtoverlay=vc4-kms-v3d-pi4,cma=512
.
Iāve also confirmed that the system runs with dtoverlay=vc4-fkms-v3d,cma=512
, but actually refuses to start X.org using dtoverlay=vc4-kms-v3d,cma=512
.
I could probably stand to go down to 384 or 256, especially after I finally bother to turn off the ridiculous transparency and everything else in picom
.
See memory usage during glxgears
run:
~]$ cat /proc/meminfo | grep -i cma
CmaTotal: 262144 kB
CmaFree: 230624 kB
Do I actually need gpu_mem
set to 128 to support the other graphics settings? How low can I afford to go there?
I had gpu_mem=64 and it ran fine. I am not sure 128 gains much that is noticeable. I have not used 64 recently, but I expect it is still fine. I believe that I read 128 is what raspi-config sets, but I have not confirmed that.
Cool. I had it set to 64 before I installed the vulkan
bits.
Just switched it back and everything booted fine.
Especially on the Pi, every free MB counts, so Iām happier to have it lower.
CmaTotal: 524288 kB
CmaFree: 142864 kB
This is my current usage with a 4K monitor, Thunderbird, Chromium (6 sites open) and Konsole open.
So it would appear that cma-512 is pretty much required for use with a 4K monitor, if you are going to run your desktop on it.
CmaTotal: 524288 kB
CmaFree: 26680 kB
A little more use and a site or two opened in Chromium. So 512 is absolutely required for 4K. Now I am wishing cma-768 or cma-1024 was valid.
gpu_mem=128 seems to be the minimum for camera operation according to this but there are many docs concerning RPi setup that makes setup for a RPi4 a little confusing.
This is what I get on a 4K with Plasma on X11:
$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
2163 frames in 5.0 seconds = 430.890 FPS
2251 frames in 5.0 seconds = 450.115 FPS
2174 frames in 5.0 seconds = 434.265 FPS
Seems in line with my 2K (1080p) performance on a 49" screen.
Hint: The Pi would prefer I had a smaller screen, and an actual HDMI wire, instead of the wireless magic Iām using.
I feel you on the overabundance of variously-updated Raspberry Pi setup docs.
Anytime I get something to work, I write down what I did since Pi stability/workingā¦ness seems very dependent on local variables. Which is fine, but it makes generalizing instructions a bit tricky.
(There are plenty examples in this thread alone of things working for Bob and not working for Jim under what appear to be operationally similar environments. Whatever is different is at least too subtle for me to catch.)
Did you actually use the dedicated camera hookup on the Pi? I know thatās there, but Iāve never explored it. Iāve already got 1 webcam in my bedroom, which is one more than I want. What sort of video quality can you get out of the native camera port? Iām completely unfamiliar with that interface.