summaryrefslogtreecommitdiffstats
path: root/meta-uhmi/meta-rvgpu/README.md
blob: 3d524fefa23ea1aa7497891e7692cdbe4b6b11c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
## How to run RVGPU remotely
Prepare two images, one as the Sender and the other as the Receiver.
It is necessary for the Sender and Receiver to be within the same network.

**Receiver side**  
```
$ export XDG_RUNTIME_DIR=/run/user/<your_UID>
$ rvgpu-renderer -b <your_Area>@0,0 -p <Port_Number> &
```

Replace the placeholders with the appropriate values:
- `<your_UID>`: Specify according to your environment, for example: 200
- `<your_Area>`: Enter an usable area for example: 1920x1080  
- `<Port_Number>`: Enter an available port number, for example: 55555

**Sender side**  
Create the following shell script **run_remote_app.sh** in any `<WORKDIR>` for a smooth experience.
```
#!/bin/bash

export XDG_RUNTIME_DIR=/tmp
export LD_LIBRARY_PATH=/usr/lib/mesa-virtio

# -------------
# launch app
# -------------
$@
```

Save the file and run the following to start weston.

```
$ rvgpu-proxy -s <your_Area>@0,0 -n <IP_address_of_Receiver>:<Port_Number> &
$ EGLWINSYS_DRM_DEV_NAME=<RVGPU_DRM_DEVICE_PATH> <WORKDIR>/run_remote_app.sh rvgpu-wlproxy -s <your_Area> -S <your_WAYLAND_DISPLAY> &
```  
Replace the placeholders with the appropriate values:
- `<Port_Number>`: Port set in the renderer.
- `<your_WAYLAND_DISPLAY>`: Specify your WAYLAND_DISPLAY socket name, for example: wayland-uhmi-0
- `<RVGPU_DRM_DEVICE_PATH>`: Specify rvgpu drm device path generated by rvgpu-proxy, for example: /dev/dri/rvgpu_virtio0

After completing these steps, the Weston screen from the Sender will be transferred and displayed on the Receiver using rvgpu-proxy and rvgpu-renderer. You can verify that everything is functioning properly by launching wayland applications on the Sender side, such as:
```
$ WAYLAND_DISPLAY=<your_WAYLAND_DISPLAY> <WORKDIR>/run_remote_app.sh weston-simple-egl -f
``` 

You can also verify the touch or keyboard operation support of the RVGPU by using app such as 
```
$ WAYLAND_DISPLAY=<your_WAYLAND_DISPLAY> <WORKDIR>/run_remote_app.sh weston-smoke
$ WAYLAND_DISPLAY=<your_WAYLAND_DISPLAY> <WORKDIR>/run_remote_app.sh weston-editor
```

**Appendix**  
- By building the RVGPU on Ubuntu, it is possible to enable bidirectional remote rendering between the agl-demo-platform and Ubuntu.  
For the build procedure on Ubuntu, see the following URL: https://github.com/unified-hmi/remote-virtio-gpu