public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] udev weirdness with rtl-sdr
@ 2025-10-03 21:42 Markus Gustafsson
  2025-10-03 22:01 ` Javier Martinez
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Gustafsson @ 2025-10-03 21:42 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

Evening!

Tonight I've been trying to get an RTL-SDR dongle working using this wiki article: https://wiki.gentoo.org/wiki/Rtl-sdr

I set up everything according to the article, and then tried to run 'rtl_test'. This worked fine as root, but not as my regular user. It gave me the following error message:

> $ rtl_test
> Found 1 device(s):
> 0: �+.B�, , SN:
> 
> Using device 0: Generic RTL2832U OEM
> usb_open error -3
> Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules
> Failed to open rtlsdr device #0.

This is despite having added my user to the 'sdr' group. I googled around, but couldn't figure anything out (everybody else seems to forget about the udev rule, but I didn't). Then I did the following:

> $ ls -la /dev/rtl_sdr
> lrwxrwxrwx 1 root root 15 Oct  3 23:19 /dev/rtl_sdr -> bus/usb/001/010
> $ ls -la /dev/bus/usb/001/010
> crw-rw---- 1 root plugdev 189, 9 Oct  3 23:19 /dev/bus/usb/001/010

So for some reason the group is 'plugdev'. When I added my user to that group everything works fine, but I don't understand why it gets added to that group? Is there some kind of conflict going on here? The udev rule from the article is the only udev rule I have (at least in /etc/udev/rules.d).

Mvh,
Markus



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] udev weirdness with rtl-sdr
  2025-10-03 21:42 [gentoo-user] udev weirdness with rtl-sdr Markus Gustafsson
@ 2025-10-03 22:01 ` Javier Martinez
  2025-10-04 10:00   ` Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez @ 2025-10-03 22:01 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1.1: Type: text/plain, Size: 1427 bytes --]

El 3/10/25 a las 23:42, Markus Gustafsson escribió:
> Evening!
> 
> Tonight I've been trying to get an RTL-SDR dongle working using this wiki article: https://wiki.gentoo.org/wiki/Rtl-sdr
> 
> I set up everything according to the article, and then tried to run 'rtl_test'. This worked fine as root, but not as my regular user. It gave me the following error message:
> 
>> $ rtl_test
>> Found 1 device(s):
>> 0: �+.B�, , SN:
>>
>> Using device 0: Generic RTL2832U OEM
>> usb_open error -3
>> Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules
>> Failed to open rtlsdr device #0.
> 
> This is despite having added my user to the 'sdr' group. I googled around, but couldn't figure anything out (everybody else seems to forget about the udev rule, but I didn't). Then I did the following:
> 
>> $ ls -la /dev/rtl_sdr
>> lrwxrwxrwx 1 root root 15 Oct  3 23:19 /dev/rtl_sdr -> bus/usb/001/010
>> $ ls -la /dev/bus/usb/001/010
>> crw-rw---- 1 root plugdev 189, 9 Oct  3 23:19 /dev/bus/usb/001/010
> 
> So for some reason the group is 'plugdev'. When I added my user to that group everything works fine, but I don't understand why it gets added to that group? Is there some kind of conflict going on here? The udev rule from the article is the only udev rule I have (at least in /etc/udev/rules.d).
> 
> Mvh,
> Markus
> 
> 
Probably the some reason is policykit

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3145 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] udev weirdness with rtl-sdr
  2025-10-03 22:01 ` Javier Martinez
@ 2025-10-04 10:00   ` Michael
  2025-10-04 12:45     ` Markus Gustafsson
  0 siblings, 1 reply; 5+ messages in thread
From: Michael @ 2025-10-04 10:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2527 bytes --]

On Friday, 3 October 2025 23:01:07 British Summer Time Javier Martinez wrote:
> El 3/10/25 a las 23:42, Markus Gustafsson escribió:
> 
> > Evening!
> > 
> > Tonight I've been trying to get an RTL-SDR dongle working using this wiki
> > article: https://wiki.gentoo.org/wiki/Rtl-sdr
 
> > I set up everything according to the article, and then tried to run
> > 'rtl_test'. This worked fine as root, but not as my regular user. It gave
> > me the following error message:
 
> > 
> >> $ rtl_test
> >> Found 1 device(s):
> >> 0: �+.B�, , SN:
> >>
> >>
> >>
> >> Using device 0: Generic RTL2832U OEM
> >> usb_open error -3
> >> Please fix the device permissions, e.g. by installing the udev rules file
> >> rtl-sdr.rules
 Failed to open rtlsdr device #0.
> > 
> > 
> > This is despite having added my user to the 'sdr' group. I googled around,
> > but couldn't figure anything out (everybody else seems to forget about
> > the udev rule, but I didn't). Then I did the following:
 
> > 
> >> $ ls -la /dev/rtl_sdr
> >> lrwxrwxrwx 1 root root 15 Oct  3 23:19 /dev/rtl_sdr -> bus/usb/001/010
> >> $ ls -la /dev/bus/usb/001/010
> >> crw-rw---- 1 root plugdev 189, 9 Oct  3 23:19 /dev/bus/usb/001/010
> > 
> > 
> > So for some reason the group is 'plugdev'. When I added my user to that
> > group everything works fine, but I don't understand why it gets added to
> > that group? Is there some kind of conflict going on here? The udev rule
> > from the article is the only udev rule I have (at least in
> > /etc/udev/rules.d).

Gentoo uses the group plugdev to elevate privileges in order for plain users 
to be able to operate on USB devices.  The sdr group which the wiki page 
recommends would work, if only the ebuild had created it.

> > Mvh,
> > Markus
> > 
> > 
> 
> Probably the some reason is policykit

I see the ebuild mentions a group account "usb" instead of plugdev.  Perhaps 
it should contain a different post install message than this mentioning 
plugdev instead:
===================
[snip ...]

pkg_postinst() {
        udev_reload
        elog "Only users in the usb group can capture."
        elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login."
}
=====================

I recall the usb group was used with eudev, but I don't know if it is still 
valid.

Marcus, you could file a bug report to ask for the rtl-sdr and rtl-sdr-blog 
ebuilds to mention pludev.  Also the wiki page will need editing to reflect 
current status.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] udev weirdness with rtl-sdr
  2025-10-04 10:00   ` Michael
@ 2025-10-04 12:45     ` Markus Gustafsson
  2025-10-04 12:50       ` Michael
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Gustafsson @ 2025-10-04 12:45 UTC (permalink / raw
  To: gentoo-user

Sure, I could try to do that. But just to make things clear:

- The ebuilds should mention the "plugdev" group instead of the "usb" group
- The wiki should use the "plugdev" group instead of the "sdr" group
- The "sdr" group isn't needed at all

Did I get that right? 

Regards, 
Markus

On Sat, Oct 4, 2025, at 12:00, Michael wrote:
> On Friday, 3 October 2025 23:01:07 British Summer Time Javier Martinez wrote:
>> El 3/10/25 a las 23:42, Markus Gustafsson escribió:
>> 
>> > Evening!
>> > 
>> > Tonight I've been trying to get an RTL-SDR dongle working using this wiki
>> > article: https://wiki.gentoo.org/wiki/Rtl-sdr
> 
>> > I set up everything according to the article, and then tried to run
>> > 'rtl_test'. This worked fine as root, but not as my regular user. It gave
>> > me the following error message:
> 
>> > 
>> >> $ rtl_test
>> >> Found 1 device(s):
>> >> 0: �+.B�, , SN:
>> >>
>> >>
>> >>
>> >> Using device 0: Generic RTL2832U OEM
>> >> usb_open error -3
>> >> Please fix the device permissions, e.g. by installing the udev rules file
>> >> rtl-sdr.rules
>  Failed to open rtlsdr device #0.
>> > 
>> > 
>> > This is despite having added my user to the 'sdr' group. I googled around,
>> > but couldn't figure anything out (everybody else seems to forget about
>> > the udev rule, but I didn't). Then I did the following:
> 
>> > 
>> >> $ ls -la /dev/rtl_sdr
>> >> lrwxrwxrwx 1 root root 15 Oct  3 23:19 /dev/rtl_sdr -> bus/usb/001/010
>> >> $ ls -la /dev/bus/usb/001/010
>> >> crw-rw---- 1 root plugdev 189, 9 Oct  3 23:19 /dev/bus/usb/001/010
>> > 
>> > 
>> > So for some reason the group is 'plugdev'. When I added my user to that
>> > group everything works fine, but I don't understand why it gets added to
>> > that group? Is there some kind of conflict going on here? The udev rule
>> > from the article is the only udev rule I have (at least in
>> > /etc/udev/rules.d).
>
> Gentoo uses the group plugdev to elevate privileges in order for plain users 
> to be able to operate on USB devices.  The sdr group which the wiki page 
> recommends would work, if only the ebuild had created it.
>
>> > Mvh,
>> > Markus
>> > 
>> > 
>> 
>> Probably the some reason is policykit
>
> I see the ebuild mentions a group account "usb" instead of plugdev.  Perhaps 
> it should contain a different post install message than this mentioning 
> plugdev instead:
> ===================
> [snip ...]
>
> pkg_postinst() {
>         udev_reload
>         elog "Only users in the usb group can capture."
>         elog "Just run 'gpasswd -a <USER> usb', then have <USER> re-login."
> }
> =====================
>
> I recall the usb group was used with eudev, but I don't know if it is still 
> valid.
>
> Marcus, you could file a bug report to ask for the rtl-sdr and rtl-sdr-blog 
> ebuilds to mention pludev.  Also the wiki page will need editing to reflect 
> current status.
> Attachments:
> * signature.asc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] udev weirdness with rtl-sdr
  2025-10-04 12:45     ` Markus Gustafsson
@ 2025-10-04 12:50       ` Michael
  0 siblings, 0 replies; 5+ messages in thread
From: Michael @ 2025-10-04 12:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 3393 bytes --]

On Saturday, 4 October 2025 13:45:31 British Summer Time Markus Gustafsson 
wrote:
> Sure, I could try to do that. But just to make things clear:
> 
> - The ebuilds should mention the "plugdev" group instead of the "usb" group
> - The wiki should use the "plugdev" group instead of the "sdr" group
> - The "sdr" group isn't needed at all
> 
> Did I get that right?

Yes, at least that's my opinion, but the ebuild maintainer will advise 
appropriately when you file a bug report.


> On Sat, Oct 4, 2025, at 12:00, Michael wrote:
> > On Friday, 3 October 2025 23:01:07 British Summer Time Javier Martinez 
wrote:
> >> El 3/10/25 a las 23:42, Markus Gustafsson escribió:
> >> > Evening!
> >> > 
> >> > Tonight I've been trying to get an RTL-SDR dongle working using this
> >> > wiki
> >> > article: https://wiki.gentoo.org/wiki/Rtl-sdr
> >> > 
> >> > I set up everything according to the article, and then tried to run
> >> > 'rtl_test'. This worked fine as root, but not as my regular user. It
> >> > gave
> >> > 
> >> > me the following error message:
> >> >> $ rtl_test
> >> >> Found 1 device(s):
> >> >> 0: �+.B�, , SN:
> >> >> 
> >> >> 
> >> >> 
> >> >> Using device 0: Generic RTL2832U OEM
> >> >> usb_open error -3
> >> >> Please fix the device permissions, e.g. by installing the udev rules
> >> >> file
> >> >> rtl-sdr.rules
> >  
> >  Failed to open rtlsdr device #0.
> >  
> >> > This is despite having added my user to the 'sdr' group. I googled
> >> > around,
> >> > but couldn't figure anything out (everybody else seems to forget about
> >> > 
> >> > the udev rule, but I didn't). Then I did the following:
> >> >> $ ls -la /dev/rtl_sdr
> >> >> lrwxrwxrwx 1 root root 15 Oct  3 23:19 /dev/rtl_sdr -> bus/usb/001/010
> >> >> $ ls -la /dev/bus/usb/001/010
> >> >> crw-rw---- 1 root plugdev 189, 9 Oct  3 23:19 /dev/bus/usb/001/010
> >> > 
> >> > So for some reason the group is 'plugdev'. When I added my user to that
> >> > group everything works fine, but I don't understand why it gets added
> >> > to
> >> > that group? Is there some kind of conflict going on here? The udev rule
> >> > from the article is the only udev rule I have (at least in
> >> > /etc/udev/rules.d).
> > 
> > Gentoo uses the group plugdev to elevate privileges in order for plain
> > users to be able to operate on USB devices.  The sdr group which the wiki
> > page recommends would work, if only the ebuild had created it.
> > 
> >> > Mvh,
> >> > Markus
> >> 
> >> Probably the some reason is policykit
> > 
> > I see the ebuild mentions a group account "usb" instead of plugdev. 
> > Perhaps it should contain a different post install message than this
> > mentioning plugdev instead:
> > ===================
> > [snip ...]
> > 
> > pkg_postinst() {
> > 
> >         udev_reload
> >         elog "Only users in the usb group can capture."
> >         elog "Just run 'gpasswd -a <USER> usb', then have <USER>
> >         re-login."
> > 
> > }
> > =====================
> > 
> > I recall the usb group was used with eudev, but I don't know if it is
> > still
> > valid.
> > 
> > Marcus, you could file a bug report to ask for the rtl-sdr and
> > rtl-sdr-blog
> > ebuilds to mention pludev.  Also the wiki page will need editing to
> > reflect
> > current status.
> > Attachments:
> > * signature.asc


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-04 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 21:42 [gentoo-user] udev weirdness with rtl-sdr Markus Gustafsson
2025-10-03 22:01 ` Javier Martinez
2025-10-04 10:00   ` Michael
2025-10-04 12:45     ` Markus Gustafsson
2025-10-04 12:50       ` Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox