Weston ignores [output] mode in the weston.ini

I have weston.ini

[output]
name=HDMI-A-1
mode=800x600@60.3
[output]
name=DPI-1
mode=off
[core]
idle-time=0

[shell]
background-image=/home/torizon/wallpaper-logo.png
background-color=0x00000000
panel-position=none
locking=false
allow-zap=false
num-workspaces=1

and run weston with command

docker run -d --rm --name=weston-test --net=host --cap-add CAP_SYS_TTY_CONFIG -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ -v /home/torizon/weston.ini:/etc/xdg/weston/weston.ini -v /home/torizon/wallpaper-logo.png:/home/torizon/wallpaper-logo.png --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' torizon/weston:2

weston reads and sets background image, panel position, but not the resolution
if I run --developer variant then resolution is set

docker run -d  --rm --name=weston-test --net=host --cap-add CAP_SYS_TTY_CONFIG -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ -v /home/torizon/weston.ini:/etc/xdg/weston-dev/weston.ini -v /home/torizon/wallpaper-logo.png:/home/torizon/wallpaper-logo.png --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' torizon/weston:2  --developer weston-launch --tty=/dev/tty7 --user=torizon

weston.ini is the same, but the resolution is set in --developer mode and ignored without --developer

how to set the resolution in the non-developer mode?

Greetings @Juzujka,

I took your weston.ini and your docker run commands exactly as you provided them. When I ran it on my Apalis i.MX6 the HDMI resolution was changed for both docker run commands, with and without the --developer flag.

I guess that doesn’t really answer anything for you but I can assure it that at least the docker run commands and weston.ini are generally correct.

Is there any other containers running at the same time that might cause some weird conflict perhaps? Is there any additional information from looking and comparing the weston logs from each container?

Best Regards,
Jeremias

Yesterday I have reinstall recent Torizon image from Easy Installer.
It runs torizon_kiosk_1, weston and portainer.
I’ve stop kiosk and weston.
Then apply docker-composer with
weston - like this debian-docker-images/Dockerfile at buster · toradex/debian-docker-images · GitHub

but

ARG IMAGE_TAG=2
...
COPY wallpaper-logo.png /home/torizon/wallpaper-logo.png

(wallpaper works)

my application

Dockerfile like in the article Torizon Qt Creator https://developer.toradex.com/knowledge-base/torizon-qtcreator

but

ARG BASE_NAME=arm32v7-debian-qt5-wayland:2
FROM torizon/$BASE_NAME
...
RUN apt-get -y update && apt-get install...
...
qtwayland5 \
libqt5waylandclient5 \

COPY app_file /opt/app_dir/bin/
COPY translation.qm /opt/app_dir/bin/

docker-compose is like in the torizon-samples demonstration

before to run docker-compose up -d

apalis-imx6-10618771:~$ docker ps -a
CONTAINER ID        IMAGE                        COMMAND                  CREATED              STATUS                        PORTS                              NAMES
torizon/kiosk-mode-browser   "/usr/bin/start-brow…"   About a minute ago   Exited (0) 43 seconds ago                                        torizon_kiosk_1
torizon/weston               "/usr/bin/entry.sh"      2 minutes ago        Exited (143) 22 seconds ago                                      torizon_weston_1
portainer/portainer-ce       "/portainer --templa…"   2 minutes ago        Up About a minute             8000/tcp, 0.0.0.0:8840->9000/tcp   torizon_portainer_1
apalis-imx6-10618771:~$ docker-compose up -d
WARNING: Found orphan containers (torizon_kiosk_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Recreating torizon_portainer_1 ... done
Recreating torizon_weston_1    ... done
Creating nobilis-client        ... done
apalis-imx6-10618771:~$ docker ps -a
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS                          PORTS                    NAMES
ibragimovingasm/nobilis-client   "/entrypoint.sh"         20 seconds ago      Up 18 seconds                                            nobilis-client
portainer/portainer:latest       "/portainer -H unix:…"   21 seconds ago      Up 17 seconds                   0.0.0.0:8840->9000/tcp   torizon_portainer_1
ibragimovingasm/nobilis-weston   "/usr/bin/entry.sh"      23 seconds ago      Up 21 seconds                                            weston
torizon/kiosk-mode-browser       "/usr/bin/start-brow…"   2 minutes ago       Exited (0) About a minute ago                            torizon_kiosk_1

On the screen is tiled background image, resolution is not from the weston.ini 800x600

docker logs weston
Switching to VT 7
Date: 2021-04-02 UTC
[07:44:51.127] weston 9.0.0
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: weston-8.0.0-1-55-ga326f42
[07:44:51.128] Command line: /usr/bin/weston --current-mode
[07:44:51.128] OS: Linux, 5.4.77-5.1.0+git.d50eadb86544, #1-TorizonCore SMP Wed Dec 23 18:10:04 UTC 2020, armv7l
[07:44:51.141] Using config file '/etc/xdg/weston/weston.ini'
[07:44:51.142] Output repaint window is 7 ms maximum.
[07:44:51.144] Loading module '/usr/lib/arm-linux-gnueabihf/libweston-9/drm-backend.so'
[07:44:51.180] initializing drm backend
[07:44:51.197] logind: not running in a systemd session
[07:44:51.197] logind: cannot setup systemd-logind helper (-61), using legacy fallback
[07:44:51.239] using /dev/dri/card1
[07:44:51.239] DRM: supports atomic modesetting
[07:44:51.239] DRM: supports GBM modifiers
[07:44:51.239] DRM: supports picture aspect ratio
[07:44:51.241] Loading module '/usr/lib/arm-linux-gnueabihf/libweston-9/gl-renderer.so'
[07:44:51.796] EGL client extensions: EGL_EXT_device_base
               EGL_EXT_device_enumeration EGL_EXT_device_query
               EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses
               EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device
               EGL_EXT_platform_wayland EGL_KHR_platform_wayland
               EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_MESA_platform_gbm
               EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
[07:44:51.801] EGL version: 1.4
[07:44:51.802] EGL vendor: Mesa Project
[07:44:51.802] EGL client APIs: OpenGL OpenGL_ES 
[07:44:51.802] EGL extensions: EGL_ANDROID_blob_cache
               EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age
               EGL_EXT_image_dma_buf_import
               EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2
               EGL_KHR_config_attribs EGL_KHR_create_context
               EGL_KHR_create_context_no_error EGL_KHR_fence_sync
               EGL_KHR_get_all_proc_addresses EGL_KHR_gl_renderbuffer_image
               EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image
               EGL_KHR_gl_texture_cubemap_image EGL_KHR_image
               EGL_KHR_image_base EGL_KHR_image_pixmap
               EGL_KHR_no_config_context EGL_KHR_reusable_sync
               EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
               EGL_KHR_wait_sync EGL_MESA_configless_context
               EGL_MESA_drm_image EGL_MESA_image_dma_buf_export
               EGL_MESA_query_driver EGL_WL_bind_wayland_display
[07:44:51.802] EGL_KHR_surfaceless_context available
[07:44:51.817] GL version: OpenGL ES 2.0 Mesa 20.1.5
[07:44:51.817] GLSL version: OpenGL ES GLSL ES 1.0.16
[07:44:51.817] GL vendor: etnaviv
[07:44:51.817] GL renderer: Vivante GC2000 rev 5108
[07:44:51.817] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_filter_anisotropic
               GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1
               GL_EXT_texture_format_BGRA8888
               GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24
               GL_OES_element_index_uint GL_OES_fbo_render_mipmap
               GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
               GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot
               GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture
               GL_AMD_performance_monitor GL_OES_packed_depth_stencil
               GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary
               GL_APPLE_texture_max_level GL_EXT_discard_framebuffer
               GL_EXT_read_format_bgra GL_EXT_frag_depth
               GL_NV_fbo_color_attachments GL_OES_EGL_image_external
               GL_OES_EGL_sync GL_OES_vertex_array_object
               GL_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5
               GL_EXT_occlusion_query_boolean GL_EXT_unpack_subimage
               GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth
               GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers
               GL_EXT_map_buffer_range GL_KHR_debug
               GL_KHR_texture_compression_astc_ldr GL_NV_pixel_buffer_object
               GL_OES_required_internalformat GL_OES_surfaceless_context
               GL_EXT_separate_shader_objects
               GL_EXT_compressed_ETC1_RGB8_sub_texture
               GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp
               GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex
               GL_OES_texture_border_clamp GL_KHR_no_error
               GL_KHR_texture_compression_astc_sliced_3d
               GL_EXT_disjoint_timer_query
               GL_EXT_texture_compression_s3tc_srgb
               GL_KHR_parallel_shader_compile
[07:44:51.818] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[07:44:52.272] event1  - gpio-keys: is tagged by udev as: Keyboard
[07:44:52.272] event1  - gpio-keys: device is a keyboard
[07:44:52.354] event2  - eGalax Inc. USB TouchController Touchscreen: is tagged by udev as: Tablet
[07:44:52.717] event2  - eGalax Inc. USB TouchController Touchscreen: libinput bug: missing tablet capabilities: resolution. Ignoring this device.
[07:44:52.718] event2  - eGalax Inc. USB TouchController Touchscreen: device is a tablet
[07:44:52.719] event2  - failed to create input device '/dev/input/event2'
[07:44:52.744] event3  - eGalax Inc. USB TouchController: is tagged by udev as: Touchscreen
[07:44:52.748] event3  - eGalax Inc. USB TouchController: device is a touch device
[07:44:52.780] event5  - Logitech USB Receiver: is tagged by udev as: Keyboard
[07:44:52.780] event5  - Logitech USB Receiver: device is a keyboard
[07:44:52.812] event6  - Logitech USB Receiver Mouse: is tagged by udev as: Mouse
[07:44:52.813] event6  - Logitech USB Receiver Mouse: device is a pointer
[07:44:52.835] event7  - Logitech USB Receiver Consumer Control: is tagged by udev as: Keyboard
[07:44:52.836] event7  - Logitech USB Receiver Consumer Control: device is a keyboard
[07:44:52.867] event8  - Logitech USB Receiver System Control: is tagged by udev as: Keyboard
[07:44:52.868] event8  - Logitech USB Receiver System Control: device is a keyboard
[07:44:52.904] event0  - stmpe-ts: is tagged by udev as: Touchscreen
[07:44:52.906] event0  - stmpe-ts: device is a touch device
[07:44:52.997] libinput: configuring device "gpio-keys".
[07:44:52.998] Touchscreen - eGalax Inc. USB TouchController - /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.2/1-1.2:1.0/0003:0EEF:0001.0001/input/input15/event3
[07:44:52.998] libinput: configuring device "eGalax Inc. USB TouchController".
[07:44:52.998] input device event3 has no enabled output associated (none named), skipping calibration for now.
[07:44:52.998] libinput: configuring device "Logitech USB Receiver".
[07:44:52.998] libinput: configuring device "Logitech USB Receiver Mouse".
[07:44:52.998] libinput: configuring device "Logitech USB Receiver Consumer Control".
[07:44:52.999] libinput: configuring device "Logitech USB Receiver System Control".
[07:44:53.001] Touchscreen - stmpe-ts - /sys/devices/soc0/soc/2100000.aips-bus/21a4000.i2c/i2c-2/2-0041/stmpe-ts/input/input0/event0
[07:44:53.001] libinput: configuring device "stmpe-ts".
[07:44:53.001] input device event0 has no enabled output associated (none named), skipping calibration for now.
[07:44:53.108] DRM: head 'HDMI-A-1' found, connector 54 is connected, EDID make 'RTK', model '32V3H-H6A', serial '1'
[07:44:53.108] DRM: head 'DPI-1' found, connector 56 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[07:44:53.109] Registered plugin API 'weston_drm_output_api_v1' of size 12
[07:44:53.109] Registered plugin API 'weston_drm_virtual_output_api_v1' of size 24
[07:44:53.110] Chosen EGL config details: id:  21 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 1-1 type: win vis_id: XRGB8888 (0x34325258)
[07:44:53.111] Output HDMI-A-1 (crtc 34) video modes:
               1280x720@60.0, preferred, current, 74.2 MHz
               1920x1080@60.0 16:9, 148.5 MHz
               1920x1080@59.9 16:9, 148.4 MHz
               1920x1080@60.0, 74.2 MHz
               1920x1080@60.0 16:9, 74.2 MHz
               1920x1080@59.9 16:9, 74.2 MHz
               1920x1080@50.0, 148.5 MHz
               1920x1080@50.0 16:9, 148.5 MHz
               1920x1080@50.0, 74.2 MHz
               1920x1080@50.0 16:9, 74.2 MHz
               1280x1024@75.0, 135.0 MHz
               1440x900@84.8, 157.0 MHz
               1440x900@75.0, 136.8 MHz
               1440x900@59.9, 88.8 MHz
               1280x720@60.0 16:9, 74.2 MHz
               1280x720@59.9 16:9, 74.2 MHz
               1280x720@50.0, 74.2 MHz
               1280x720@50.0 16:9, 74.2 MHz
               1024x768@75.0, 78.8 MHz
               1024x768@70.1, 75.0 MHz
               1024x768@60.0, 65.0 MHz
               800x600@75.0, 49.5 MHz
               800x600@72.2, 50.0 MHz
               800x600@60.3, 40.0 MHz
               800x600@56.2, 36.0 MHz
               720x576@50.0, 27.0 MHz
               720x576@50.0 4:3, 27.0 MHz
               720x576@50.0 16:9, 27.0 MHz
               720x480@60.0 4:3, 27.0 MHz
               720x480@60.0 16:9, 27.0 MHz
               720x480@59.9, 27.0 MHz
               720x480@59.9 4:3, 27.0 MHz
               720x480@59.9 16:9, 27.0 MHz
               640x480@75.0, 31.5 MHz
               640x480@72.8, 31.5 MHz
               640x480@60.0 4:3, 25.2 MHz
               640x480@59.9, 25.2 MHz
               720x400@70.1, 28.3 MHz
[07:44:53.111] associating input device event1 with output HDMI-A-1 (none by udev)
[07:44:53.111] associating input device event3 with output HDMI-A-1 (none by udev)
[07:44:53.114] associating input device event5 with output HDMI-A-1 (none by udev)
[07:44:53.114] associating input device event6 with output HDMI-A-1 (none by udev)
[07:44:53.114] associating input device event7 with output HDMI-A-1 (none by udev)
[07:44:53.114] associating input device event8 with output HDMI-A-1 (none by udev)
[07:44:53.114] associating input device event0 with output HDMI-A-1 (none by udev)
[07:44:53.118] Output 'HDMI-A-1' enabled with head(s) HDMI-A-1
[07:44:53.118] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[07:44:53.120] Loading module '/usr/lib/arm-linux-gnueabihf/weston/desktop-shell.so'
[07:44:53.128] launching '/usr/lib/arm-linux-gnueabihf/weston-keyboard'
[07:44:53.134] launching '/usr/lib/arm-linux-gnueabihf/weston-desktop-shell'
could not load cursor 'dnd-move'
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-none'
docker logs nobilis-client 
QML debugging is enabled. Only use this in a safe environment.
QStandardPaths: wrong ownership on runtime directory /tmp/1000-runtime-dir, 1000 instead of 0
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
arg N  0  is  ./Nobilis_client
arg N  1  is  --arch
arg N  2  is  ixora

and other app’s stuff

And here is comparison of the weston logs:

there is no other containers besides portainer and weston

~$ docker ps --format "table {{.Image}}\t{{.Names}}\t{{.Status}}"
IMAGE                        NAMES                 STATUS
portainer/portainer:latest   torizon_portainer_1   Up About an hour

Alright I noticed in your logs without --devloper weston is being ran as /usr/bin/weston --current-mode. While in the logs with --developer it’s ran as Command line: /usr/bin/weston. According to the manpage --curent -mode, “By default, use the current video mode of all outputs, instead of switching to the monitor preferred mode.”

This may be affecting your monitor settings in your case. Please add weston-launch --tty=/dev/tty7 --user=torizon to the end of your docker run command without --developer. Otherwise weston will default launch with --current-mode. See if this helps your situation.

Best Regards,
Jeremias

Jeremias, thank you, weston-launch --tty=/dev/tty7 --user=torizon without --developer works!

Your welcome, glad I could help!