summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/wayland/weston-init
Commit message (Collapse)AuthorAgeFilesLines
* weston-init: disable systemd watchdog optionAlexander Kanavin2022-02-181-2/+2
| | | | | | | | | | | | | | | | There is no other unit in oe-core where watchdog is enabled, and this feature starts to behave weirdly when test_date is adjusting the clock, which means weston is restarted without need, so disable for weston test stability. The issue won't show up on kvm qemu (x86/x86_64) because it runs too quickly, but non-kvm qemu (ppc/mips/arm) all fail in the same way due to slower timings. (From OE-Core rev: f4d8ad399d88dbd9d65bbfd0467f15a485e66605) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston: upgrade 9.0.0 -> 10.0.0Alexander Kanavin2022-02-052-29/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Release announcement with changes: https://lists.freedesktop.org/archives/wayland-devel/2022-February/042103.html Upstream has deprecated both weston-launch and fbdev backend, so let's not delay the inevitable and find replacements. Fbdev can be replaced by passing --use-pixman to drm backend; this will bypass the opengl paths and use CPU for rendering. Apply where GL is too slow or unavailable. weston-launch can be replaced by starting weston directly, with a seat management daemon for support. This is provided either by systemd, or on systemd-less systems, by seatd. The sysvinit startup scripts and tests have been rewritten accordingly. Bonus fix: under sysvinit weston now starts under weston user as it should, and not under root. Upstream discussion: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725 License-Update: copyright years (From OE-Core rev: 4efc81fc575aea1e12e00de8644a4b853719f8df) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "weston-init: Pass --continue-without-input when launching weston"Khem Raj2021-12-012-2/+2
| | | | | | | | | | | | | | This reverts commit 762a20b493cc219a46d9ac188fe4895a111ee7b4. This breaks machines using fbdev backend, since this option is drm backend specific, we need to know the backend before using it, until we have a smart way to detect that, this will not be a fool proof solution, therefore revert it for now. (From OE-Core rev: 6b7d8b2a141cc79272010b24d0648e6238fa4c74) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Pass --continue-without-input when launching westonKhem Raj2021-11-292-2/+2
| | | | | | | | | | | | This ensures that we do not need keyboard/mouse or other input system Weston's default behavior is to not open if input devices are not found, but we may not always have input devices connected for systems running weston in field (From OE-Core rev: 762a20b493cc219a46d9ac188fe4895a111ee7b4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston: wrapper for weston modules argumentPavel Zhukov2021-10-111-0/+11
| | | | | | | | | | | | | | | Due to custom option parser implementation weston accepts only one argument of a given type. As the result if multiple modules add multiple --modules agruments only last will be used. This fix introduces wrapper around modules in terms of weston-init to prepare proper modules argument for weston and adds systemd-notify module into weston-init module to support Type=notify in systemd service file. (From OE-Core rev: c8aa0222ce2be647911114aaebcbb0d55d7caf87) Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Set $HOME variable for SysVinit managerAdrian2021-03-201-0/+1
| | | | | | | | | | | SysVinit sets by default the $HOME directory to "/" for the init scripts. It's picked then by the weston-launcher and make weston-terminal to have wrongly set $HOME environment variable for the root user. (From OE-Core rev: f5ddf5533b19a41be9e9cd403c2e7ded6da6f272) Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Fix weston-keyboard path in weston.iniMarek Vasut2021-02-161-1/+1
| | | | | | | | | | | | The weston-keyboard executable is installed into /usr/libexec instead of /usr/lib/weston , correct the path in weston.ini . (From OE-Core rev: 56dee47a5ddb1da66d30f894a282d0658dcc930c) Signed-off-by: Marek Vasut <marex@denx.de> Cc: Khem Raj <raj.khem@gmail.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Stop running weston as rootJoshua Watt2020-11-244-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Running the weston compositor as the root user is an insecure default behavior for OE-core. We can do much better, at least when using systemd. Change the recipe to create a dedicated "weston" user and start weston as this user. The systemd service and socket units are no longer template units, as there were several inconsistencies in the templates. Instead, there is now a global /run/wayland-0 socket that gets created, and systemd will start weston on demand when a client connects to that socket or when attempting to reach graphical.target, whichever comes first. This also allows downstream users to easily change the behavior so that weston *only* starts on demand by adding a drop file. Access to the global socket is controlled by a "wayland" group; any user that is a member of the group can use the socket to talk to the compositor. This also satisfies another use case where another systemd service might start a graphical application that needs to display with weston (e.g. a single function device in kiosk mode). Finally, the udev rules for starting weston with the existance of a DRM device have been removed. Being WantedBy= a graphical target should eliminate the need for this behavior, and having it present makes it difficult for downstream users to start weston on demand (having to override the udev rules). (From OE-Core rev: dd83fb40f76749c6689807afabc63b9d5c2a4065) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: introduce WESTON_GROUPRichard Leitner2020-11-081-1/+5
| | | | | | | | | | | | | | Currently the WESTON_USER variable is used as user and group name for chown'ing XDG_RUNTIME_DIR. If WESTON_USER has no group with the same name this fails. Therefore add a new WESTON_GROUP variable which is set to WESTON_USER if not specified to ensure backwards compatibility. (From OE-Core rev: 8d4e0ac61671646749a30c72782376307b3e0c82) Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Add environment file support for systemd unit fileFabio Berton2020-10-061-0/+1
| | | | | | | | | | | The /etc/default/weston file is already installed and it can be used as systemd EnvironmentFile. (From OE-Core rev: a1390bd294a0f21297ace3f7b4e33912fa9cb63b) Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Select drm/fbdev backends for qemu machinesKhem Raj2020-09-142-0/+0
| | | | | | | | | | | qemux86/x86_64/aarch64 supports drm backend well, therefore enable it on these qemu machines, other qemu machines should be defaulting to fbdev, if its not qemu then leave it empty (From OE-Core rev: cfda3e10d5eb1563d10318c1d8ff6287b539ee04) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Do not use fbdev backendKhem Raj2020-09-141-2/+0
| | | | | | | | | This works ok with latest weston/kernel to use drm backend (From OE-Core rev: c696bdc424f1eadaa24dd8c0a8419e38f097f38a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Enable RDP screen shareKhem Raj2020-09-141-2/+2
| | | | | | | (From OE-Core rev: bdca4796ff43e475cd39fe1f1f48b9cfb08a5128) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Redefine weston service and add socket activation optionKhem Raj2020-09-103-10/+80
| | | | | | | | | | | | | | | | | | | | | | Currently, weston when autolauched with systemd ends up with seat0 related errors because its launched before seat0 is assigned. Fixes [05:16:09.357] logind: failed to get session seat [05:16:09.358] logind: cannot setup systemd-logind helper (-61), using legacy fallback The above error results in ptest failures in parselogs, even though weston has started ok using fallback methods, these errors are still seen in logs Also fixes weston ptests RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: PASSED (8.58s) (From OE-Core rev: c21fa5a291ab207a084285935ab73a0b4225c965) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Marek Vasut <marex@denx.de> Cc: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Launch weston with WESTON_DISABLE_ATOMIC on musl/x86Khem Raj2020-03-131-0/+0
| | | | | | | | | | | | | | | | | | | Since we enabled drm/kms backend for qemux86, it does not work with musl fdbdev worked ok, we see this error [18:58:45.628] launching '/usr/libexec/weston-desktop-shell' [18:58:45.737] atomic: couldn't commit new state: Invalid argument [18:58:45.737] repaint-flush failed: Invalid argument There seems to be some problem with atomics in libdrm, until that gets diagnosed, simple solution is to not use it on musl when drm backend is used thats why WESTON_DISABLE_ATOMIC=Y is set in environment file for such cases (From OE-Core rev: e571ef707d76cf3aceb0d56fd588b37f9b5092ff) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Allow use of weston without input devicesDomarys Correa2020-03-121-1/+2
| | | | | | | | | | | | Don't force users to have input device in your targets. As the default option require-input is set to true, Weston only starts if we have a device in /dev/input/event* and this not a requirement for all applications, e.g. kiosk browser. (From OE-Core rev: 43f40613ecedb8c3a9e3aaac0630464efc7525e3) Signed-off-by: Domarys Correa <domarys.correa@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: use the drm/kms backend rather than fbdev one for qemux86 machinesAlexander Kanavin2020-02-212-0/+0
| | | | | | | | | | | | | | | | | | | | | The fbdev backend is not documented, and not the default; as the emulated hardware in qemu now supports DRM/KMS (both std and virtio), we should align with upstream default and vast majority of users. Empty init file will cause weston to default to the KMS backend. Note that 3D acceleration via virgl is not required; the backend renders fine via the software driver in mesa. However, kvm is more or less required to keep the UI responsive. Also, other qemu targets (mips and arm in particular) continue to use the fbdev backend, as in the absence of kvm, the performance of software GL paths falls to unacceptable level. (From OE-Core rev: 1bddd7ac64bc0a863dec38bf4d9671f9f1a51b03) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Let weston run without pam on distros without pamKhem Raj2020-01-113-30/+6
| | | | | | | | | | | | | | | | | When pam is not part of distro, user specific XDG_* environment variables are not available since PAMName=login is in-effective and as a result weston can not start because it direly needs XDG_RUNTIME_DIR defined, therefore launching weston directly in systemd service will not work, therefore call the helper script weston-start, which is also used with sysvinit extend enabling fbdev backend fallback to all qemu machines Reported-by: Marek Vasut <marex@denx.de> (From OE-Core rev: ae66cf5e03f04361aad2bd8784fb7d42e0f0bb08) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Add possibility to run weston as non-root userKhem Raj2019-09-196-13/+117
| | | | | | | | | | | | | | | | | | | These changes are from meta-96boards primarily Launch the session via a udev rule based on what kind of display device is available delete weston-conf and move the fuctionality into weston-init other layers are doing same weston-init installs machine specific weston.ini therefore mark is machine specific now (From OE-Core rev: aa3bced2e1de2f4ba507aa014835b06edccc138a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Fix WESTON_USER typoBreno Leitao2019-05-131-1/+1
| | | | | | | | | | | | | | | | Commit 837c786d600ba69('weston-init: Add support for non-root start') added a typo that uses WEST_USER instead of WESTON_USER variable when chwon'ing the XDG_RUNTIME_DIR directory. Since WEST_USER is not defined, it will `chown :$WESTON_USER file`, which will work, but that is not 100% correctly and should be fixed. This patch basically fix the typo and now the file will be chown'ed to the WESTON_USER user. (From OE-Core rev: 1b9a2374be8723de654afa2c59a8b10266e5d8df) Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Add support for non-root startBreno Leitao2019-05-121-2/+15
| | | | | | | | | | This commit adds support for two variables (WESTON_USER and WESTON_TTY) that would be passed to weston_launch. It allows starting weston as a non-root user. (From OE-Core rev: 4e6ef156028cc48d21ff5b3f131bdb8882407395) Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Fix tab indentationBreno Leitao2019-05-121-7/+7
| | | | | | | | | | | | This patch simply fixes space and tab mixes. It converts space to tabs. This is being done since I am going to change the code in the next commit and I do not want to change more lines than it is required, thus, I am creating a commit just to fix indentation, so I can create a cleaner patch later. (From OE-Core rev: 82e97de432bfd553fb84b62666e2c860be2ecfeb) Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: run login before start weston.serviceWang Quanyang2018-08-201-0/+1
| | | | | | | | | | | | | | | | | | | When systemd start the weston.service, the script "weston-start" will check if the dir "XDG_RUNTIME_DIR" (usually is /run/user/0) exits and create it. Then weston will create a socket file "wayland-0" for communications with clients in this dir. If systemd is built with enabling "pam" feature, the login will call "run-user-0.mount" to mount tmpfs at the dir "/run/user/0", then the socket file "wayland-0" will be missing since it is created in the old "/run/user/0". So add "PAMName=login" to let weston.service call login first, once tmpfs is mounted at "/run/user/0", then call weston-start to create a socket file in it. (From OE-Core rev: 3cb303ffee8610d41c9a0745d366556c24066bc3) Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: De-couple framebuffer console from Weston for systemd startupTom Hochstein2016-07-262-2/+3
| | | | | | | | | | | | The framebuffer console was using the same I/O as Weston. We fix this by having openvt switch to the new VT when starting weston-launch, same as is already done for the sysvinit case. (From OE-Core rev: fba47b9d881af40eb2462aefd19040dc08314365) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Fix weston-start to handle 0 or 1 argsTom Hochstein2016-07-261-6/+1
| | | | | | | | | | The parser incorrectly treated anything less than 2 args as an error. (From OE-Core rev: 24d155d2d9be402a04fbd68b6a4ccf990deb9ce6) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Fix weston-start to allow weston args without openvt argsTom Hochstein2016-07-261-3/+2
| | | | | | | | | | | The parser didn't properly handle commands of the form weston-start -- <weston-options>. (From OE-Core rev: 84dc6a5b277b977488a5dda39feeff3482dfafe3) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Don't change XDG_RUNTIME_DIR if it already existsTom Hochstein2016-06-121-2/+4
| | | | | | | | | | | | In the case that XDG_RUNTIME_DIR already exists, the mkdir --parents at least does nothing, but the chmod could overwrite the desired file mode settings. (From OE-Core rev: 9f539d03138817b7b740ed1895000704e4a475d0) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Use bitbake path variableTom Hochstein2016-06-121-1/+1
| | | | | | | | (From OE-Core rev: 537afef2209bef327a28234207d1ef7e4e596a6e) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Use weston-launch when starting weston as the first windowing ↵Tom Hochstein2016-05-211-1/+6
| | | | | | | | | | | | | | | system When weston is started as the first windowing system (i.e. not under X nor under another Wayland server), it should be done with the command weston-launch to set up proper privileged access to devices. (From OE-Core rev: 76ed534267ed16677eeb86b85670338a1064a733) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Add module support for the weston-start helperOtavio Salvador2016-05-211-0/+26
| | | | | | | | | | | | | | To make weston-start more flexible we now support module loading. For such modules, following functions can be used: - add_weston_argument - add_openvt_argument (From OE-Core rev: 3e7c4d06aaa1fccc1a18f4431122603cc4a9bbe9) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Error out if loading a nested instanceOtavio Salvador2016-05-211-0/+5
| | | | | | | | | | | | The Weston nested instance support is not implemented. This errors out displaying an informative error message so someone insterested on it may look at implement this later. (From OE-Core rev: 2332f93ae88ca4e4a5aac1806f21104b6489b3bb) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: Rework init sequence to avoid code duplicationOtavio Salvador2016-05-213-12/+38
| | | | | | | | | | | The new 'weston-start' script redcues the code duplication for SysV and SystemD based images. (From OE-Core rev: 1963dfb002b9e0b4bff02dbf783909102ca59719) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston: Fix SystemD service descriptionOtavio Salvador2016-05-211-1/+1
| | | | | | | | | | | | This improves the log shown in boot. Now it shows: [ OK ] Started Weston Wayland Compositor (From OE-Core rev: 32e9ef3089de6cf2da3a2b53579e5e015dfe6c12) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: add a native systemd unit fileAlexander Kanavin2015-12-121-0/+15
| | | | | | | | | | | | Previously weston was started by systemd via a classic init script [YOCTO #5582] (From OE-Core rev: e67c7f0998a5a285bd079d2c956bd61457e75077) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: support system's configuration filePhilippe Coval2015-05-091-1/+5
| | | | | | | | | | | | | Look for OPTARGS variable in /etc/default/weston and set it as weston's service default options. This can be used to force system's supported backend. Change-Id: I0562c9326df5b46226093199873ef58d77aeae75 (From OE-Core rev: 8ffcdcc53bac64c62478fbb72d817c842dde8b28) Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: use /run instead of /var/runRoss Burton2013-11-121-1/+1
| | | | | | | | | /var/run is just a symlink to /run now, so use /run directly. (From OE-Core rev: b6201d2a27639f9d384ba1137096a05f6795797a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: start weston on a new VTRoss Burton2013-11-081-1/+1
| | | | | | | | | | | | | | | Weston 1.3 needs to run on a VT, which is typically handled by weston-launch. Currently weston-init doesn't use weston-launch as that depends on the (non-default) pam DISTRO_FEATURE, so depend on kbd and use openvt directly. This also fixes problems caused by the init script blocking until Weston exits, which meant that later init scripts were not actually running. (From OE-Core rev: 3726eb29cfa79a4a1fbdbcaa96f770063c482858) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: fix a typo in a user-visible messageRoss Burton2013-06-251-1/+1
| | | | | | | | | | This is the weston init script, not X. (From OE-Core rev: 8d30f9c1fe27795c4a1a3e64229cd1cc243e50be) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* weston-init: basic init script to start Weston on KMS/DRMRoss Burton2013-06-071-0/+56
weston-init is a very basic init script to start Weston as root on KMS/DRM. To re-iterate, this runs Weston as root. This will be fixed to use weston-launch shortly. (From OE-Core rev: eba825e4698f6923c32c347eb306abe9d7f3519d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>