From 4b2369e70a4748909f9b1b9648590adc6a1e7dcd Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Tue, 12 Mar 2024 11:59:52 +0000 Subject: [PATCH] Check for USB permission and SSE 4.2 instructions --- snap/local/sdrangel_wrapper.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/snap/local/sdrangel_wrapper.sh b/snap/local/sdrangel_wrapper.sh index 39e3d7c12..272885122 100755 --- a/snap/local/sdrangel_wrapper.sh +++ b/snap/local/sdrangel_wrapper.sh @@ -650,5 +650,15 @@ fi # Qt: Session management error: None of the authentication protocols specified are supported unset SESSION_MANAGER +# Check we have USB access +if ! snapctl is-connected raw-usb ; then + notify-send -u critical -a SDRangel "SDRangel does not have USB access." "To enable, run:\n\nsnap connect sdrangel:raw-usb" +fi + +# Check we have SSE 4.2 +if ! cat /proc/cpuinfo | grep sse4_2 > /dev/null ; then + notify-send -u critical -a SDRangel "SSE 4.2 support not detected in your CPU." "SDRangel may crash." +fi + # Safe to enable soapy, as we only include soapy remote exec $SNAP/opt/install/sdrangel/bin/sdrangel --soapy "$@"