Question regaridng pre-builit packages

Upgrade Canonical Ubuntu to Latest Build | RUBIK Pi Documentation

I have several questions regarding pre-built packages.

Q1. What is a pre-built package? What is its purpose?

Q2. Are pre-built packages supported on both Ubuntu Server and Desktop versions?

Q3. When installing a pre-built package on the Server version, it allows Ubuntu to be used without an ID/password. What is required to revert back to the original Server version UI/UX?

Q4. Is it mandatory or recommended to install a pre-built package in order to use QNN/SNPE? Are there alternative ways to use them without installing a pre-built package?

Q1. What is a pre-built package? What is its purpose?

Pre-built packages are a collection of compiled software packages provided by
Thundercomm through its PPA (Personal Package Archive) repository at
apt.thundercomm.com/rubik-pi-3/noble ppa.

They include:

  • Hardware drivers and firmware: GPU driver (qcom-adreno), display drivers,
    USB controller firmware, etc. specific to the QCS6490 platform
  • Multimedia SDK plugins (IMSDK): GStreamer plugins such as qtivtransform
    (GPU-accelerated color conversion/cropping), qtimltflite (NPU inference),
    qtivcomposer, etc.
  • AI runtime libraries: QNN (Qualcomm Neural Network) / SNPE libraries,
    AI Engine Direct delegate libraries
  • System-level components: Wayland display service, audio HAL, camera HAL, etc.

Purpose: Enables the Rubik Pi 3’s hardware features (GPU, NPU, camera, display,
audio, etc.) to work properly on Ubuntu. It is the foundation for running AI
and multimedia applications.

Installation commands:

git clone -b ubuntu_setup --single-branch https://github.com/rubikpi-ai/rubikpi-script.git
cd rubikpi-script
./install_ppa_pkgs.sh

Upgrade commands:

sudo apt upgrade -y

Reference: Upgrade Canonical Ubuntu to Latest Build | RUBIK Pi Documentation

Q2. Are pre-built packages supported on both Ubuntu Server and Desktop versions?

Yes, pre-built packages support both Server and Desktop versions. Both versions
rely on the same PPA repository:

sudo add-apt-repository ppa:ubuntu-qcom-iot/qcom-noble-ppa
sudo apt update && sudo apt upgrade -y

Version Differences:

Item                   Server Version              Desktop Version
-----------------------------------------------------------------------
GUI Desktop Env        None                        ubuntu-desktop + gdm3
GPU Driver             qcom-adreno1                qcom-adreno1
Graphics Libs          Minimal                     libegl-mesa0, libvulkan1, etc.
Display Service        Wayland (CLI)               Wayland (GUI)
Pre-built Packages     Fully Supported             Fully Supported

Reference: FAQ | RUBIK Pi Documentation

Q3. Server version: pre-built package enables passwordless login.
How to revert to original Server version UI/UX?

If desktop environment-related pre-built packages have been installed on the
Server version, causing a graphical interface and passwordless auto-login,
you can restore the pure command-line Server version with these commands:

# 1. Ensure network connection is active
# 2. Execute the following commands to remove the desktop environment
sudo add-apt-repository ppa:ubuntu-qcom-iot/qcom-noble-ppa
sudo apt update
sudo apt upgrade -y
sudo apt-get install qcom-adreno1
sudo apt-get remove ubuntu-desktop
sudo apt remove gdm3
sudo reboot

This removes the desktop environment and graphical login manager (gdm3),
restoring the pure command-line Server version interface. After reboot, the
system will return to the terminal mode requiring username/password login.

Switching from Server to Desktop version (reverse operation):

sudo add-apt-repository ppa:ubuntu-qcom-iot/qcom-noble-ppa
sudo apt update
sudo apt upgrade -y
sudo apt install qcom-adreno1- libgbm-msm1- libegl-mesa0 libegl1 libgles2 libglvnd0 libvulkan1
sudo apt install ubuntu-desktop
sudo reboot

Reference: FAQ | RUBIK Pi Documentation

Q4. Is it mandatory to install a pre-built package for QNN/SNPE?
Are there alternative ways?

Recommended but not the only way.

— Option 1: Install Pre-built Package (Recommended) —

This is the simplest approach and will automatically install QNN/SNPE runtime
libraries and all dependencies:

git clone -b ubuntu_setup --single-branch https://github.com/rubikpi-ai/rubikpi-script.git
cd rubikpi-script
./install_ppa_pkgs.sh

— Option 2: Alternative Development Paths —

Method                       Description                                    PPA Required?
--------------------------------------------------------------------------------------------------
Qualcomm AI Hub              Optimize models in cloud, download to device   Partially (base drivers)
LiteRT/TFLite + AI Engine    Run quantized models on NPU via TFLite's       NPU driver needed
Direct                       AI Engine Direct delegate
ONNX Runtime                 Cross-platform AI with Qualcomm Execution      NPU driver needed
                             Provider for NPU
Llama.cpp                    Pure C++ LLM inference; GPU acceleration       GPU driver needed
                             requires Adreno driver
Qualcomm Genie SDK           Generative AI runtime, independent install     Base drivers needed
Qualcomm IMSDK               Multimedia and AI SDK with GStreamer plugins    IMSDK plugins needed
Qualcomm QIRP                Robotics SDK, ROS-based modules                Base drivers needed

— Important Notes —

Even without installing pre-built packages via PPA, you still need these
base drivers:

  1. GPU Driver (qcom-adreno) - Required by almost all AI/multimedia features
  2. NPU/DSP Driver (Hexagon DSP firmware) - QNN/SNPE NPU acceleration depends on this
  3. GStreamer IMSDK Plugins - Required if using GStreamer pipelines

These base drivers can typically only be obtained through PPA pre-built packages
or full image flashing; manual compilation is very difficult. Therefore, in
practice, it is still recommended to install pre-built packages.

— AI Development Tools/Frameworks Overview —

Tool/Framework          Description                                    Link
--------------------------------------------------------------------------------------------------
Edge Impulse            Build/train AI models with audio/image/sensor  https://www.edgeimpulse.com/
Qualcomm AI Hub         Optimize, validate, deploy AI on Qualcomm      https://aihub.qualcomm.com/
LiteRT/TFLite           Run quantized models on CPU/NPU via AI Engine  https://www.tensorflow.org/
ONNX                    Cross-platform AI with NPU support             https://onnxruntime.ai/
Llama.cpp               Local LLM execution (GPU + C++ backend)        https://github.com/ggerganov/llama.cpp
Qualcomm Genie          Generative AI runtime, multimodal workflows    https://docs.qualcomm.com/
Qualcomm IMSDK          Multimedia and AI SDK, GStreamer plugins        https://docs.qualcomm.com/
Qualcomm QIRP           Robotics SDK, ROS-based modules                https://docs.qualcomm.com/

Reference: Explore Sample Applications | RUBIK Pi Documentation

Kinkin, regarding Q3, I had to do the following commands to remove passwordless auto-login:

sudo apt remove weston-autostart
sudo systemctl disable weston-autostart.service
sudo systemctl mask weston-autostart.service
sudo systemctl disable weston-autostart.socket
sudo systemctl mask weston-autostart.socket