{"id":27765723,"url":"https://github.com/kitlith/monado","last_synced_at":"2025-04-29T16:59:20.366Z","repository":{"id":288144026,"uuid":"966476746","full_name":"kitlith/monado","owner":"kitlith","description":"working copy","archived":false,"fork":false,"pushed_at":"2025-04-15T18:49:11.000Z","size":16393,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"fifo_latest_ready","last_synced_at":"2025-04-29T16:59:15.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kitlith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T01:36:17.000Z","updated_at":"2025-04-15T18:49:16.000Z","dependencies_parsed_at":"2025-04-15T19:55:30.600Z","dependency_job_id":null,"html_url":"https://github.com/kitlith/monado","commit_stats":null,"previous_names":["kitlith/monado"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlith%2Fmonado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlith%2Fmonado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlith%2Fmonado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitlith%2Fmonado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitlith","download_url":"https://codeload.github.com/kitlith/monado/tar.gz/refs/heads/fifo_latest_ready","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251546708,"owners_count":21606890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-29T16:59:19.727Z","updated_at":"2025-04-29T16:59:20.360Z","avatar_url":"https://github.com/kitlith.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monado - XR Runtime (XRT)\n\n\u003c!--\nCopyright 2018-2021, Collabora, Ltd.\n\nSPDX-License-Identifier: CC-BY-4.0\n\nThis must stay in sync with the last section!\n--\u003e\n\n\u003e * Main homepage and documentation: \u003chttps://monado.freedesktop.org/\u003e\n\u003e * Promotional homepage: \u003chttps://monado.dev\u003e\n\u003e * Maintained at \u003chttps://gitlab.freedesktop.org/monado/monado\u003e\n\u003e * Latest API documentation: \u003chttps://monado.pages.freedesktop.org/monado\u003e\n\u003e * Continuously-updated changelog of the default branch:\n\u003e   \u003chttps://monado.pages.freedesktop.org/monado/_c_h_a_n_g_e_l_o_g.html\u003e\n\nMonado is an open source XR runtime delivering immersive experiences such as VR\nand AR on mobile, PC/desktop, and any other device\n(because gosh darn people\ncome up with a lot of weird hardware).\nMonado aims to be a complete and conforming implementation\nof the OpenXR API made by Khronos.\nThe project is primarily developed on GNU/Linux, but also runs on Android and Windows.\n\"Monado\" has no specific meaning and is just a name.\n\n## Monado source tree\n\n* `src/xrt/include` - headers that define the internal interfaces of Monado.\n* `src/xrt/compositor` - code for doing distortion and driving the display hardware of a device.\n* `src/xrt/auxiliary` - utilities and other larger components.\n* `src/xrt/drivers` - hardware drivers.\n* `src/xrt/state_trackers/oxr` - OpenXR API implementation.\n* `src/xrt/targets` - glue code and build logic to produce final binaries.\n* `src/external` - a small collection of external code and headers.\n\n## Getting Started\n\nDependencies include:\n\n* [CMake][] 3.13 or newer (Note Ubuntu 18.04 only has 3.10)\n* Python 3.6 or newer\n* Vulkan headers and loader - Fedora package `vulkan-loader-devel`\n* OpenGL headers\n* Eigen3 - Debian/Ubuntu package `libeigen3-dev`\n* glslangValidator - Debian/Ubuntu package `glslang-tools`, Fedora package `glslang`.\n* libusb\n* libudev - Debian/Ubuntu package `libudev-dev`, Fedora package `systemd-devel`\n* Video 4 Linux - Debian/Ubuntu package `libv4l-dev`.\n\nOptional (but recommended) dependencies:\n\n* libxcb and xcb-xrandr development packages\n* [OpenHMD][] 0.3.0 or newer (found using pkg-config)\n\nTruly optional dependencies, useful for some drivers, app support, etc.:\n\n* Doxygen - Debian/Ubuntu package `doxygen` and `graphviz`\n* Wayland development packages\n* Xlib development packages\n* libhidapi - Debian/Ubuntu package `libhidapi-dev`\n* OpenCV\n* libuvc - Debian/Ubuntu package `libuvc-dev`\n* libjpeg\n* libbluetooth - Debian/Ubuntu package `libbluetooth-dev`\n* libsdl - Debian/Ubuntu package `libsdl2-dev`\n\nExperimental Windows support requires the Vulkan SDK and also needs or works\nbest with the following vcpkg packages installed:\n\n* pthreads eigen3 libusb hidapi zlib doxygen\n\nIf you have a recent [vcpkg](https://vcpkg.io) installed and use the appropriate\nCMake toolchain file, the vcpkg manifest in the Monado repository will instruct\nvcpkg to locally install the dependencies automatically. The Vulkan SDK\ninstaller should set the `VULKAN_SDK` Windows environment variable to point\nat the installation location (for example, `C:/VulkanSDK/1.3.250.1`), though\nmake sure you open a new terminal (or open the CMake GUI) *after* doing that\ninstall to make sure it is available.\n\nMonado has been tested on these distributions, but is expected to work on almost\nany modern distribution.\n\n* Ubuntu 24.04, 22.04, 20.04, (18.04 may not be fully supported)\n* Debian 11 `bookworm`, 10 `buster`\n  * Up-to-date package lists can be found in our CI config file,\n    `.gitlab-ci.yml`\n* Archlinux\n\nThese distributions include recent-enough versions of all the\nsoftware to use direct mode,\nwithout using any external, third-party, or backported\npackage sources.\n\nSee also [Status of DRM Leases][drm-lease]\nfor more details on specific packages, versions, and commits.\n\nDue to the lack of a OpenGL extension: GL_EXT_memory_object_fd on Intel's\nOpenGL driver, only the AMD\nradeonsi driver and the proprietary NVIDIA driver will work for OpenGL OpenXR\nclients. This is due to a requirement of the Compositor. Support status of the\nextension can be found on the [mesamatrix website][mesamatrix-ext].\n\n### CMake\n\nBuild process is similar to other CMake builds,\nso something like the following will build it.\n\nGo into the source directory, create a build directory,\nand change into it.\n\n```bash\nmkdir build\ncd build\n```\n\nThen, invoke [CMake to generate a project][cmake-generate].\nFeel free to change the build type or generator (\"Ninja\" is fast and parallel) as you see fit.\n\n```bash\ncmake .. -DCMAKE_BUILD_TYPE=Debug -G \"Unix Makefiles\"\n```\n\nIf you plan to install the runtime,\nappend something like `-DCMAKE_INSTALL_PREFIX=~/.local`\nto specify the root of the install directory.\n(The default install prefix is `/usr/local`.)\n\nTo build, [the generic CMake build commands][cmake-build] below will work on all systems,\nthough you can manually invoke your build tool (`make`, `ninja`, etc.) if you prefer.\nThe first command builds the runtime and docs,\nand the second, which is optional, installs the runtime under `${CMAKE_INSTALL_PREFIX}`.\n\n```bash\ncmake --build .\ncmake --build . --target install\n```\n\nAlternately, if using Make, the following will build the runtime and docs, then install.\nReplace `make` with `ninja` if you used the Ninja generator.\n\n```bash\nmake\nmake install\n```\n\nDocumentation can be browsed by opening `doc/html/index.html` in the build directory in a web browser.\n\n## Getting started using OpenXR with Monado\n\nThis implements the [OpenXR][] API,\nso to do anything with it, you'll need an application\nthat uses OpenXR, along with the OpenXR loader.\nThe OpenXR loader is a glue library that connects OpenXR applications to OpenXR runtimes such as Monado\nIt determines which runtime to use by looking for the config file `active_runtime.json` (either a symlink to\nor a copy of a runtime manifest) in the usual XDG config paths\nand processes environment variables such as `XR_RUNTIME_JSON=/usr/share/openxr/0/openxr_monado.json`.\nIt can also insert OpenXR API Layers without the application or the runtime having to do it.\n\nYou can use the `hello_xr` sample provided with the OpenXR SDK.\n\nThe OpenXR loader can be pointed to a runtime json file in a nonstandard location with the environment variable `XR_RUNTIME_JSON`. Example:\n\n```bash\nXR_RUNTIME_JSON=~/monado/build/openxr_monado-dev.json ./openxr-example\n```\n\nFor ease of development Monado creates a runtime manifest file in its build directory using an absolute path to the\nMonado runtime in the build directory called `openxr_monado-dev.json`. Pointing `XR_RUNTIME_JSON` to this\nfile allows using Monado after building, without installing.\n\nNote that the loader can always find and load the runtime\nif the path to the runtime library given in the json manifest is an absolute path,\nbut if a relative path like `libopenxr_monado.so.0` is given,\nthen `LD_LIBRARY_PATH` must include the directory that contains `libopenxr_monado.so.0`.\nThe absolute path in `openxr_monado-dev.json` takes care of this for you.\n\nDistribution packages for monado may provide the  \"active runtime\" file `/etc/xdg/openxr/1/active_runtime.json`.\nIn this case the loader will automatically use Monado when starting an OpenXR application. This global configuration\ncan be overridden on a per user basis by creating `~/.config/openxr/1/active_runtime.json`.\n\n## Direct mode\n\nOn AMD and Intel GPUs our direct mode code requires a connected HMD to have\nthe `non-desktop` xrandr property set to 1.\nOnly the most common HMDs have the needed quirks added to the linux kernel.\n\nIf you know that your HMD lacks the quirk you can run this command **before** or\nafter connecting the HMD and it will have it. Where `HDMI-A-0` is the xrandr\noutput name where you plug the HMD in.\n\n```bash\nxrandr --output HDMI-A-0 --prop --set non-desktop 1\n```\n\nYou can verify that it stuck with the command.\n\n```bash\nxrandr --prop\n```\n\n## Running Vulkan Validation\n\nTo run Monado with Vulkan validation the loader's layer functionality can be used.\n```\nVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ./build/src/xrt/targets/service/monado-service\n```\nThe same can be done when launching a Vulkan client.\n\nIf you want a backtrace to be produced at validation errors, create a `vk_layer_settings.txt`\nfile with the following content:\n```\nkhronos_validation.debug_action = VK_DBG_LAYER_ACTION_LOG_MSG,VK_DBG_LAYER_ACTION_BREAK\nkhronos_validation.report_flags = error,warn\nkhronos_validation.log_filename = stdout\n```\n\n## Coding style and formatting\n\n[clang-format][] is used,\nand a `.clang-format` config file is present in the repo\nto allow your editor to use them.\n\nTo manually apply clang-format to every non-external source file in the tree,\nrun this command in the source dir with a `sh`-compatible shell\n(Git for Windows git-bash should be OK):\n\n```bash\nscripts/format-project.sh\n```\n\nYou can optionally put something like `CLANG_FORMAT=clang-format-7` before that command\nif your clang-format binary isn't named `clang-format`.\n**Note that you'll typically prefer** to use something like `git clang-format`\nto re-format only your changes, in case version differences in tools result in overall format changes.\nThe CI \"style\" job currently runs on Debian Bullseye, so it has clang-format-11.\n\n[OpenHMD]: http://openhmd.net\n[drm-lease]: https://haagch.frickel.club/#!drmlease%2Emd\n[OpenXR]: https://khronos.org/openxr\n[clang-format]: https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormat.html\n[cmake-build]: https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#build-tool-mode\n[cmake-generate]: https://cmake.org/cmake/help/v3.12/manual/cmake.1.html\n[CMake]: https://cmake.org\n[mesamatrix-ext]: https://mesamatrix.net/#Version_ExtensionsthatarenotpartofanyOpenGLorOpenGLESversion\n\n## Contributing, Code of Conduct\n\nSee `CONTRIBUTING.md` for details of contribution guidelines. GitLab Issues and\nMerge Requests are the preferred way to discuss problems, suggest enhancements,\nor submit changes for review. **In case of a security issue**, you should choose\nthe \"confidential\" option when using the GitLab issues page. For highest\nsecurity, you can send encrypted email (using GPG/OpenPGP) to Rylie Pavlik at\n\u003crylie.pavlik@collabora.com\u003e and using the associated key from\n\u003chttps://keys.openpgp.org/vks/v1/by-fingerprint/45207B2B1E53E1F2755FF63CC5A2D593A61DBC9D\u003e.\n\nPlease note that this project is released with a Contributor Code of Conduct.\nBy participating in this project you agree to abide by its terms.\n\nWe follow the standard freedesktop.org code of conduct,\navailable at \u003chttps://www.freedesktop.org/wiki/CodeOfConduct/\u003e,\nwhich is based on the [Contributor Covenant](https://www.contributor-covenant.org).\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting:\n\n* First-line project contacts:\n  * Rylie Pavlik \u003crylie.pavlik@collabora.com\u003e\n  * Frederic Plourde \u003cfrederic.plourde@collabora.com\u003e\n  * Jakob Bornecrantz \u003ctbornecrantz@nvidia.com\u003e\n* freedesktop.org contacts: see most recent list at \u003chttps://www.freedesktop.org/wiki/CodeOfConduct/\u003e\n\nCode of Conduct section excerpt adapted from the\n[Contributor Covenant](https://www.contributor-covenant.org), version 1.4.1,\navailable at\n\u003chttps://www.contributor-covenant.org/version/1/4/code-of-conduct.html\u003e, and\nfrom the freedesktop.org-specific version of that code, available at\n\u003chttps://www.freedesktop.org/wiki/CodeOfConduct/\u003e, used under CC-BY-4.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitlith%2Fmonado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitlith%2Fmonado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitlith%2Fmonado/lists"}