Error with chromium display

I keep getting this error when I try and launch chromium browser on my Pi4

X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian
Current Operating System: Linux 3f9a34a5ef92 4.19.75 #1 SMP PREEMPT Thu Jun 4 14:34:21 UTC 2020 aarch64
Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M video=HDMI-A-1:1920x1080M@60,margin_left=0,margin_right=0,margin_top=0,margin_bottom=0 smsc95xx.macaddr=DC:A6:32:60:40:BA vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 console=ttyS0,115200 rootfstype=ext4 rootwait root=UUID=ba1eadef-b414-4b60-924a-6164a5d7be4f rootwait
Build Date: 05 June 2019  12:49:54PM
xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support)
Current version of pixman: 0.36.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.2.log", Time: Fri Jun 26 13:59:17 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Xorg: ../../../../dix/privates.c:384: dixRegisterPrivateKey: Assertion `!global_keys[type].created' failed.
(EE)
(EE) Backtrace:
(EE)
(EE)
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
(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.2.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

Here is my config
{
“local”: {
“name”: “aged-sea”,
“config”: {
“HOST_CONFIG_disable_overscan”: “1”,
“HOST_CONFIG_display_rotate”: “1”,
“HOST_CONFIG_framebuffer_width”: “1080”,
“HOST_CONFIG_hdmi_force_hotplug”: “1”,
“HOST_CONFIG_hdmi_group”: “1”,
“HOST_CONFIG_hdmi_mode”: “16”,
“HOST_CONFIG_LAUNCH_URL”: “https://www.google.com”,
“HOST_CONFIG_max_framebuffer_height”: “1920”,
“HOST_CONFIG_arm_64bit”: “1”,
“HOST_CONFIG_core_freq”: “250”,
“HOST_CONFIG_dtoverlay”: “vc4-fkms-v3d”,
“HOST_CONFIG_dtparam”: ““i2c_arm=on”,“spi=on”,“audio=on””,
“HOST_CONFIG_gpu_mem”: “512”,
“SUPERVISOR_DELTA_VERSION”: “3”,
“SUPERVISOR_LOCAL_MODE”: “1”,
“HOST_CONFIG_disable_splash”: “1”,
“HOST_CONFIG_enable_uart”: “1”,
“SUPERVISOR_DELTA”: “1”,
“SUPERVISOR_POLL_INTERVAL”: “900000”,
“SUPERVISOR_VPN_CONTROL”: “true”,
“SUPERVISOR_INSTANT_UPDATE_TRIGGER”: “true”,
“SUPERVISOR_CONNECTIVITY_CHECK”: “true”,
“SUPERVISOR_LOG_CONTROL”: “true”,
“SUPERVISOR_DELTA_REQUEST_TIMEOUT”: “30000”,
“SUPERVISOR_DELTA_APPLY_TIMEOUT”: “0”,
“SUPERVISOR_DELTA_RETRY_COUNT”: “30”,
“SUPERVISOR_DELTA_RETRY_INTERVAL”: “10000”,
“SUPERVISOR_OVERRIDE_LOCK”: “false”,
“SUPERVISOR_PERSISTENT_LOGGING”: “false”
},
“apps”: {
“1”: {
“name”: “localapp”,
“commit”: “localrelease”,
“releaseId”: “1”,
“services”: {
“1”: {
“environment”: {
“DBUS_SYSTEM_BUS_ADDRESS”: “unix:path=/host/run/dbus/system_bus_socket”
},
“labels”: {},
“restart”: “always”,
“privileged”: true,
“ports”: [“8080:8080”],
“volumes”: [“settings:/usr/src/app/settings”],
“imageId”: 1,
“serviceName”: “kiosk”,
“serviceId”: 1,
“image”: “local_image_kiosk:latest”,
“running”: true
},
“2”: {
“environment”: {},
“labels”: {
“io.balena.features.kernel-modules”: “1”,
“io.balena.features.firmware”: “1”,
“io.balena.features.dbus”: “1”,
“io.balena.features.supervisor-api”: “1”,
“io.balena.features.balena-api”: “1”
},
“ports”: [“80”],
“privileged”: true,
“restart”: “always”,
“network_mode”: “host”,
“volumes”: [“cups:/etc/cups”],
“imageId”: 2,
“serviceName”: “cups”,
“serviceId”: 2,
“image”: “local_image_cups:latest”,
“running”: true
},
“3”: {
“environment”: {},
“labels”: {},
“privileged”: true,
“network_mode”: “host”,
“restart”: “always”,
“ports”: [“8888:8888”],
“imageId”: 3,
“serviceName”: “websocket”,
“serviceId”: 3,
“image”: “local_image_websocket:latest”,
“running”: true
}
},
“volumes”: { “settings”: {}, “cups”: {} },
“networks”: {}
}
}
},
“dependent”: { “config”: {} }
}

I am using a standard balena dash configuration

Hi Patrick,

I would suggest checking our balenaDash project. Its kiosk service uses chromium on RPi4 devices, so you might be able to reuse the setup we made there.

Let us know if that works for you.

Thanks @roman-mazur,

I am actually using balenaDash for my project
I am not sure why its not working out of the box with my Pi4

Here is my current full log
[ 4369.539]
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
[ 4369.539] Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian
[ 4369.539] Current Operating System: Linux 51af2a90ded3 4.19.75 #1 SMP PREEMPT Thu Jun 4 14:34:21 UTC 2020 aarch64
[ 4369.539] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M video=HDMI-A-1:1920x1080M@60,margin_left=0,margin_right=0,margin_top=0,margin_bottom=0 smsc95xx.macaddr=DC:A6:32:60:40:BA vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=tty1 console=ttyS0,115200 rootfstype=ext4 rootwait root=UUID=ba1eadef-b414-4b60-924a-6164a5d7be4f rootwait
[ 4369.539] Build Date: 05 June 2019 12:49:54PM
[ 4369.539] xorg-server 2:1.20.4-1+rpt1 (https://www.debian.org/support)
[ 4369.539] Current version of pixman: 0.36.0
[ 4369.539] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 4369.539] Markers: (–) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 4369.539] (==) Log file: “/var/log/Xorg.0.log”, Time: Mon Jun 29 08:49:58 2020
[ 4369.540] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 4369.540] (==) No Layout section. Using the first Screen section.
[ 4369.540] (==) No screen section available. Using defaults.
[ 4369.540] (
) |–>Screen “Default Screen Section” (0)
[ 4369.540] (**) | |–>Monitor “”
[ 4369.541] (==) No monitor specified for screen “Default Screen Section”.
Using a default monitor configuration.
[ 4369.541] (==) Automatically adding devices
[ 4369.541] (==) Automatically enabling devices
[ 4369.541] (==) Automatically adding GPU devices
[ 4369.541] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 4369.541] (WW) The directory “/usr/share/fonts/X11/misc” does not exist.
[ 4369.541] Entry deleted from font path.
[ 4369.541] (WW) The directory “/usr/share/fonts/X11/cyrillic” does not exist.
[ 4369.541] Entry deleted from font path.
[ 4369.541] (WW) The directory “/usr/share/fonts/X11/100dpi/” does not exist.
[ 4369.541] Entry deleted from font path.
[ 4369.541] (WW) The directory “/usr/share/fonts/X11/75dpi/” does not exist.
[ 4369.541] Entry deleted from font path.
[ 4369.541] (WW) The directory “/usr/share/fonts/X11/Type1” does not exist.
[ 4369.541] Entry deleted from font path.
[ 4369.542] (WW) The directory “/usr/share/fonts/X11/100dpi” does not exist.
[ 4369.542] Entry deleted from font path.
[ 4369.542] (WW) The directory “/usr/share/fonts/X11/75dpi” does not exist.
[ 4369.542] Entry deleted from font path.
[ 4369.542] (==) FontPath set to:
built-ins
[ 4369.542] (==) ModulePath set to “/usr/lib/xorg/modules”
[ 4369.542] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 4369.542] (II) Loader magic: 0x1fcf80
[ 4369.542] (II) Module ABI versions:
[ 4369.542] X.Org ANSI C Emulation: 0.4
[ 4369.542] X.Org Video Driver: 24.0
[ 4369.542] X.Org XInput driver : 24.1
[ 4369.542] X.Org Server Extension : 10.0
[ 4369.542] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)
[ 4369.542] (–) using VT number 3

[  4369.542] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[  4369.544] (II) xfree86: Adding drm device (/dev/dri/card1)
[  4369.550] (II) xfree86: Adding drm device (/dev/dri/card0)
[  4369.552] (II) no primary bus or device found
[  4369.552] 	falling back to /sys/devices/platform/soc/soc:gpu/drm/card1
[  4369.552] (II) LoadModule: "glx"
[  4369.553] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  4369.560] (II) Module glx: vendor="X.Org Foundation"
[  4369.560] 	compiled for 1.20.4, module version = 1.0.0
[  4369.560] 	ABI class: X.Org Server Extension, version 10.0
[  4369.560] (==) Matched modesetting as autoconfigured driver 0
[  4369.560] (==) Matched fbdev as autoconfigured driver 1
[  4369.561] (==) Assigned the driver to the xf86ConfigLayout
[  4369.561] (II) LoadModule: "modesetting"
[  4369.561] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  4369.562] (II) Module modesetting: vendor="X.Org Foundation"
[  4369.562] 	compiled for 1.20.4, module version = 1.20.4
[  4369.562] 	Module class: X.Org Video Driver
[  4369.562] 	ABI class: X.Org Video Driver, version 24.0
[  4369.562] (II) LoadModule: "fbdev"
[  4369.563] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  4369.563] (II) Module fbdev: vendor="X.Org Foundation"
[  4369.563] 	compiled for 1.20.3, module version = 0.5.0
[  4369.563] 	Module class: X.Org Video Driver
[  4369.563] 	ABI class: X.Org Video Driver, version 24.0
[  4369.563] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  4369.564] (II) FBDEV: driver for framebuffer: fbdev
[  4369.599] (II) modeset(0): using drv /dev/dri/card1
[  4369.599] (WW) Falling back to old probe method for fbdev
[  4369.600] (II) Loading sub module "fbdevhw"
[  4369.600] (II) LoadModule: "fbdevhw"
[  4369.601] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  4369.601] (II) Module fbdevhw: vendor="X.Org Foundation"
[  4369.601] 	compiled for 1.20.4, module version = 0.0.2
[  4369.601] 	ABI class: X.Org Video Driver, version 24.0
[  4369.603] (II) modeset(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[  4369.603] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[  4369.604] (==) modeset(0): RGB weight 888
[  4369.604] (==) modeset(0): Default visual is TrueColor
[  4369.604] (II) Loading sub module "glamoregl"
[  4369.604] (II) LoadModule: "glamoregl"
[  4369.604] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[  4369.619] (II) Module glamoregl: vendor="X.Org Foundation"
[  4369.619] 	compiled for 1.20.4, module version = 1.0.1
[  4369.619] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  4370.159] (II) modeset(0): glamor X acceleration enabled on V3D 4.2
[  4370.159] (II) modeset(0): glamor initialized
[  4370.161] (II) modeset(0): Output HDMI-1 has no monitor section
[  4370.163] (II) modeset(0): EDID for output HDMI-1
[  4370.164] (II) modeset(0): Printing probed modes for output HDMI-1
[  4370.164] (II) modeset(0): Modeline "1920x1080"x60.0  173.11  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync (67.2 kHz)
[  4370.164] (II) modeset(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[  4370.164] (II) modeset(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[  4370.164] (II) modeset(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz e)
[  4370.164] (II) modeset(0): Modeline "848x480"x60.0   33.75  848 864 976 1088  480 486 494 517 +hsync +vsync (31.0 kHz e)
[  4370.164] (II) modeset(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[  4370.164] (II) modeset(0): Output HDMI-1 connected
[  4370.164] (II) modeset(0): Using exact sizes for initial modes
[  4370.164] (II) modeset(0): Output HDMI-1 using initial mode 1024x768 +0+0
[  4370.164] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0)
[  4370.164] (==) modeset(0): DPI set to (96, 96)
[  4370.164] (II) Loading sub module "fb"
[  4370.164] (II) LoadModule: "fb"
[  4370.165] (II) Loading /usr/lib/xorg/modules/libfb.so
[  4370.165] (II) Module fb: vendor="X.Org Foundation"
[  4370.165] 	compiled for 1.20.4, module version = 1.0.0
[  4370.165] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  4370.165] (II) UnloadModule: "fbdev"
[  4370.165] (II) Unloading fbdev
[  4370.165] (II) UnloadSubModule: "fbdevhw"
[  4370.165] (II) Unloading fbdevhw
[  4370.243] (==) modeset(0): Backing store enabled
[  4370.243] (==) modeset(0): Silken mouse enabled
[  4370.333] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
[  4370.333] (==) modeset(0): DPMS enabled
[  4370.334] (II) modeset(0): [DRI2] Setup complete
[  4370.335] (II) modeset(0): [DRI2]   DRI driver: vc4
[  4370.335] (II) modeset(0): [DRI2]   VDPAU driver: vc4
[  4370.335] (II) Initializing extension Generic Event Extension
[  4370.335] (II) Initializing extension SHAPE
[  4370.336] (II) Initializing extension MIT-SHM
[  4370.336] (II) Initializing extension XInputExtension
[  4370.337] (II) Initializing extension XTEST
[  4370.338] (II) Initializing extension BIG-REQUESTS
[  4370.338] (II) Initializing extension SYNC
[  4370.339] (II) Initializing extension XKEYBOARD
[  4370.339] (II) Initializing extension XC-MISC
[  4370.340] (II) Initializing extension SECURITY
[  4370.340] (II) Initializing extension XFIXES
[  4370.341] (II) Initializing extension RENDER
[  4370.341] (II) Initializing extension RANDR
[  4370.342] (II) Initializing extension COMPOSITE
[  4370.343] (II) Initializing extension DAMAGE
[  4370.343] (II) Initializing extension MIT-SCREEN-SAVER
[  4370.344] (II) Initializing extension DOUBLE-BUFFER
[  4370.344] (II) Initializing extension RECORD
[  4370.345] (II) Initializing extension DPMS
[  4370.345] (II) Initializing extension Present
[  4370.346] (II) Initializing extension DRI3
[  4370.346] (II) Initializing extension X-Resource
[  4370.347] (II) Initializing extension XVideo
[  4370.347] (II) Initializing extension XVideo-MotionCompensation
[  4370.347] (II) Initializing extension SELinux
[  4370.347] (II) SELinux: Disabled on system
[  4370.347] (II) Initializing extension GLX
[  4370.745] (II) AIGLX: Loaded and initialized vc4
[  4370.745] (II) GLX: Initialized DRI2 GL provider for screen 0
[  4370.745] (II) Initializing extension XFree86-VidModeExtension
[  4370.745] (II) Initializing extension XFree86-DGA
[  4370.746] (II) Initializing extension XFree86-DRI
[  4370.746] (II) Initializing extension DRI2
[  4370.750] (II) modeset(0): Damage tracking initialized
[  4370.750] (II) modeset(0): Setting screen physical size to 270 x 203
[  4370.856] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)
[  4373.289] (II) modeset(0): Disabling kernel dirty updates, not required.
[  4380.857] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)
[  4390.867] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)

This is my "Kiosk " service

kiosk:
    restart: always
    build: ./kiosk
    labels:
      io.balena.features.kernel-modules: '1'
      io.balena.features.firmware: '1'
      io.balena.features.dbus: '1'
      io.balena.features.supervisor-api: '1'
      io.balena.features.balena-api: '1'
    privileged: true
    environment:
      - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
    ports:
      - 8080:8080
    volumes:
      - 'settings:/usr/src/app/settings'

Why is it looking for dbus in /var/run/dbus/system_bus_socket? I can see when I ssh into my container it is at /host/run/dbus/system_bus_socket? Is there a way that I can programmatically set it with X11/chromium-browser?

Hey,

/var/run/dbus/system_bus_socket is the default socket address dbus client uses, and it should be overridden with the environment variable DBUS_SYSTEM_BUS_ADDRESS with a different address - the socket mounted from the host system using the io.balena.features.dbus label on the iimage.

From the log message you presented, it looks like DBUS_SYSTEM_BUS_ADDRESS variable is not set for the container.
Could you please check if you have its value defined as an application or device environment variable.
https://www.balena.io/docs/learn/manage/serv-vars/

Thanks @roman-mazur,

I have set this varible in a lot of places, which is what is confusing? I have now set it as a service variable, a fleet environment variable, Ive also set it in my docker file and in my launch.sh as
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket

Any ideas?

Hey Patrick,
Just to confirm, you are unable to use the balenaDash project as is, without modifying it ?
can you please enable support access for your device and paste the uuid in private chat?

Thanks

Thanks @rahul-thakoor, I have replied privately

Hi Patrick,

I’ve had a quick look at the device, and I can see you have set BALENA_HOST_CONFIG_LAUNCH_URL in the fleet device configuration. These BALENA_HOST_CONFIG prefixed variables are actually a way to change settings in the config.txt file in the boot partition, and are for system settings such as GPU memory allocation…etc. What you want to do here is set a variable for the KIOSK service, rather than something for the host device. You can set a fleet service variable (like I see you did for previous containers) for the KIOSK service, and call it LAUNCH_URL. The display then should show your set URL. You can safely ignore the DBUS errors you are seeing there.

Let me know if that helps
Phil