HDMI set resolution problem

Hello !
I have been trying to change resolution (video mode) on a HDMI screen. I have used the advice on https://www.toradex.com/community/questions/59009/how-to-rotate weston-in-torizon-core.html.

So, the HMDI screen is connected:

    apalis-imx8-06805164:~$ cat  /sys/class/drm/card0-HDMI-A-1/status
    apalis-imx8-06805164:~$*cat  /sys/class/drm/card0-HDMI-A-1/enabled

and the following modes are annonunced:

    apalis-imx8-06805164:~$  cat /sys/class/drm/card0-HDMI-A-1/modes
    1920x1080   1920x1080   1920x1080   1920x1080   1680x1050
    1600x900    1280x1024   1280x1024   1440x900    1280x800
    1152x864    1280x720    1280x720    1280x720    1280x720
    1280x720    1024x768    1024x768    1024x768    832x624
    800x600     800x600     800x600     800x600     720x576
    720x576     720x480     720x480     720x480     720x480
    640x480     640x480     640x480     640x480     640x480

So, I made a new weston.ini (with a low resolution for testing):

    apalis-imx8-06805164:~$ more weston.ini

residing in /home/torizon. Then I start the Weston container with the following command (including -v /home/torizon/weston.ini:/etc/xdg/weston/weston.ini, which should copy the weston.ini file to the container).

    apalis-imx8-06805164:~$ docker run -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG    -v /home/torizon/weston.ini:/etc/xdg/weston/weston.ini         -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/     --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:$CT_TAG_WESTON --developer weston-launch --tty=/dev/tty7 --user=torizon
    apalis-imx8-06805164:~$ docker ps
    CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
    89d918aa9c08        torizon/weston:2    "/usr/bin/entry.sh -…"   2 seconds ago       Up 1 second                             weston

But the resolution does not change. The copy worked, because the modified weston.ini can be seen in a shell in the Weston container. I also tried /etc/xdg/weston-dev as destination för weston.ini, with the same result.

I also tried to to change the panel-position in the weston.ini file to bottom, but it had no effect. Is it neccessary to build a new weston container image to change video pars ? There seems to be no video mode specified in the kernel command line:

    apalis-imx8-06805164:~$ cat /proc/cmdline
    root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash ostree=/ostree/boot.1/torizon/cad4230bb4cbaa931d36a90bd375a75fa3291d66311587ba799a563a81464ae0/0

Also, where is the video resolution set ? It seems that the default weston.ini file in the Weston container does not change the resolution, but the resolution does appear to change at some point in the boot process ?

Any suggestions ?


Yet again I have to answer my own question, sorry for this. It turned out that

1. In this case, the weston.ini file should sit in the /etc/xdg/weston-dev
folder. This based on the content of environment variable WESTON_CONFIG_FILE
in the Weston container.

2. It seems that the weston.ini file is very sensitive to spaces in the wrong
places, at least at the end of section header lines.

Also, the ‘docker logs weston’ command was very useful, executed outside
the container. So, video mode switch was successful, problem solved.

Glad you were able to resolve your issue!

Also yes this is an issue we’ve ran into ourselves in the past. Weston is vary particular when parsing the weston.ini file usually common issues is the type of end of line character used. This can happen when copying text into the weston.ini since it’s hard to tell what line ending was copied.

Best Regards,