3.8.10. Weston
The supported Wayland/Weston version brings in the multiple display support in extended desktop mode and the ability to drag-and-drop windows from one display to the other.
The AM62Px group of devices actually utilizes two separate
DSS modules enumerated under two different /dev/dri/card*
devices.
Weston versions newer than 11.0.91
can specify additional card devices
via the --additional-devices
command line parameter.
To launch Weston using both card0 and card1, you can use the following command:
# weston --drm-device=card0 --additional-devices=card1
You may also modify the weston service to have systemd do this automatically
on launch by using systemctl edit weston
and inserting the following:
[Serivce]
ExecStart=/usr/bin/weston --modules=systemd-notify.so --drm-device=card0 --additional-devices=card1
Please note, however, that Weston cannot use by-path identifiers and consistent naming of DRI devices is not the default behavior.
3.8.10.1. Starting Weston with Systemd
Starting with Weston 10, the preferred way to start Weston is with the
weston
user using the systemd service. If you need to interact with this
instance using any other user then make sure that user is in the wayland
or
root
group and direct them to interact with that instance using the global
socket at /run/wayland-0
.
This global socket is special in that it will automatically launch Weston when
a GUI application attempts to connect to it. A profile script in
/etc/profile.d
will automatically set the WAYLAND_DISPLAY
environment
variable if the user has sufficient permission to interact with the socket.
To start the systemd service manually, do the following:
# systemctl start weston
To inspect the systemd service and socket status, do the following:
# systemctl status weston.service weston.socket
3.8.10.2. Starting Weston Manually
To launch Weston manually, do the following:
On the target console:
# unset WAYLAND_DISPLAY
On the default display:
# weston --display=<default connector-id>
On the secondary display:
# weston --display=<secondary connector-id>
On all connected displays (LCD and HDMI):
# weston
By default, the screensaver timeout is configured to 300 seconds. The user can change the screensaver timeout using a command line option:
--idle-time=<number of seconds>
For example, to set timeout of 10 minutes and Weston configured to display on all connectors, use the below command:
# weston --idle-time=600
To disable the screen timeout and to configure Weston to display on all connectors, use the below command:
# weston --idle-time=0
If you face any issues with the above procedure, please refer to the upstream weston documentation for troubleshooting tips.
The filesystem comes with a preconfigured weston.ini
file which will
be located at /etc/xdg/weston/weston.ini
3.8.10.3. Stopping Weston
Terminate all Weston clients before exiting Weston. If you have invoked Weston from the serial console, exit Weston by pressing Ctrl-C.
If Weston was started automatically by the init system then it can be stopped with:
# systemctl stop weston
It is also possible to invoke Weston from the native console, exit Weston by pressing Ctrl-Alt-Backspace.
3.8.10.4. Running Weston clients
Weston client examples can run from the command line on a serial port console or an SSH console. After launching Weston, the user should be able to use the keyboard and the mouse for various controls.
# /usr/bin/weston-flower
# /usr/bin/weston-clickdot
# /usr/bin/weston-cliptest
# /usr/bin/weston-dnd
# /usr/bin/weston-editor
# /usr/bin/weston-eventdemo
# /usr/bin/weston-image /usr/share/weston/terminal.png
# /usr/bin/weston-resizor
# /usr/bin/weston-simple-egl
# /usr/bin/weston-simple-shm
# /usr/bin/weston-simple-touch
# /usr/bin/weston-smoke
# /usr/bin/weston-info
# /usr/bin/weston-terminal
3.8.10.5. Running multimedia with Wayland sink
The GStreamer video sink for Wayland is the waylandsink. To use this video-sink for video playback:
# gst-launch-1.0 playbin uri=file://<path-to-file-name> video-sink=waylandsink
3.8.10.6. Using IVI shell feature
The SDK also has support for configuring Weston ivi-shell. The default shell that is configured in the SDK is the desktop-shell.
To change the shell to ivi-shell, the user will have to add the following lines
into the /etc/xdg/weston/weston.ini
.
To switch back to the desktop-shell can be done by commenting these lines in the
/etc/xdg/weston/weston.ini
(comments begin with a ‘#’ at the start of
line).
[core]
shell=ivi-shell.so
After the above configuration is completed, we can restart Weston by running the following command
# systemctl restart weston
Note
When Weston starts with ivi-shell, the default background is black, this is different from the desktop-shell that brings up a window with background.
With ivi-shell configured for Weston, Wayland client applications use ivi-application protocol to be managed by a central HMI window management.
Applications must support the ivi_application
Wayland protocol to be managed by
the HMI central controller with an unique numeric ID.
Some important references to Weston IVI-shell can be found at the following link: