Using several different editions of sigrok, including the 0.4.2 release,
and a couple different nightlies, of about this date, I found it possible to find USB hardware only by running as root.
With the sigrok-provided udev rules installed, the pulseview invocations didn't work with any hardware, with or without being root, and the system log (category Other) reported many errors of the form:
/etc/udev/rules.d/61-libsigrok-uaccess.rules:26 Invalid key/value pair, ignoring
for numerous item numbers 8..26, and for all three rules.
What did you use?
I have used these command lines without any problems on both Ubuntu 18.04 (18.04.06 LTS. Kernel version 4.15.0-191.202-generic 4.15.18) and Ubuntu MATE 20.04 with Cinnamon (underlying Ubuntu 20.04.04 LTS. Kernel version 5.4.0-122.138-generic 5.4.192):
wget -O 60-libsigrok.rules "https://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/60-libsigrok.rules"
wget -O 61-libsigrok-plugdev.rules "https://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/61-libsigrok-plugdev.rules"
wget -O 61-libsigrok-uaccess.rules "https://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/61-libsigrok-uaccess.rules"
sudo udevadm control --reload-rules
It is more or less from direct the manual, <https://sigrok.org/doc/pulseview/unstable/manual.html>. The instructions were changed at some point (several years go). The corrected instructions are the ones listed here.
The manual link broke and is still broken. Alternatives are:
*direct from the manual
Thank you, Peter.
My script is slightly different from the given one in that it includes making a local copy of the udev files, but I have done it both ways and diffed the resulting files. They are in fact identical.
So, I am unclear whether the log messages are normal, or not. Perhaps, it is something like there is no hardware connected that matches most of the rules.
Or perhaps, something has changed and they haven't changed accordingly.
I don't understand the content of the udev rules at all.
I was wrong in saying that configuring the rules prevented pulseview from seeing USB hardware when run as root. That actually works fine; with or without the sigrok udev rules.
It is still the case that the rules don't fix the main problem, which is that you have to run pulseview as root for it to see USB hardware; with or without the sigrok udev files.
I have tried all these combinations with a current nightly appimage, a current release appimage, and a version of pulseview that I have built from source, and am running from the sr directory.
I can not confirm this problem.
After a lot of yak shaving, I tested it on a fresh Ubuntu 22.04 system and the udev rules worked just fine, just as they did on the same hardware with a Ubuntu 20.04 system and on a 18.05 system on another computer.
I built PulseView from source as the AppImage didn't work ("... Symbol lookup error: /usr/lib/x86_64-Linux-GNU/libgio-2.0.so.0: Undefined symbol: g_module_open_full"), even after installing FUSE 2.
Thank you, Peter
OK, looking across the web there have been many comments about not being able to run pulseview as non-root over the last several years. Many said that they had put the rules in, without success, as with me.
Therefore, it seems to me that the rules probably do work as required, and are probably necessary, but are not sufficient to enable operation non-root.
I do not know enough about USB to further troubleshoot the problem, at this time.
Anyway, it seems that the title of this bug report is incorrect and this report should be closed or cancelled, or something. Who does this?
Thank you for your efforts.
One additional note.
Running the same SR build of pulseview as root, and as normal user,
with the log level set to 5 shows that there are two basic differences.
1. Different config directories are used.
2. The root instance reports 1 devices found, while
the user instance reports 0 devices found.
This seems to indicate that the USB really is still not visible to pulseview even with the UDEV rules installed. Unfortunately the log does not indicate the exact response from the USB system (unless the count is the response).
It is finally working. It is vary strange. I discovered that both my script and the one taken from the manual were in fact not delivering the real udev files, and they were both delivering the identical files with each other. The files delivered were full of html stuff that was naturally ignored. I discovered this when I finally looked at the files in libsigrok/contrib. They are the real files, and using them worked perfectly.
I am not sufficiently acquainted with wget to figure out what went wrong.
So now this issue is complete other than the wget mystery.
The result with wget is often some HTML content if something goes wrong.
Say, trying to download some large binary file that doesn't exist any longer, or the URL is incorrect. Then some HTML content of a small size is returned instead.
Shouldn't this issue be closed?