diff --git a/doc/build.rst b/doc/build.rst index 799beea9..d6b8717d 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -132,6 +132,15 @@ Fetching with APT You can fetch these dependencies with the following command: +.. warning:: + + Do not just blindly install the list below, check if you are using PipeWire + or PulseAudio and adjust the list accordingly. Installing PipeWire libraries + on a PulseAudio system will result in a broken partial PipeWire install. + + If you are not already using PipeWire we highly recommend you upgrade, + Looking Glass does not support audio input (microphone) with PulseAudio. + .. code:: bash apt-get install binutils-dev cmake fonts-dejavu-core libfontconfig-dev \ diff --git a/doc/conf.py b/doc/conf.py index 879dcd9a..90371259 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -22,7 +22,7 @@ from lgrelease import release # -- Project information ----------------------------------------------------- project = 'Looking Glass' -copyright = '2022, Looking Glass team' +copyright = '2024, Looking Glass team' author = 'Geoffrey McRae and the Looking Glass team' rst_prolog = """ diff --git a/doc/index.rst b/doc/index.rst index 1726cbff..918d2341 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -11,9 +11,9 @@ systems for legacy programs that require high-performance graphics. :maxdepth: 2 requirements + build install usage - build troubleshooting obs module diff --git a/doc/install.rst b/doc/install.rst index ca85f5b3..750f3d1f 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -3,406 +3,8 @@ Installation ############ -.. _libvirt: - -libvirt/QEMU configuration --------------------------- - -This article assumes you already have a fully functional libvirt domain with -PCI passthrough working. - -If you use virt-manager, this guide also applies to you, since virt-manager uses -libvirt as its back-end. - -.. _libvirt_ivshmem: - -IVSHMEM -^^^^^^^ - -Configuration -~~~~~~~~~~~~~ - -.. note:: - If your host GPU is either AMD or Intel it is better to set this up using the - KVMFR kernel module as this will allow you to make use of DMA transfers to - offload some of the memory transfers to the GPU. - See `VM->host` in :ref:`kernel_module`. - -Add the following to your libvirt machine configuration inside the -'devices' section by running ``virsh edit `` where ```` is the name of -your virtual machine. - -.. code:: xml - - - - 32 - - -.. note:: - If you are using QEMU directly without libvirt the following arguments are - required instead. - - Add the following to the commands to your QEMU command line, adjusting - the ``bus`` parameter to suit your particular configuration: - - .. code:: bash - - -device ivshmem-plain,memdev=ivshmem,bus=pcie.0 \ - -object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M - -The memory size (show as 32 in the example above) may need to be -adjusted as per the :ref:`Determining memory ` -section. - -.. warning:: - If you change the size of this after starting your virtual machine you may - need to remove the file `/dev/shm/looking-glass` to allow QEMU to re-create - it with the correct size. If you do this the permissions of the file may be - incorrect for your user to be able to access it and you will need to correct - this. See :ref:`libvirt_shmfile_permissions` - -.. _libvirt_determining_memory: - -Determining memory -~~~~~~~~~~~~~~~~~~ - -You will need to adjust the memory size to be suitable for your desired maximum -resolution, with the following formula: - -.. code:: text +.. toctree:: - width x height x pixel size x 2 = frame bytes - - frame bytes / 1024 / 1024 = frame megabytes - - frame megabytes + 10 MiB = total megabytes - -Where `pixel size` is 4 for 32-bit RGB (SDR) or 8 for 64-bit -(HDR :ref:`* `). - -Failure to do so will cause Looking Glass to truncate the bottom of the screen -and will trigger a message popup to inform you of the size you need to increase -the value to. - -For example, for a resolution of 1920x1080 (1080p): - -.. code:: text - - 1920 x 1080 x 4 x 2 = 16,588,800 bytes - - 16,588,800 / 1024 / 1024 = 15.82 MiB - - 15.82 MiB + 10 MiB = 25.82 MiB - -You must round this value up to the nearest power of two, which for the -provided example is 32 MiB. - -.. note:: - Increasing this value beyond what you need does not yield any performance - improvements, it simply will block access to that RAM making it unusable by - your system. - -.. list-table:: Common Values - :widths: 50 25 25 - :header-rows: 1 - - * - Resolution - - Standard Dynamic Range - - High Dynamic Range (HDR) :ref:`* ` - * - 1920x1080 (1080p) - - 32 - - 64 - * - 1920x1200 (1200p) - - 32 - - 64 - * - 2560x1440 (1440p) - - 64 - - 128 - * - 3840x2160 (2160p/4K) - - 128 - - 256 - -.. _libvirt_determining_memory_hdr: - -.. warning:: - While Looking Glass can capture and display HDR, at the time of writing - neither Xorg or Wayland can make use of it and it will be converted by the - GPU drivers/hardware to SDR. Additionally using HDR doubles the amount of - memory, bandwidth, and CPU load and should generally not be used unless you - have a special reason to do so. - -.. _libvirt_shmfile_permissions: - -Permissions -~~~~~~~~~~~ - -The shared memory file used by IVSHMEM is found in ``/dev/shm/looking-glass``. -By default, it is owned by QEMU, and does not give read/write permissions to -your user, which are required for Looking Glass to run properly. - -You can use ``systemd-tmpfiles`` to create the file before running your VM, -granting the necessary permissions which allow Looking Glass to use the file -properly. - -Create a new file ``/etc/tmpfiles.d/10-looking-glass.conf``, and populate it -with the following:: - - # Type Path Mode UID GID Age Argument - - f /dev/shm/looking-glass 0660 user kvm - - -Change ``UID`` to the user name you will run Looking Glass with, usually your -own. - -.. _libvirt_spice_server: - -Keyboard/mouse/display/audio -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Looking Glass makes use of the SPICE protocol to provide keyboard and mouse -input, audio input and output, and display fallback. - -.. note:: - The default configuration that libvirt uses is not optimal and must be - adjusted. Failure to perform these changes will cause input issues along - with failure to support 5 button mice. - -If you would like to use SPICE to give you keyboard and mouse input -along with clipboard sync support, make sure you have a -```` device, then: - -- Find your ``