How to rotate weston in torizon core

Hello,

I have installed torizon core to test quickly the web browser feature because I wasn’t able to compile it easily with tdx-reference-multimedia-image ( nor meta-browser, neither qtwebengine-examples compile without error )

I was able to fix timing parameter of the LCD by installing custom DTBO with right timings , but how to rotate weston because weston is executed as a docker container , and the file /etc/xdg/weston/weston.ini does not exist.

I was able to rotate by modifying the following file :
./sysroot/ostree/deploy/torizon/var/lib/docker/overlay2/33c2b35b3b29aacd475021c997c27b7dbbd4aea75c6bf10b20dafb6a28281dd5/diff/etc/xdg/weston/weston.ini

( I found it with sudo du -a / | grep weston.ini )

and adding :

[output] 
name=DPI-1 
transform=90

But I guess it is not the good way to do this. Is it possible to configure weston with the portainer interface ( http://ip:8840 → containers → torizon_weston_1 ) , to set a variable for example or something else ?

Greetings @f.mazur,

Actually your overall idea of modifying the weston.ini file is correct, though there is a better way to do it then what you did.

For context when we build our containers we include a default weston.ini. This can be found here: https://github.com/toradex/debian-docker-images/tree/buster/weston

This gets copied to the usual spot in the container at /etc/xdg/weston/weston.ini.

So what you should do is overwrite this file when you start a weston-based container. You can do this simply via a bindmount. For example if you have your weston.ini in /home/torizon, then by adding the following to docker run: -v /home/torizon/weston.ini:/etc/xdg/weston/weston.ini

This option will take your weston.ini and overwrite the weston.ini that the container shipped with.

Alternatively you can also just rebuild the container with your weston.ini. That way you have your own variant on our weston container. Either of these options would be fine depending on your needs.

Best Regards,
Jeremias

Hello @jeremias.tx

Thank you for your answer.

First, I never used docker before, I am not familiar with this software. I will check what you explain to me :slight_smile:

I don’t know if we will use torizon core image or our own built image ( preference for the second option ), I just wanted to evaluate chromium on imx8x and it seemed to be easier with torizon because chromium is already built, and not on tdx-reference-multimedia-image (and I have some difficulties to build chromium on dunfell branch )

After the evaluation, I discover that chromium is not accelerated with torizon core , webgl is not activated , and so not vpu ( I can read only webm with VP9 , not h264/mp4 , and with 1080p video sample, the CPU is has 150% load )

I’m going to open another topic for this specific issue , or maybe I continue here ?

Actually I can comment on the chromium acceleration issue here.

First of all, we are aware of this limitation. We’ve had some difficulty in trying to get hardware acceleration with chromium on all of our hardware platforms. This has been more difficult on the newer hardware such as the i.MX8X. I don’t have anything to share but we are still working on this.

As a follow-up is it a hard-requirement for you to be using specifically chromium, or will any web-browser suffice as long as it’s hardware accelerated?

Best Regards,
Jeremias

Hello,

I have answered on the other topic.

Yes, any browser as long as it is webgl accelerated.

Regards,

Thanks for the great answer, @jeremias.tx.

Is there anything we could help you on this topic, @f.mazur?

No, I wonder it can be closed :slight_smile:

Thanks a lot.