wayland | Wayland is a project to define a protocol for a compositor | Video Utils library
kandi X-RAY | wayland Summary
kandi X-RAY | wayland Summary
Wayland is a project to define a protocol for a compositor to talk to its clients as well as a library implementation of the protocol. The compositor can be a standalone display server running on Linux kernel modesetting and evdev input devices, an X applications, or a wayland client itself. The clients can be traditional applications, X servers (rootless or fullscreen) or other display servers. The wayland protocol is essentially only about input handling and buffer management. The compositor receives input events and forwards them to the relevant client. The clients creates buffers and renders into them and notifies the compositor when it needs to redraw. The protocol also handles drag and drop, selections, window management and other interactions that must go through the compositor. However, the protocol does not handle rendering, which is one of the features that makes wayland so simple. All clients are expected to handle rendering themselves, typically through cairo or OpenGL. The weston compositor is a reference implementation of a wayland compositor and the weston repository also includes a few example clients clients.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wayland
wayland Key Features
wayland Examples and Code Snippets
Community Discussions
Trending Discussions on wayland
QUESTION
Whenever I try to run any Gtk+ Flatpak-ed app on wayland I get error such as:
(porto:3): Gtk-WARNING **: 00:55:13.780: cannot open display: :99.0
(setzer:2): Gtk-WARNING **: 01:01:41.868: cannot open display:
(org.gnome.Maps:2): Gtk-WARNING **: 01:02:18.136: cannot open display:
ANSWER
Answered 2021-Jan-21 at 00:27The problem seems to be that GDK_BACKEND
variable is for some reason set to X11. Run following commands to check whether you have the same problem. I'm using gnome maps, but you can use whichever app you like.
QUESTION
I have an executable that by default uses EGL and SDL 1.2 to handle graphics and user input respectively. Using LD_PRELOAD
, I have replaced both with GLFW.
This works normally unless the user has installed the Wayland version of GLFW, which depends on EGL itself. Because all the EGL calls are either stubbed to do nothing or call GLFW equivalents, it doesn't work (ie. eglSwapBuffers
calls glfwSwapBuffers
which calls eglSwapBuffers
and so on). I can't remove the EGL stubs because then it would call both EGL and GLFW and the main executable is closed-source so I can't modify that.
Is there any way to make LD_PRELOAD
affect the main executable but not GLFW? Or any other solution to obtain the same effect?
I made a simplified example to demonstrate the problem.
Main Executable:
...ANSWER
Answered 2021-Jun-12 at 18:31You can check if the return address is in the executable or the library, and then call either the "real" function or do your stub code, like this:
QUESTION
I'm working on a project to read/write to LibreOffice calc sheets in a c++ application. The code I'm writing include the line #include
In order to get the component context and so on to read/write to the .ods files.
I'm using Fedora Linux 34 with gnome 40 Wayland and code::blocks 20.03. In the project I used the paths /usr/lib64/libreoffice/sdk/include and /usr/lib64/libreoffice/sdk/lib for the headers and libraries respectively. When I try to compile, the project which has nothing more than the include lines, the compiler throws an error saying that there is an error in the types.h header in the line where #if defined(_MSC_VER) evaluates to false.
How to overcome this if I'm using Linux? I installed the SDK in a Linux distro so why the SDK gives this error checking the platform?
Thanks you in advance for the help.
...ANSWER
Answered 2021-Jun-04 at 17:20From the answer to your other post:
QUESTION
after uninstalling latest
and installed nightly
I cannot paste from clipboard,
double checked my init.vim for set clipboard=unnamedplus
any suggestion?
update 21st May
following Matt's comment, running :checkhealth provider
outputs
ANSWER
Answered 2021-May-21 at 21:39Neovim doesn't have any code to access OS clipboard directly (or to process X Window events). Instead it delegates to external utilities/plugins. You're expected to execute :checkhealth
command to see the current state. If you don't have any supported tool on your PATH
then you'll not be able to access the clipboard.
As a shameless plug, I wrote plugin that consists of dynamic library providing direct access to clipboard. This is to avoid extra process creation for every copy/paste operation (btw. setting clipboard=unnamed[plus]
is bad for more than just this single reason). However, the library must be built from source before use.
As of Wayland, its IPC mechanism is clearly different from X but at least in GNOME or KDE you may expect both selections being synchronized transparently. Otherwise you need specific utils to access Wayland clipboard, such as wl-copy/wl-paste.
QUESTION
My application, ROXTerm, depends on vte-2.91 >= 0.52, but it performs a run-time check for a new feature in vte 0.64 which it can use to enhance UX by enabling kinetic scrolling for touch input devices, which otherwise would only be available by enabling a deprecated xorg driver (not available in Wayland).
The strict dependency on vte-2.91 >= 0.52 is managed by Build-Depends. Would it be appropriate to add Suggests: vte-2.91 >= 0.64
to the binary package?
ANSWER
Answered 2021-May-18 at 15:50no, this doesn't make sense.
>=0.64
is a strict superset of >=0.52
dependency (this holds true for both mathematical comparision and dependency resolution).
The dependency you already have says: "use any version of vte-2.91
that is newer than (or equal to) 0.52".
This dependency can be satisfied by vte2.19_0.52
, vte2.19_0.63.9
and vte2.19_0.77
(among others).
Now, the dependency resolver (apt
) will pick the newest version that can satisfy it's dependencies (and that isn't downvoted by apt-pinning).
If your distribution release ships with vte2.19_0.77
it will automatically pick that, but if it only comes with vte2.19_0.52-9
it will pick that instead.
In short: if the distribution release lacks a vte-2.91 >= 0.64
it cannot install that version, and if it comes with vte-2.91 >= 0.64
it will pick that version anyways.
Adding a versioned Suggests
doesn't change anything about this.
QUESTION
I would like to write my nixos-configuration and home-manager-configuration files in a way that they work on both NixOs (linux) and MacOs (darwin).
While some things are configured the same way on both systems (eg git) other only make sense on one of them (like wayland-windowmanagers being only a thing on linux).
Nix-language features if-else-statements, so now all I need is a way to find out what kind of system I am on.
What I am after is something like:
...ANSWER
Answered 2021-May-09 at 11:14In a NixOS module, you can do this:
QUESTION
I’m running the latest version of Manjaro ARM i3 on a Raspberry Pi3 (Image: Raspberry Pi 4 I3 20.10). I can’t for the love of me get the screen to rotate. I recently switched from Manjaro Wayland to this version because of Synergy support.
What I tried:
- Using
xrandr
to rotate the screen. xrandr only sees a “Default” screen and when I try to rotate it I get the error: ...
ANSWER
Answered 2021-Mar-01 at 16:15I was able to solve this by disabling the vc4-fkms-v3d
drivers. You can do this using the following steps:
- Open you config file at
/boot/config.txt
- Using a
#
, comment out the line:vc4-fkms-v3d
- Add the rotation to the config like:
display_rotate=1
- for 90 degree rotationdisplay_rotate=2
- for 180 degree rotationdisplay_rotate=3
- for 270 degree rotation
- Reboot
Your screen should now be rotated. Please note that this disables the vc4-fkms-v3d
video card drivers which could have other unforeseen effects. Also keep in mind that this is the case for a RPi3.
QUESTION
Can someone help me in setting up the recipe to build mDNS in Yocto and/or
correct any other mistakes I may have made?
I previously successfully built mDNS and got it running in Linaro embedded
Linux.
This is a pretty detailed post, to try to err on the side of giving enough
information. As one responder wrote in a forum message that I saw recently:
"Welcome to Yocto. Here's your bottle of whiskey and Advil..."
Building in Linaro Linux: I had obtained this .tar of mDNS from Apple:
https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-878.200.35.tar.gz
Following this got it going: https://github.com/balaji-reddy/mDNSResponder .
I made a base folder /mDNS/ for my mDNS stuff and extracted the .tar there,
creating an mDNSResponder-878.200.35/ folder. I did cd into that.
It build readily for me in Linaro using the command: make os="linux" -C "mDNSPosix"
I got 8 files in /mDNS/mDNSR-878.200.35/mDNSPosix/build/prod/ :
40,592 libdns_sd.so
55,960 libnss_mdns-0.2.so
370,288 mDNSClientPosix
448,608 mdnsd
374,616 mDNSIdentify
387,904 mDNSNetMonitor
373,960 mDNSProxyResponderPosix
379,768 mDNSResponderPosix
Then, still in mDNSResponder-878.200.35/, I did:
make install os="linux" -C "mDNSPosix"
Among other things, this install starts a demon running. It also copies
libdns_sd.so, and libnss_mdns-0.2.so to /lib/, which should be in the path.
These lines are included in the install output:
--------------------------------------------------------------**
Starting Apple Darwin Multicast DNS / DNS Service Discovery daemon: mdnsd.
/usr/sbin/mdnsd installed
--------------------------------------------------------------**
For Yocto, I figured I would add the copy of libdns_sd.so to the /lib/ folder in
the destination to my recipe so I could link another module to it before I ran
the make install, which has to be done running on the target. But if I build
that other module in Yocto, I think I should add copying it to /lib/ under my
tmp/work/ dir, not D, the destination. My do_install line:
install -m 0755 ${S}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
is for copying it to /lib/ in D. How would I correctly write that line to copy
it to /lib/ under ~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/?
The Yocto low-level folder isn't very important; I just felt that I wanted a
Yocto folder under my home dir to hold my Yocto stuff. I created imx-yocto-bsp
following the i.MX_Yocto_Project_User's_Guide.pdf.
First, I had followed the i.MX_Yocto_Project_User's_Guide.pdf, "IMXLXYOCTOUG"
from the imx-yocto-L5.4.47_2.2.0 download, to get my basic system, which
worked. I got that from: www.nxp.com/imx8mnanoevk ->
https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-8m-nano-applications-processor:8MNANOD4-EVK
And downloaded and unpacked this .zip described in the next three lines:
L5.4.47_2.2.0_LINUX_DOCS (REV L5.4.47_2.2.0 ) UPDATED
i.MX L5.4.47_2.2.0 for Linux BSP Documentation. Includes Release Notes, User Guide.
ZIP 11.6 MB 03 Nov 2020 L5.4.47_2.2.0_LINUX_DOCS [ English ]
I'm doing this for the i.MX 8M nano eval board.
The build-wayland folder in my path above is my build folder.
I had done the following line to get that.
~/Yocto/imx-yocto-bsp$ DISTRO=fsl-imx-wayland MACHINE=imx8mnddr4evk source imx-setup-release.sh -b build-wayland
One result of that was to end up with the directory changed to the build-wayland
folder. It turned out it was the right thing to do to stay in that folder for
subsequent steps in the i.MX_Yocto_Project_User's_Guide.pdf, such as my
"bitbake imx-image-multimedia" command that I did; I don't believe the .pdf made
that clear.
So I previously got this working on a Linux host PC running Ubuntu 18.04.4
"Bionic Beaver" and flashed the resulting images onto my i.MX 8M nano board.
One line of many I see in my UART output is:
Welcome to NXP i.MX Release Distro 5.4-zeus (zeus)!
I followed the following very good tutorial and also added a helloworld layer as
it shows and had helloworld working on my target board after flashing the built
.wic image from the host:
https://medium.com/the-innovation/how-to-prepare-a-helloworld-c-recipe-with-yocto-project-1f74c296a777
It is a good tutorial, for one thing, because it clearly describes the directory
structure and can be followed. Be careful about a typo that the author
put in, however. He starts out spelling helloworld.c as hello-world.c in his
Steps 5 and 6 then switches to helloworld.c in his Step 7. You have to catch
that and fix the spelling in your work when you notice the switch.
I used the structure that he, George Calin, showed, to make my mdns layer.
In my build folder, build-wayland, I created meta-mdns-so alongside the
meta-helloworld-app folder that I had created following the tutorial. I used
similar steps as given in the tutorial, including
bitbake-layers create-layer meta-mdns-so
bitbake-layers add-layer meta-mdns-so
This got me through Step 4 in the tutorial in a similar manner.
This created the following tree in meta-mdns-so (one dash indented per level):
conf
-layer.conf
COPYING.MIT
README
recipes-example
-mdns
--files
---mDNSResponder-878.200.35.tar.gz
--mDNSResponder_878.200.35.bb
Note that items followed by items that are more indented are directories.
Putting mDNSResponder-878.200.35.tar.gz under files I found out from
https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles
However the information here is about seven years old and background info links
have rotted.
There's more information in the Yocto Mega Manual at
https://www.yoctoproject.org/docs/3.0/mega-manual/mega-manual.html .
See "7.3.21.3. Makefile-Based Package"
Here's the recipe in mDNSResponder_878.200.35.bb that I came up with for my
first try:
----------------------------------------------------------------------
DESCRIPTION = "The mDNS component"
PRIORITY = "optional"
SECTION = "protocols"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://mDNSResponder-878.200.35.tar.gz"
# S = "${WORKDIR}"
# -Shouldn't set S because BitBake expects the source to be in a dir called
# mDNSResponder-878.200.35 in the work dir.
# Don't need a do_compile step since by default BitBake starts the make command
# to compile the application.
# But need additional make options
EXTRA_OEMAKE = "'os="linux"' '-C "mDNSPosix"'"
do_install() {
install -d ${D}${base_libdir}
install -m 0755 ${WORKDIR}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
}
----------------------------------------------------------------------**
I did bitbake mdns in ~/Yocto/imx-yocto-bsp/build-wayland$ .
When coming back to this work in a fresh terminal window I always do
~/Yocto/imx-yocto-bsp$ source setup-environment build-wayland
It puts me in my build-wayland folder: ~/Yocto/imx-yocto-bsp/build-wayland$
The bitbake seemed to do the compile fine, and I got content under:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work# find -iname mdns
Found lots, including this folder:
./aarch64-poky-linux/mdns/878.200.35-r0/
As in the helloworld tutorial:
Step 10. Add package to conf/local.conf in variable IMAGE_INSTALL and set the
details for next image
I added:
IMAGE_INSTALL_append=" mdns" after the line, 'CONF_VERSION' = "1"'.
I did the bitbake from my build dir: bitbake imx-image-multimedia
Under my deploy folder, in ~/Yocto/imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mnddr4evk/, I got imx-image-multimedia-imx8mnddr4evk-20210211215119.rootfs.wic.bz2 With the up-to-date timestamp of 2021/02/11 (Thurs) 21:51:19 (0000 UTC).
Flashing it onto my i.MX 8M nano board, it
-didn't have libdns_sd.so in the /lib/ folder
-didn't have a /mDNSR-878.200.35 folder in root.
-find -iname mdns doesn't find mDNSR-878.200.35; finds a screenful of files.
-the /mDNSR-878.200.35/mDNSPosix/build/prod/ folder with its 8 build artifacts
wasn't there.
However, on the bitbake host, the 8 build artifacts were found:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/mDNSResponder-878.200.35/mDNSPosix/build/prod# ls -l
total 9452
-rwxr-xr-x 1 159200 Feb 11 16:07 libdns_sd.so
-rwxr-xr-x 1 239856 Feb 11 16:07 libnss_mdns-0.2.so
-rwxr-xr-x 1 1504904 Feb 11 16:07 mDNSClientPosix
-rwxr-xr-x 1 1750944 Feb 11 16:07 mdnsd
-rwxr-xr-x 1 1481136 Feb 11 16:07 mDNSIdentify
-rwxr-xr-x 1 1525392 Feb 11 16:07 mDNSNetMonitor
-rwxr-xr-x 1 1493112 Feb 11 16:07 mDNSProxyResponderPosix
-rwxr-xr-x 1 1511048 Feb 11 16:07 mDNSResponderPosix
I concluded that the compile part was fine but my do_install command was wrong.
Can someone correct my recipe for me?
For my second try I changed only the do_install() in the recipe to this:
--------------------------------------------------------------------------------
do_install() {
install -t ${S} ${D}
install -d ${D}${base_libdir}
install -m 0755 ${S}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
}
--------------------------------------------------------------------------------
That's two changes, first copying from S to D to try to get the
mDNSResponder-878.200.35/ dir copied over to the destination, and then trying
the "install - m" command from S rather than WORKDIR.
Retrying the bitbake: bitbake imx-image-multimedia, it indicated at the end that all 6968 tasks didn't need to be rerun.
I tried: ~/Yocto/imx-yocto-bsp/build-wayland$ bitbake -c clean mdns -- and got:
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and
all succeeded.
~/Yocto/imx-yocto-bsp/build-wayland$ bitbake imx-image-multimedia -- got:
NOTE: Tasks Summary: Attempted 6968 tasks of which 6967 didn't need to be rerun
and all succeeded.
It typically flashes and erases a bunch of activity, which it did this time. It
might be nice to have that remaining displayed to be able to study it.
It didn't update anything in:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mnddr4evk#
No longer had mDNSResponder-878.200.35/ in
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/ .
I tried: bitbake -c cleansstate mdns -- got:
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and
all succeeded.
Did: ~/Yocto/imx-yocto-bsp/build-wayland$ bitbake imx-image-multimedia
-Got the typical bitbake output, then:
Sstate summary: Wanted 6 Found 0 Missed 6 Current 2580 (0% match, 99% complete)
NOTE: Tasks Summary: Attempted 6968 tasks of which 6954 didn't need to be rerun
and all succeeded.
This time I saw do_compile of mdns and 878.200.25 etc.
Again had mDNSResponder-878.200.35 in
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/.
Have the build artifacts in mDNSPosix in the host at:
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/mdns/878.200.35-r0/mDNSResponder-878.200.35/mDNSPosix/build/prod/
Still don't have an updated image since Thurs Feb 11 in
~/Yocto/imx-yocto-bsp/build-wayland/tmp/deploy/images/imx8mnddr4evk/ .
Can someone correct my recipe and any other mistakes I may have made? Is it my do_install()?
In my do_install(), I have:
install -m 0755 ${S}/mDNSResponder-878.200.35/mDNSPosix/build/prod/libdns_sd.so ${D}${base_libdir}
which is for copying it to /lib/ in D. How would I correctly write that line to
copy it to /lib/ under
~/Yocto/imx-yocto-bsp/build-wayland/tmp/work/aarch64-poky-linux/ for use to link
to the next module I have to build on the host?
In the meantime, I'll try deleting my
imx-image-multimedia-imx8mnddr4evk-20210211215119.rootfs.wic.bz2 and redoing the
bitbake.
...Deleting
imx-image-multimedia-imx8mnddr4evk-20210211215119.rootfs .tar.bz2 and .wic.bz2
didn't help; they didn't get recreated even after I redid the above cleans and bitbake.
Best regards,
Later: Followup question: Where can I obtain the mdns.service file needed for building mDNS in Yocto?
...ANSWER
Answered 2021-Feb-19 at 17:59There is already a recipe for mDNS version 878.200.35: https://git.openembedded.org/meta-openembedded/tree/meta-networking/recipes-protocols/mdns/mdns_878.200.35.bb?h=zeus
QUESTION
I got a bit stuck debugging a yocto build problem. I encountered this while updating from yocto warrior (2.7) to yocto dunfell (3.1) The build fails during the building of the rootfs, all steps before seem to work:
...ANSWER
Answered 2021-Feb-17 at 07:55I found it out myself (interesting how asking questions helps you thinking...):
The issue was in the systemd
recipe itself and related to the systemd-compat-units
recipe. I was able to fix it with this in my layer's recipes-core/systemd/systemd_%.bbappend
:
QUESTION
I'm running an open source program that uses EGL to render a scene, ideally headless. It tries to initialize the display by running:
...ANSWER
Answered 2021-Feb-08 at 22:16In order to select an appropriate device that is not the default display you'll have to enumerate the available devices first. This is available through an extension.
Some example code for this can be found at
https://developer.nvidia.com/blog/egl-eye-opengl-visualization-without-x-server/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wayland
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page