View previous topic :: View next topic |
Author |
Message |
akrmn24 n00b
Joined: 24 Nov 2024 Posts: 4
|
Posted: Sun Nov 24, 2024 3:40 pm Post subject: X11 (openbox) slow with raspberry pi 4b |
|
|
I followed this guide to install gentoo on my raspberry pi 4b (4GB ram): https://wiki.gentoo.org/wiki/Raspberry_Pi_Install_Guide
Everything is fine except the wifi is not working (not a big deal) and the X11 display is slow to respond. When I type on a terminal emulator like kitty there is a 0.5-1 second lag between the time I press the keys and the time it appears on screen. Switching windows and tabs on the browser is a bit slow also. I use the keyboard to emulate a mouse, so not sure how a real mouse would work, but the speed of the pointer seems normal and responsive.
Edit:
Actually, typing in firefox seems normal and with almost no lag. Xterm also seems normal. But I can't use the kitty terminal, I have to keep switching out of X to have a comfortable terminal.
Any idea what the problem is? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54619 Location: 56N 3W
|
Posted: Thu Nov 28, 2024 5:29 pm Post subject: |
|
|
Welcome to Gentoo.
What is your VIDEO_CARDS= set to?
It needs to include vc4 for the Pi4
What do you have in config.txt?
All of it please.
Somewhere, maybe at /var/log/Xorg.0.log you will have an Xorg startup log.
It should show the modeset video driver in use.
Lastly, is your normal user in the video group?
That's required for direct rendering to work for your normal user. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
akrmn24 n00b
Joined: 24 Nov 2024 Posts: 4
|
Posted: Wed Dec 04, 2024 9:26 pm Post subject: |
|
|
/etc/portage/make.conf
Code: |
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.
CHOST="aarch64-unknown-linux-gnu"
# NOTE: This stage was built with the bindist USE flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
VIDEO_CARDS="fbdev v3d vc4"
INPUT_DEVICES="libinput"
USE="-qt5 -qt6"
MAKEOPTS="-j2"
|
yes VIDEO_CARDS includes vc4
/boot/config.txt
Code: |
# If using arm64 on a Pi3, select a 64 bit kernel
arm_64bit=1
# have a properly sized image
disable_overscan=1
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Enable DRM VC4 V3D (graphics) driver
dtoverlay=vc4-kms-v3d
|
Code: | ak@tux ~/.local/share/xorg $ head -n 100 Xorg.0.log | xsel -ib |
Code: |
[ 389.129]
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[ 389.136] Current Operating System: Linux tux 6.6.58-v8+ #1809 SMP PREEMPT Wed Oct 23 11:53:53 BST 2024 aarch64
[ 389.136] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 numa_policy=interleave snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=E4:5F:01:25:43:D3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=tty root=/dev/sda1 rootfstype=ext4 rootwait cma=256M@256M net.ifnames=0
[ 389.152]
[ 389.155] Current version of pixman: 0.43.4
[ 389.162] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 389.162] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 389.178] (==) Log file: "/home/ak/.local/share/xorg/Xorg.0.log", Time: Wed Nov 27 15:54:04 2024
[ 389.187] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 389.189] (==) No Layout section. Using the first Screen section.
[ 389.189] (==) No screen section available. Using defaults.
[ 389.189] (**) |-->Screen "Default Screen Section" (0)
[ 389.189] (**) | |-->Monitor "<default monitor>"
[ 389.190] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 389.190] (**) Allowing byte-swapped clients
[ 389.190] (==) Automatically adding devices
[ 389.190] (==) Automatically enabling devices
[ 389.190] (==) Automatically adding GPU devices
[ 389.190] (==) Automatically binding GPU devices
[ 389.190] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 389.193] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[ 389.193] Entry deleted from font path.
[ 389.193] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[ 389.193] Entry deleted from font path.
[ 389.193] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[ 389.193] Entry deleted from font path.
[ 389.194] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
[ 389.194] Entry deleted from font path.
[ 389.194] (Run 'mkfontdir' on "/usr/share/fonts/100dpi").
[ 389.194] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
[ 389.194] Entry deleted from font path.
[ 389.194] (Run 'mkfontdir' on "/usr/share/fonts/75dpi").
[ 389.194] (==) FontPath set to:
/usr/share/fonts/misc
[ 389.194] (==) ModulePath set to "/usr/lib64/xorg/modules"
[ 389.194] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 389.194] (II) Module ABI versions:
[ 389.194] X.Org ANSI C Emulation: 0.4
[ 389.194] X.Org Video Driver: 25.2
[ 389.194] X.Org XInput driver : 24.4
[ 389.194] X.Org Server Extension : 10.0
[ 389.197] (++) using VT number 1
[ 389.202] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 389.207] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 389.207] (II) Platform probe for /sys/devices/platform/gpu/drm/card1
[ 389.210] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 10 paused 0
[ 389.212] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 389.212] (II) Platform probe for /sys/devices/platform/v3dbus/fec00000.v3d/drm/card0
[ 389.214] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 389.216] (II) no primary bus or device found
[ 389.216] falling back to /sys/devices/platform/gpu/drm/card1
[ 389.216] (II) LoadModule: "glx"
[ 389.219] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 389.253] (II) Module glx: vendor="X.Org Foundation"
[ 389.253] compiled for 1.21.1.13, module version = 1.0.0
[ 389.253] ABI class: X.Org Server Extension, version 10.0
[ 389.253] (==) Matched modesetting as autoconfigured driver 0
[ 389.253] (==) Matched fbdev as autoconfigured driver 1
[ 389.253] (==) Assigned the driver to the xf86ConfigLayout
[ 389.253] (II) LoadModule: "modesetting"
[ 389.253] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[ 389.267] (II) Module modesetting: vendor="X.Org Foundation"
[ 389.267] compiled for 1.21.1.13, module version = 1.21.1
[ 389.267] Module class: X.Org Video Driver
[ 389.267] ABI class: X.Org Video Driver, version 25.2
[ 389.267] (II) LoadModule: "fbdev"
[ 389.268] (WW) Warning, couldn't open module fbdev
[ 389.268] (EE) Failed to load module "fbdev" (module does not exist, 0)
[ 389.269] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 389.269] (II) modeset(0): using drv /dev/dri/card1
[ 389.269] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 389.269] (II) modeset(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 389.269] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[ 389.269] (==) modeset(0): RGB weight 888
[ 389.269] (==) modeset(0): Default visual is TrueColor
[ 389.269] (II) Loading sub module "glamoregl"
[ 389.269] (II) LoadModule: "glamoregl"
[ 389.270] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[ 389.301] (II) Module glamoregl: vendor="X.Org Foundation"
[ 389.301] compiled for 1.21.1.13, module version = 1.0.1
[ 389.301] ABI class: X.Org ANSI C Emulation, version 0.4
[ 390.274] (II) modeset(0): Refusing to try glamor on llvmpipe
[ 390.282] (II) modeset(0): glamor initialization failed
[ 390.282] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[ 390.283] (II) modeset(0): Output HDMI-1 has no monitor section
[ 390.335] (II) modeset(0): Output HDMI-2 has no monitor section
[ 390.388] (II) modeset(0): EDID for output HDMI-1
[ 390.440] (II) modeset(0): EDID for output HDMI-2
[ 390.440] (II) modeset(0): Manufacturer: ACR Model: ad8 Serial#: 856700338
[ 390.440] (II) modeset(0): Year: 2023 Week: 31
[ 390.440] (II) modeset(0): EDID Version: 1.3
|
Code: |
ak@tux ~ $ groups
wheel audio users ak
|
Yes I did forget about the video group. However, I have a screen session with an emerge happening (chromium), so I think better wait until that's done to change the group and re-login.
Thank you |
|
Back to top |
|
|
akrmn24 n00b
Joined: 24 Nov 2024 Posts: 4
|
Posted: Thu Dec 05, 2024 2:22 pm Post subject: |
|
|
My system froze, had to restart without finishing the chromium emerge...But even though I added the user to the video group. The graphical interface is still slow. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1323 Location: Richmond Hill, Canada
|
Posted: Thu Dec 05, 2024 3:02 pm Post subject: |
|
|
akrmn24 wrote: | My system froze, had to restart without finishing the chromium emerge...But even though I added the user to the video group. The graphical interface is still slow. | May be it is not frozen, it is just extreme slow. I remember someone posted said have to wait for several days for the system to come out of the emerge when building chromium. Myself experience this occasionally (I mean the froze state), that usually mean the system is heavy swapping could take 10s of minutes before it will settle down.
One thing if you can clarify, is entire graphical interface slow or just kitty being slow?
I look up on the kitty website learn it is design to use GPU so could it be something (like mesa) is not to up to par (USE flags wise) therefor it is slower than expected.
Also from kitty document sw.kovidgoyal.net/kitty/ wrote: | Keyboard to screen latency
This is measured either with dedicated hardware, or software such as Typometer. Third party measurements comparing kitty with other terminal emulators on various systems show kitty has best in class keyboard to screen latency.
Note that to minimize latency at the expense of more energy usage, use the following settings in kitty.conf:
Code: | input_delay 0
repaint_delay 2
sync_to_monitor no
wayland_enable_ime no |
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54619 Location: 56N 3W
|
Posted: Thu Dec 05, 2024 5:39 pm Post subject: |
|
|
Swapping does not mean reading/writing swap space.
As the virtual memory manager only mmaps pages, nothing is loaded into physical RAM until its needed.
You get a page fault and something else runs, while the page is loaded.
This means that 'clean' pages (e.g. code) can be dropped and reloaded. It's a form oy swapping.
'Dirty' pages, not yet written must be committed before they can be dropped.
An interesting side effect of this is that Linux can execute programs that are too big to fit into physical RAM.
For completeness, swap space is only ever used for dynamically allocated RAM. That is, RAM that has no permanent home on disk.
I've seen Pis need a very long time ... hours, to respond to a keypress because of lack of real RAM.
Chromium takes three and a half days to build on on 8G Pi4. I've done it once to investigate a bug but it didn't fail for me.
On a 4G Pi4, it will be much longer.
That was at the command line, no GUI soaking up RAM _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1323 Location: Richmond Hill, Canada
|
Posted: Thu Dec 05, 2024 6:44 pm Post subject: |
|
|
NeddySeagoon wrote: | Swapping does not mean reading/writing swap space.
...
|
Thank you for your input.
I am aware of swapping vs paging. In my case this usually (or rarely) happen when I mess up my distcc setup where I have large concurrency of make jobs and few emerge jobs and at same time I have GUI for my everyday drive. this is a mistake but it just demonstrate the condition.
I use Pi 4B with 4GB and a NBD for swap. so something I can observe I/O activities on per storage device and can correlate the storage I/O to network I/O. I get a quick (short) glance before the monitor (atop) freeze. |
|
Back to top |
|
|
akrmn24 n00b
Joined: 24 Nov 2024 Posts: 4
|
Posted: Thu Dec 05, 2024 9:25 pm Post subject: |
|
|
Quote: |
One thing if you can clarify, is entire graphical interface slow or just kitty being slow?
|
No not the entire interface, I think just Firefox (rendering pages, videos) and kitty. In openbox I open up an Xterm. Then I create a bunch of screen sessions. In one of them I run kitty. Then I use kitty to open some more windows within that screen session (for xscreensaver and Firefox). Not sure if this slows things down, I can try without screen...
This is my first time using kitty. It was one of the terminals recommended in the Gentoo wiki. I can try another one. Xterm I would use if I can figure out how to make the font/size/color appeal to my needs. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|