Please do not post questions in the shout-box as it will be lost in a few days. Open your own topic in the appropriate section. Thank you.

Phantom SDR Plus & RX888 - setup

Started by Martin G8JNJ, Sep 23, 2024, 10:55 PM

Previous topic - Next topic

Martin G8JNJ

Understood.

I suggest the installation instructions need to be expanded, to try and ensure that any dependencies are dealt with, in the correct order.

As PhantomSDR-Plus becomes more widely adopted, these types of problems are likely to get worse, unless a relatively foolproof process is developed.

I'm certainly not skilled in Linux, but there are many who are even less proficient than myself, and part of my extended attempts throughout today, were in order to try and make things easier for them in the future.

I sometimes think that when folks are very familiar with a process, they assume everyone else is too, and this makes it a lot harder for others to follow.

It always reminds me of when I was being taught maths at school. It usually followed a step by step, methodical path, up to a certain point, then the teacher would say something like, "and from this we can deduce that" and then miss out several vital stages, before magically arriving at the answer.

There are good mathematicians, and good teachers, but unfortunately they are often not the same person.

Please spell things out, in detail, so that folks who don't know, can follow the various steps, and understand what is happening. We can then learn better.

Regards,

Martin


Quote from: magicint1337 on Sep 25, 2024, 09:09 PMI always use ubuntu 22.04

Bas ON5HB

The thing is, OpenCL isn't the same for all CPU's...so there is no simple solution.
Try Cuda, I have, couldn't work it out.

The problem isn't PhantomSDR+ but the manufacturers of the hardware.

Intel alone has dosens of different CPU's and GPU's that all have a different driver, most combined into one, but not all.

AMD has dropped OpenCL as name and has ROCM and other names to do OpenCL.

Broadcom also different. nVidia Cuda that is compatible only with nVidia but is also different over various cards.

There is no simple answer to this.

As for the OS, Ubuntu 22.04 is the one to use, Mint 21.3 uses the same base and can be used without problems. They just refuse for things to be done in snapd that could break updates.
Mint uses the normal package distribution.

We have spelled everything out as best as we could.
No easy solution possible.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Martin G8JNJ

Hi Bas,

Yes, I understand, and I also appreciate your assistance in trying to get it to behave as intended.

I have followed most of the instructions, and bought specific hardware that I thought would ease the process, but it would seem that you are correct in saying "No easy solution possible".


I'll try again when the replacement for the faulty PC arrives.

Regards,

Martin



Quote from: Bas ON5HB on Sep 26, 2024, 12:07 PMWe have spelled everything out as best as we could.
No easy solution possible.

Bas ON5HB

Yeah, probably something wrong as the Skylake CPU you tried to use has the most simplistic way of supporting Intel OpenCL.

It should have worked and recompiled almost by itself ;D

Or lastest and greatest package:

https://github.com/intel/compute-runtime/releases

It should have worked, almost all ways of doing it do support that CPU...therefor baffled me it wouldn't work.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Martin G8JNJ

OK, I just followed your recommendation and bought a HP Elitedesk PC i5-6500T 3.1Ghz, I wasn't aware there were further considerations.

If I'd know I could have asked for a different replacement, but it's currently being shipped, so I'll have to make do with what I've chosen.

You live and learn...

Quote from: Bas ON5HB on Sep 26, 2024, 01:42 PMYeah, probably something wrong as the Skylake CPU you tried to use has the most simplistic way of supporting Intel OpenCL.

Bas ON5HB

My testing server, just freed this as my desktop machine ;D

Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz

I installed Ubuntu 22.04 fresh.

Now I'm going to install OpenCL and will tell you in about an hour if I have the same difficulites, however I do not expect such.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Martin G8JNJ

Hi Bas,

I'm responding in this thread, to avoid contaminating your new one.

The replacement PC arrived.

I made a fresh Ubuntu 22.04 build and followed all the updated instructions to the letter.


clinfo indicated that it had installed correctly.


root@phantom:/home/wessex/PhantomSDR-Plus# clinfo
Number of platforms                               1
  Platform Name                                   Intel(R) OpenCL Graphics
  Platform Vendor                                 Intel(R) Corporation
  Platform Version                                OpenCL 3.0
  Platform Profile                                FULL_PROFILE

I then proceeded with the installation of PhantomSDR-Plus


root@phantom:/home/wessex/PhantomSDR-Plus# sudo ./install.sh
Updating package lists and installing necessary packages...
Hit:1 http://gb.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
libfftw3-dev is already the newest version (3.3.8-2ubuntu8).
libopus-dev is already the newest version (1.3.1-0.1build2).
libzstd-dev is already the newest version (1.4.8+dfsg-3build1).
pkg-config is already the newest version (0.29.2-1ubuntu3).
libboost-all-dev is already the newest version (1.74.0.3ubuntu7).
libcurlpp-dev is already the newest version (0.8.1-5).
libliquid-dev is already the newest version (1.3.2-3).
libwebsocketpp-dev is already the newest version (0.8.2-4).
meson is already the newest version (0.61.2-1).
nlohmann-json3-dev is already the newest version (3.10.5-2).
cmake is already the newest version (3.22.1-1ubuntu1.22.04.2).
curl is already the newest version (7.81.0-1ubuntu1.18).
git is already the newest version (1:2.34.1-1ubuntu1.11).
libflac++-dev is already the newest version (1.3.3-2ubuntu0.2).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9.2).
The following additional packages will be installed:
  libssh2-1 libstd-rust-1.75 libstd-rust-dev rustc
Suggested packages:
  cargo-doc llvm-17 lld-17 clang-17
The following NEW packages will be installed:
  cargo libssh2-1 libstd-rust-1.75 libstd-rust-dev rustc
0 upgraded, 5 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/98.2 MB of archives.
After this operation, 392 MB of additional disk space will be used.
Selecting previously unselected package libssh2-1:amd64.
(Reading database ... 105948 files and directories currently installed.)
Preparing to unpack .../libssh2-1_1.10.0-3_amd64.deb ...
Unpacking libssh2-1:amd64 (1.10.0-3) ...
Selecting previously unselected package libstd-rust-1.75:amd64.
Preparing to unpack .../libstd-rust-1.75_1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04                                                                                         _amd64.deb ...
Unpacking libstd-rust-1.75:amd64 (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Selecting previously unselected package libstd-rust-dev:amd64.
Preparing to unpack .../libstd-rust-dev_1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04_                                                                                         amd64.deb ...
Unpacking libstd-rust-dev:amd64 (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Selecting previously unselected package rustc.
Preparing to unpack .../rustc_1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04_amd64.deb                                                                                          ...
Unpacking rustc (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Selecting previously unselected package cargo.
Preparing to unpack .../cargo_1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04_amd64.deb                                                                                          ...
Unpacking cargo (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Setting up libstd-rust-1.75:amd64 (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Setting up libstd-rust-dev:amd64 (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Setting up rustc (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Setting up libssh2-1:amd64 (1.10.0-3) ...
Setting up cargo (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
Packages installed successfully.
Building the main application...
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
ninja: Entering directory `/home/wessex/PhantomSDR-Plus/build'
ninja: no work to do.
Welcome to PhantomPlus Installer!
Which SDR would you like to set up?
  [1] RX888 MKII / RX888
  [2] RTLSDR
  [3] SDRPlay
Select an option [1-3]: 1
Setting up RX888 MKII / RX888...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  cargo libssh2-1 libstd-rust-1.75 libstd-rust-dev rustc
0 upgraded, 0 newly installed, 5 to remove and 13 not upgraded.
After this operation, 392 MB disk space will be freed.
(Reading database ... 106083 files and directories currently installed.)
Removing cargo (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Removing libssh2-1:amd64 (1.10.0-3) ...
Removing rustc (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Removing libstd-rust-dev:amd64 (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Removing libstd-rust-1.75:amd64 (1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
Installing Rust...
info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
warning: Updating existing toolchain, profile choice will be ignored
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.81.0 (eeb90cda1 2024-09-04                                                                                         )


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, you need to source
the corresponding env file under $HOME/.cargo.

This is usually done by running one of the following (note the leading DOT):
. "$HOME/.cargo/env"            # For sh/bash/zsh/ash/dash/pdksh
source "$HOME/.cargo/env.fish"  # For fish
Cloning the rx888_stream repository...
fatal: destination path 'rx888_stream' already exists and is not an empty direct                                                                                         ory.
Building and installing...
    Finished `release` profile [optimized] target(s) in 0.19s
  Installing rx888_stream v0.1.0 (/home/wessex/PhantomSDR-Plus/rx888_stream)
    Updating crates.io index
     Locking 45 packages to latest compatible versions
      Adding windows-sys v0.52.0 (latest: v0.59.0)
warning: variable does not need to be mutable
   --> src/main.rs:232:9
    |
232 |     let mut handle = open_device_with_vid_pid_timeout(
    |         ----^^^^^^
    |         |
    |         help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: `rx888_stream` (bin "rx888_stream") generated 1 warning (run `cargo fix                                                                                          --bin "rx888_stream"` to apply 1 suggestion)
    Finished `release` profile [optimized] target(s) in 1.71s
   Replacing /root/.cargo/bin/rx888_stream
    Replaced package `rx888_stream v0.1.0 (/home/wessex/PhantomSDR-Plus/rx888_st                                                                                         ream)` with `rx888_stream v0.1.0 (/home/wessex/PhantomSDR-Plus/rx888_stream)` (e                                                                                         xecutable `rx888_stream`)
RX888 is successfully set up. Please restart your Terminal and then run the star                                                                                         t command.






Martin G8JNJ

Cont.

I tried to run PhantomSDR-Plus but, it came up with errors.


wessex@phantom:~/PhantomSDR-Plus$ sudo ./start-rx888mk2.sh
[sudo] password for wessex:
spectrumserver: no process found
rx888_stream: no process found
./start-rx888mk2.sh: line 8: rx888_stream: command not found

As su

root@phantom:/home/wessex/PhantomSDR-Plus# ./start-rx888mk2.sh                  spectrumserver: no process found
rx888_stream: no process found
root@phantom:/home/wessex/PhantomSDR-Plus# thread 'main' panicked at library/std/src/io/stdio.rs:1118:9:
failed printing to stdout: Broken pipe (os error 32)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


I edited the toml files and put none in place of opencl.

It started without any obvious errors, and I could get a browser to connect, it asked me to tap to start the audio, but there was no audio or waterfall. Restarting PhantomSDR-Plus and refreshing the browser, had no effect.

I went away for a while to have my evening meal, and I've just returned, refreshed the browser, and the audio and waterfall are running.

So, as before, it is still not recognising opencl.

Regards,

Martin

 










Martin G8JNJ

I suspect something has changed from earlier versions with the way opencl is deployed, but I'm not a software guy.


https://www.intel.com/content/www/us/en/developer/articles/tool/opencl-drivers.html

Intel® SDK for OpenCL Applications is EOL. The transition to Intel® oneAPI and its unified, cross-architecture programming model brings greater efficiency and reuse across hardware targets. See the Intel® oneAPI Programming Guide for information migrating OpenCL code and OpenCL interoperability by way of SYCL* objects.

Martin G8JNJ

snipped from clinfo - is this a clue ?

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Intel(R) OpenCL Graphics
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [INTEL]
  clCreateContext(NULL, ...) [default]            Success [INTEL]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Intel(R) OpenCL Graphics
    Device Name                                   Intel(R) HD Graphics 530
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Intel(R) OpenCL Graphics
    Device Name                                   Intel(R) HD Graphics 530
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Intel(R) OpenCL Graphics
    Device Name                                   Intel(R) HD Graphics 530

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.14
  ICD loader Profile                              OpenCL 3.0


magicint1337

Maybe after meal you restarted your terminal and reconnected? Because after the rust installation this is needed. Try it with opencl again and restart and send the error if any
Maintainer and Developer of PhantomSDR-Plus

Martin G8JNJ

No, I had just left the browser running, with a blank waterfall, when I returned I refreshed the tab, and it was working.

Without Opencl running, I can just about achieve a 60MHz sample rate, above this it has severe audio dropouts. I'd hoped to be able to have a slightly greater margin.

The next job it to somehow implement an automatic startup on boot or power restoration. I guess a chron job would achieve this, but there should really be an inbuilt option to start on boot.


Regards,

Martin





Quote from: magicint1337 on Sep 28, 2024, 11:39 AMMaybe after meal you restarted your terminal and reconnected? Because after the rust installation this is needed. Try it with opencl again and restart and send the error if any

Bas ON5HB

Looks like you didn't install the libaries.

You never told us the install showed the libraries.

Also, I do not run a desktop, that is disabled in grub at boot.

GRUB_CMDLINE_LINUX_DEFAULT="systemd.unit=multi-user.target usbcore.usbfs_memory_mb=2048 pci=noaer"

Maybe you have a desktop running? I never do. Blackbox only. ;)
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Martin G8JNJ


Which / What libraries ? Do you mean the OpenCL deb files or some other prerequisites that should have been part of the Ubuntu install ?thing else ?

I followed all of the instructions, step by step, and as described.

I'm not running the Linux desktop, it's headless, and I'm SSHing in, but I do have a VGA monitor connected, so that I can confirm that it is booting up correctly.

Regards,

Martin


Quote from: Bas ON5HB on Sep 28, 2024, 05:26 PMLooks like you didn't install the libaries.

You never told us the install showed the libraries.

Also, I do not run a desktop, that is disabled in grub at boot.

GRUB_CMDLINE_LINUX_DEFAULT="systemd.unit=multi-user.target usbcore.usbfs_memory_mb=2048 pci=noaer"

Maybe you have a desktop running? I never do. Blackbox only. ;)

Bas ON5HB

You must have missed something, as I wrote it while doing it.

https://www.phantomsdr.fun/index.php?topic=58.msg331#msg331

I can not understand why it keeps failing on your part, sorry I don't.

I especially took my Desktop machine, formatted it, and started from scratch.

I wrote down all steps.

It's beyond me why you can't get it working.

Maybe time to ask a Linux-nerd to help you? I'm baffled why you didn't get it working, again.

Sorry mate. I'm clueless at this point.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Powered by EzPortal