Torizon and Avalonia usb Keyboard and mouse

the keyboard and mouse combo works for non avalonia apps but when I use the avalonia template, i don’t get any use of the USB keyboard or mouse. searching for this with avalonia and linux systems takes me down a rabbit hole. where I see a lot of Avalonia on linux won’t use physical keyboards. Am I going down the wrong rabbit hole? if not how do I tie into the linux subsystems needed to do his on avalonia?

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello!

To ensure USB keyboard and mouse support for Avalonia applications on Torizon OS, it’s important to integrate these devices properly with the Wayland compositor, Weston. Here are some steps to guide you:

  1. Hardware Setup: Ensure your USB keyboard and mouse are correctly connected to the appropriate USB ports on your Toradex hardware.

  2. Weston Configuration: Verify that your Weston configuration is set up to handle input devices. This is typically managed through the weston.ini configuration file. You can find more details on configuring Weston in the Toradex Community.

  3. Torizon Container Configuration: Make sure you are using the correct Torizon container configuration. Avalonia applications on Torizon typically use specific dotnet-uno containers that include all necessary dependencies. More information can be found on the Torizon Ecosystem blog.

If you encounter any issues, consider checking:

  • Your Torizon OS version to ensure all necessary dependencies are installed.
  • The Weston compositor configuration to confirm it is correctly set up for input devices.

I hope this helps you get your USB devices working with Avalonia on Torizon OS.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

https://www.torizon.io/blog/windows-ce-alternative-torizon-ecosystem.

Hey @Lon,

Can you let me know what Torizon OS you are on? It may be that some needs updating for Torizon 7, but works on Torizon 6. So this may be worth trying.

-Eric

I thought about that so I down graded and have the following on my board at the moment. been trying a few different things.

I decided to give the Avalonia gtk MVVM template a try also. but that won’t even debug for me so I am bouncing between trying things at the moment. I would like to think my knowledge for docker and containers is growing but maybe not. lol

Well I have switched over to a weston container from the chromium-verdin one.

Now when I try the avalonia project where I have added a text box and button for input. I do see an error:

Starting: "ssh" -T -q -p 2224 -o StrictHostKeyChecking=no -o "UserKnownHostsFile /dev/null" torizon@10.10.10.87 "/vsdbg/vsdbg --interpreter=vscode"
------------------------------------------------------------------------------
You may only use the Microsoft Visual Studio .NET/C/C++ Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you
develop and test your applications.
------------------------------------------------------------------------------
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/avaFB.dll'. Symbols loaded.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Controls.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Base.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.ObjectModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.LinuxFramebuffer.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Desktop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Skia.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.ReactiveUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Dialogs.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.ComponentModel.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Collections.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.X11.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Runtime.InteropServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Private.Uri.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/SkiaSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Runtime.InteropServices.RuntimeInformation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Threading.Thread.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Splat.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/ReactiveUI.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/System.Reactive.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.ComponentModel.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.OpenGL.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Metal.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.ComponentModel.TypeConverter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
LogHost: Initializing to normal mode (.cctor)
avaFB (45): Loaded '/home/torizon/app/Avalonia.Markup.Xaml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Themes.Fluent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Runtime.CompilerServices.Unsafe.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/Avalonia.Markup.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Console.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Numerics.Vectors.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Collections.Concurrent.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Memory.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/home/torizon/app/HarfBuzzSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/Microsoft.Win32.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Hello Torizon!
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Runtime.Intrinsics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
avaFB (45): Loaded '/dotnet/shared/Microsoft.NETCore.App/8.0.12/System.Diagnostics.TraceSource.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
57
[LinuxFramebuffer/Input/LibInput/Pointer] The pointer event LIBINPUT_EVENT_POINTER_MOTION is not mapped. (LibInputBackend #28068188)

So maybe it is trying to use the keyboard and or mouse.

when I try the avalonia gtk mvvm template. I get the following when I try to start the debugging process:

 *  Executing task: xonsh .conf/validate-deps-running.xsh 


⚠️ VALIDATING ENVIRONMENT


✅ Environment is valid!

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: bash -c [[ ! -z "10.10.10.87" ]] && true || false 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: bash -c [[ "aarch64" == "aarch64" ]] && true || false 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sleep 1 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sshpass -p torizon scp -P 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /home/powis/mvvmgtk/docker-compose.yml torizon@10.10.10.87:~/ 

Warning: Permanently added '10.10.10.87' (ED25519) to the list of known hosts.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST=10.10.10.87:2375 docker image prune -f --filter=dangling=true 

Total reclaimed space: 0B
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: docker compose -p torizon stop mvvmgtk mvvmgtk-debug && docker compose -p torizon rm -f mvvmgtk mvvmgtk-debug 

No stopped containers
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: dotnet publish /home/powis/mvvmgtk/mvvmgtk.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary -c Debug -r linux-arm64 --no-self-contained 

  Determining projects to restore...
  All projects are up-to-date for restore.
  mvvmgtk -> /home/powis/mvvmgtk/bin/Debug/net8.0/linux-arm64/mvvmgtk.dll
  mvvmgtk -> /home/powis/mvvmgtk/bin/Debug/net8.0/linux-arm64/publish/
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: xonsh /home/powis/mvvmgtk/.conf/torizon-packages.xsh arm64 

Applying torizonPackages.json: 
Applying to Dockerfile.debug ...
✅ Dockerfile.debug
Applying to Dockerfile ...
✅ Dockerfile
torizonPackages.json applied
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm64 --build-arg DEBUG_SSH_PORT=2223 --build-arg GPU=-imx8 mvvmgtk-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
Compose can now delegate builds to bake for better performance.
 To do so, set COMPOSE_BAKE=true.
[+] Building 10.6s (14/14) FINISHED                                                                                                                                                        docker:default
 => [mvvmgtk-debug internal] load build definition from Dockerfile.debug                                                                                                                             0.0s
 => => transferring dockerfile: 3.19kB                                                                                                                                                               0.0s
 => [mvvmgtk-debug internal] load metadata for docker.io/torizon/dotnet8-gtk3-imx8:4                                                                                                                10.5s
 => [mvvmgtk-debug internal] load metadata for docker.io/torizon/dotnet8-debug:4                                                                                                                    10.5s
 => [mvvmgtk-debug internal] load .dockerignore                                                                                                                                                      0.0s
 => => transferring context: 56B                                                                                                                                                                     0.0s
 => [mvvmgtk-debug debugger 1/1] FROM docker.io/torizon/dotnet8-debug:4@sha256:54e08a8e26d08552d1e3697df45dbbb52b00cd58f4cfceedddd4c71a70a2404f                                                      0.0s
 => [mvvmgtk-debug debug 1/7] FROM docker.io/torizon/dotnet8-gtk3-imx8:4@sha256:8c8b94f738d1f188f2d5f6e916e55b09d7f451724bd3274e27e63c44a0f0db99                                                     0.0s
 => CACHED [mvvmgtk-debug debug 2/7] COPY --from=debugger /vsdbg /vsdbg                                                                                                                              0.0s
 => CACHED [mvvmgtk-debug debug 3/7] RUN apt-get -q -y update &&         if [ "-imx8" = "-vivante" ] || [ "-imx8" = "-imx8" ]; then             apt-get -q -y install             imx-gpu-viv-wayla  0.0s
 => CACHED [mvvmgtk-debug debug 4/7] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     file     libice6     libsm6     libx11-dev     && apt-get c  0.0s
 => CACHED [mvvmgtk-debug debug 5/7] RUN apt-get -q -y update &&     apt-get -q -y install     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*                         0.0s
 => CACHED [mvvmgtk-debug debug 6/7] RUN mkdir /var/run/sshd &&     sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'         -i /etc/pam.d/sshd &&     if test toriz  0.0s
 => CACHED [mvvmgtk-debug debug 7/7] RUN rm -r /etc/ssh/ssh*key &&     dpkg-reconfigure openssh-server                                                                                               0.0s
 => [mvvmgtk-debug] exporting to image                                                                                                                                                               0.0s
 => => exporting layers                                                                                                                                                                              0.0s
 => => writing image sha256:cc2b0e1c82c89e356bfb58a31420ac59a4dd9e74969d5959943963919725590d                                                                                                         0.0s
 => => naming to localhost:5002/mvvmgtk:arm64                                                                                                                                                        0.0s
 => [mvvmgtk-debug] resolving provenance for metadata file                                                                                                                                           0.0s
[+] Building 1/1
 ✔ mvvmgtk-debug  Built                                                                                                                                                                              0.0s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose push mvvmgtk-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
[+] Pushing 22/22
 ✔ Pushing localhost:5002/mvvmgtk:arm64: e87e553ee2d4 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: ad7b9690d453 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: da836beed9be Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 53ba403e44b6 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: cb59a76b1c50 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 9c4077ac4b83 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: a51323167a62 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: e7c5d89be8a7 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 68fba0c21121 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 5f70bf18a086 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 32374a94c716 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: aa54abdaec64 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: f0a4063943ab Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 37b1b452b38d Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 5df946b507bb Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: f0232ed2ad0f Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: d54a5a712d7f Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 697f14245de2 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 108d07ec0212 Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 58f840fd131c Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 3e0bc6f3e89c Layer already exists                                                                                                                           0.0s 
 ✔ Pushing localhost:5002/mvvmgtk:arm64: 6f51610e9818 Layer already exists                                                                                                                           0.0s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST=10.10.10.87:2375 LOCAL_REGISTRY=10.10.10.61 TAG=arm64 GPU=-imx8 DEBUG_SSH_PORT=2223 DEBUG_PORT1= DEBUG_PORT2= DEBUG_PORT3= docker compose pull mvvmgtk-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
[+] Pulling 23/23
 ✔ mvvmgtk-debug Pulled                                                                                                                                                                              3.9s 
   ✔ 9082f840f638 Already exists                                                                                                                                                                     0.0s 
   ✔ 451631c3c0b7 Already exists                                                                                                                                                                     0.0s 
   ✔ 2509ba3d049b Already exists                                                                                                                                                                     0.0s 
   ✔ c783232ef327 Already exists                                                                                                                                                                     0.0s 
   ✔ 5bf0d19456ab Already exists                                                                                                                                                                     0.0s 
   ✔ 9ff8a99074f1 Already exists                                                                                                                                                                     0.0s 
   ✔ c866ff8ae9e8 Already exists                                                                                                                                                                     0.0s 
   ✔ dc9b6d971196 Already exists                                                                                                                                                                     0.0s 
   ✔ b6d34b702cb5 Already exists                                                                                                                                                                     0.0s 
   ✔ ad338444b04b Already exists                                                                                                                                                                     0.0s 
   ✔ 5829890be04c Already exists                                                                                                                                                                     0.0s 
   ✔ 6051f0e8a9a4 Already exists                                                                                                                                                                     0.0s 
   ✔ 4f4fb700ef54 Already exists                                                                                                                                                                     0.0s 
   ✔ e5f7ecf57336 Already exists                                                                                                                                                                     0.0s 
   ✔ e1d455bb6538 Already exists                                                                                                                                                                     0.0s 
   ✔ 7bfb7a57cd93 Already exists                                                                                                                                                                     0.0s 
   ✔ 6313c7237650 Already exists                                                                                                                                                                     0.0s 
   ✔ d1b9cd9a1c1f Pull complete                                                                                                                                                                      1.6s 
   ✔ 7aa41e49167a Pull complete                                                                                                                                                                      2.9s 
   ✔ ff5b82349da0 Pull complete                                                                                                                                                                      3.2s 
   ✔ 766b1828ef2e Pull complete                                                                                                                                                                      3.4s 
   ✔ 89874785bd74 Pull complete                                                                                                                                                                      3.6s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST=10.10.10.87:2375 LOCAL_REGISTRY=10.10.10.61 TAG=arm64 GPU=-imx8 DEBUG_SSH_PORT=2223 DEBUG_PORT1= DEBUG_PORT2= DEBUG_PORT3= docker compose -p torizon up -d mvvmgtk-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
[+] Running 20/22
 ⠋ weston [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 196.2MB / 198MB   Pulling                                                                                                                                         25.1s 
   ✔ 7ce705000c39 Already exists                                                                                                                                                                     0.0s 
   ⠇ a62329c7e763 Extracting      [==================================================>]  6.013MB/6.013MB                                                                                            23.9s 
   ✔ fef9104c432a Download complete                                                                                                                                                                  5.4s 
   ✔ ce3509a45411 Download complete                                                                                                                                                                  5.4s 
   ✔ af86ba988785 Download complete                                                                                                                                                                  5.9s 
   ✔ 52476e3671d1 Download complete                                                                                                                                                                  5.9s 
   ✔ 8bd2e709ee38 Download complete                                                                                                                                                                  6.2s 
   ✔ c87a2ed1765e Download complete                                                                                                                                                                  6.2s 
   ✔ 26c7594e1e87 Download complete                                                                                                                                                                  9.5s 
   ✔ 8bd8cbcbeaef Download complete                                                                                                                                                                  6.9s 
   ✔ 08235cab289c Download complete                                                                                                                                                                  6.7s 
   ✔ 7f18e99b00ac Download complete                                                                                                                                                                 23.8s 
   ✔ 2c1ce468d9f3 Download complete                                                                                                                                                                  7.6s 
   ✔ f8589f7d2f9d Download complete                                                                                                                                                                 19.0s 
   ✔ a5af9b9e9dad Download complete                                                                                                                                                                 11.1s 
   ✔ 98de9b7aa986 Download complete                                                                                                                                                                 12.6s 
   ✔ dc1512c70125 Download complete                                                                                                                                                                 14.0s 
   ✔ 45f74cd2f937 Download complete                                                                                                                                                                 15.3s 
   ✔ 4843f6ec841e Download complete                                                                                                                                                                 16.6s 
   ✔ 901b76ec2d78 Download complete                                                                                                                                                                 17.8s 
   ✔ b9d920cbe7f6 Download complete                                                                                                                                                                 18.4s 
failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header

 *  The terminal process "/bin/bash '-c', 'DOCKER_HOST=10.10.10.87:2375 LOCAL_REGISTRY=10.10.10.61 TAG=arm64 GPU=-imx8 DEBUG_SSH_PORT=2223 DEBUG_PORT1= DEBUG_PORT2= DEBUG_PORT3= docker compose -p torizon up -d mvvmgtk-debug'" terminated with exit code: 1. 

well I managed to the Avalonia MVVM template to run I had to modify the Weston service in the docker-compose.yml to use a different setup 3 instead of 4.

   image: torizon/weston-vivante:3

with that particular template I do have keyboard and mouse usage. the framebuffer Avalonia template still won’t work with them.

So I have decided to keep evaluating the system for what we will need to do. We do need either RDP or VNC services running.

checking out how to do that. I added the following to the Weston service in the docker-composer.yml

type weston:
    image: torizon/weston-vivante:3
    # Required to get udev events from host udevd via netlink
    environment:
      - ACCEPT_FSL_EULA=1
      - ENABLE_RDP=1
    network_mode: host
    privileged: true
    volumes:
      - type: bind
        source: /tmp
        target: /tmp
      - type: bind
        source: /dev
        target: /dev
      - type: bind
        source: /run/udev
        target: /run/udev
      - type: bind
        source: /run/user
        target: /run/user
    cap_add:
      - CAP_SYS_TTY_CONFIG
    # Add device access rights through cgroup...
    device_cgroup_rules:
      # ... for tty
      - "c 4:* rmw"
      # ... for /dev/input devices
      - "c 13:* rmw"
      # ... for /dev/galcore
      - "c 199:* rmw"
      # ... for /dev/dri devices
      - "c 226:* rmw"
      # ... for /dev/dma_heap device
      - "c 253:* rmw"

while I can connect using RDP. it is just a blue screen with a a mouse pointer. the Avalonia app/window will never display.

any ideas?

Hey @Lon,

I have been informed that there is no native pointer implementation in in the Avalonia template, so your findings are somewhat expected. And MVVM There is, as you have experienced.

For remote desktop, have you attempted to view with our cloud services that are apart of the Torizon OS ecosystem?

-Eric

I have not tried that yet. while we will be evaluating that feature for our devices. not all of our customers will opt for that option, nor will their network structure allow the external access. So we still need either vnc or rdp as an option…

It feels like I am close. but just missing a step. if I run the MVVM with out the window opens and operates just fine. but as soon as I enable either VNC or RDP the app is running somewhere just don’t know where it is displaying. While I have a blank screen with a mouse pointer, either vnc or rdp will connect and move the pointer around.

well I did try setup a trial for the Torizon OS ecosystem. when through the steps. and when I try a vnc session I will get a notice on the ssh connection that the vnc connection was rejected.

so I have no Ideas now. what actual base OS and application base should I even be trying at this point.

Glad it is friday because I am getting a bit frustrated.

Hey @lon,

Your received an error message when trying the Remote Desktop with Torizon cloud? Can you let me know what command you were at and the associated error message?

It’s more difficult for us to help with 3rd party programs like RDP, just because we’re not always as familiar with them. But can sometimes identify errors more easily.

Base OS should be Torizon 7 or Torizon 6. Torizon 7 is newer, but not all Torizon features are fully supported, because of it’s newness. So for some situations it makes sense to stay on Torizon OS 6.

@eric.tx

current versions on the device:

I have created the SSH Key and uploaded it to the torizon cloud.
I can create an SSH tunnel to to the device. I can can access the shell and log in.
when I try to create the SSH tunnel for a vnc session and connect using vnc (tigervnc at the moment) I get the following.

now if there are other steps I may have missed I don’t know. I am just following the you posted above.

Eric,
any thoughts on what I should try next with RDP or VNC.

like I have said. the connection will work if I only have a weston docker image running. but as soon as I add in another docker image I will not get the screen of the app running in that docker container. So say I try the avalonia templates. either one. they will run fine and display on our HDMI touch panel. and everything works. but when i try to enable either RDP or VNC. I will have a blank screen with a pointer. the avalonia apps appear to be running. It is like the display for them is being used by the other docker image. I am going to play around with CAN and USB devices for a bit. but all of this will be for nothing if I can’t get one of these remote connections to work.

Hey @Lon,

Have you seen our guide for this? Please note the note regarding Torizon 7 (not tested yet), Torizon 6 being recommended.

-Eric

yes I have gone through it. that is how I managed to get as far as I am. like I said RDP and VNC will work. but always with a blank screen. my application will not display when I have it enabled.
it seems like the application container is not talking to the weston container for the display.

Hey @Lon,

You may need to use Torizon 6, as I believe it has been vetted more.

-Eric


this is what I have on the module

hmmm… ok I managed to have an almost working RDP session if I went to Torizon 7. my app will run and RDP connects but the screen is displayed offset.

So I tried going back to Torizon 6. but the same docker-compose file will not work. I need to modify it from:
weston:
image: torizon/weston${GPU}:4

to:
weston:
image: torizon/weston-vivante:3

So the question is why those changes. I am going through the documentation on the website. but gaining no insight to this behavior.

Docker is all new to me… I am sure I am missing something but what I am just not seeing or finding.

Hey Lon,

Here is the most information regarding container versioning.

https://developer.toradex.com/torizon/application-development/provided-containers/torizoncore-containers-tags-and-versioning/

Eric Singer
Toradex