Code Monkey home page Code Monkey logo

balena-weston's Introduction

balena-weston

Project Status: No Longer Under Active Development

This project was an experiment to integrate WPE into the Balena Hub.
It is not currently actively developed or maintained. The current version available from Balena Hub does not reflect the most recent advancements or patches in the WPE ecosystem.

If an up to date Balena block is very important to you, we'd be very interested to hear more. Meanwhile, if you encounter issues or are seeking updates, we recommend exploring alternative solutions or resources that align with your requirements.

Should you have any further questions or inquiries, please feel free to get in touch.

Description

Weston is the reference implementation of a Wayland compositor, as well as an useful environment in and of itself.

Out of the box, Weston provides a very basic desktop, or a full-featured environment for non-desktop uses such as automotive, embedded, in-flight, industrial, kiosks, set-top boxes and TVs. It also provides a library allowing other projects to build their own full-featured environments on top of Weston's core.

The core focus of Weston is correctness and reliability. Weston aims to be lean and fast, but more importantly, to be predictable. Whilst Weston does have known bugs and shortcomings, we avoid unknown or variable behaviour as much as possible, including variable performance such as occasional spikes in frame display time.


Requirements

Configuration Value
Define DT overlays vc4-kms-v3d

Usage

docker-compose file

version: '2'

volumes:
    weston:

services:
  weston:
    restart: always
    build: ./weston
    privileged: true
    volumes:
      - 'weston:/run/weston'

  myBlock:
    restart: always
    build: .
    privileged: true
    volumes:
      - 'weston:/run/weston'

Customization

Extend image configuration

Dockerfile.template

FROM igalia/balena-weston:%%BALENA_MACHINE_NAME%%

COPY data/	 /data/

COPY weston-init /weston-init
RUN chmod +x /weston-init

CMD [ "/weston-init" ]

weston/weston-init

...
[shell]
# Set a custom wallpaper
background-image=/data/wallpapers/MyWallpaper.jpg
...

Environment variables

There are several environment variables that can be used to tweak the Weston settings. The defaults should be okay for most cases.

Environment variable Options Default Description
WESTON_IDLE_TIME integer 0 (never) Idle time in seconds (e.g. 900)
WESTON_SHELL string desktop The shell to use (desktop, fullscreen, kiosk etc.)
WESTON_OUTPUT_USE_CURRENT_MODE 0, 1 0 Inherit the display mode from KMS console
WESTON_OUTPUT_MAX_WIDTH integer 0 Maximum horizontal resolution the compositor may set
WESTON_OUTPUT_MAX_HEIGHT integer 0 Maximum vertical resolution the compositor may set

The maximum-resolution environment variables rely on the list of modes advertised by the DRM subsystem. That means if you set for example the maximum horizontal resolution to 1920 and the list contains 3840x2160, 2560x1440, 1920x1080 and 1280x800, 1920x1080 will be picked.

The shell used will be ${WESTON_SHELL}-shell.so. You can use any shell shipped with Weston by default.

How to build

  • Getting the sources

    git clone https://github.com/Igalia/balena-weston.git
    repo init -u https://github.com/Igalia/balena-weston.git -m manifest-hardknott.xml -b main
    repo sync --force-sync
  • Generating the image root filesystem with Yocto:

    MACHINE=raspberrypi3
    ./build.sh
  • Pushing the image to the registered Docker repository:

    MACHINE=raspberrypi3
    IMAGE_DOCKER_PATH=igalia
    # BALENA_BUILD_EXTRA_ARGS="-e"  # In case of balena is being executed on a different host architecture than the balena machine target
    ./push.sh

balena-weston's People

Contributors

psaavedra avatar q66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

balena-weston's Issues

How to select DSI port as output?

Hi I'm using a PiDisplay touchscreen

Weston loads but nothing shows on the screen:

 weston  [05:11:13.708] event0  - vc4: is tagged by udev as: Keyboard Pointingstick
 weston  [05:11:13.709] event0  - vc4: device is a pointer
 weston  [05:11:13.709] event0  - vc4: device is a keyboard
 weston  [05:11:14.767] event1  - vc4: is tagged by udev as: Keyboard Pointingstick
 weston  [05:11:14.767] event1  - vc4: device is a pointer
 weston  [05:11:14.767] event1  - vc4: device is a keyboard
 weston  [05:11:14.769] event2  - raspberrypi-ts: is tagged by udev as: Touchscreen
 weston  [05:11:14.769] event2  - raspberrypi-ts: device is a touch device
 weston  [05:11:18.163] libinput: configuring device "vc4".
 weston  [05:11:18.163] libinput: configuring device "vc4".
 weston  [05:11:18.163] Touchscreen - raspberrypi-ts - /sys/devices/platform/soc/soc:firmware/soc:firmware:touchscreen/input/input2/event2
 weston  [05:11:18.163] libinput: configuring device "raspberrypi-ts".
 weston  [05:11:18.163] input device event2 has no enabled output associated (none named), skipping calibration for now.
 weston  [05:11:18.165] DRM: head 'HDMI-A-1' found, connector 32 is disconnected.
 weston  [05:11:18.165] DRM: head 'HDMI-A-2' found, connector 40 is disconnected.
 weston  [05:11:18.166] Registered plugin API 'weston_drm_output_api_v1' of size 24
 weston  [05:11:18.166] Compositor capabilities:
 weston                 arbitrary surface rotation: yes
 weston                 screen capture uses y-flip: yes
 weston                 presentation clock: CLOCK_MONOTONIC, id 1
 weston                 presentation clock resolution: 0.000000001 s
 weston  [05:11:18.208] Loading module '/usr/lib/weston/desktop-shell.so'
 weston  [05:11:18.235] launching '/usr/libexec/weston-keyboard'
 weston  [05:11:18.237] launching '/usr/libexec/weston-desktop-shell'
 weston  could not load cursor 'dnd-move'
 weston  could not load cursor 'dnd-copy'
 weston  could not load cursor 'dnd-move'
 weston  could not load cursor 'dnd-copy'
 weston  could not load cursor 'dnd-none'
 weston  could not load cursor 'dnd-none'
 weston  [05:40:10.934] Unmatched touch up event on seat default, device /sys/devices/platform/soc/soc:firmware/soc:firmware:touchscreen/input/input2/event2
 weston  [05:40:11.146] Unmatched touch up event on seat default, device /sys/devices/platform/soc/soc:firmware/soc:firmware:touchscreen/input/input2/event2
 weston  [05:40:20.150] Unmatched touch up event on seat default, device /sys/devices/platform/soc/soc:firmware/soc:firmware:touchscreen/input/input2/event2
 weston  [05:40:21.470] Unmatched touch up event on seat default, device /sys/devices/platform/soc/soc:firmware/soc:firmware:touchscreen/input/input2/event2

touch events are being detected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.