Bug 1321441

Summary: RTL-SDR doesn't auto-detach kernel driver
Product: [Fedora] Fedora Reporter: Benji Wiebe <benjiwiebe>
Component: rtl-sdrAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: benjiwiebe, jskarvad
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-30 04:06:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Benji Wiebe 2016-03-27 04:01:46 UTC
Description of problem: RTL-SDR was not compiled with auto-remove of driver turned on.

Steps to Reproduce:
1. Unplug RTL device.
2. Plug in RTL device.
3. Run gqrx or some other program that uses an RTL-SDR.

Actual results:
Gets an error message: Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

Expected results:
No error.


Additional info:
This can be fixed by using -DDETACH_KERNEL_DRIVER=ON with CMake, or --enable-driver-detach with autotools.

Comment 1 Jaroslav Škarvada 2016-03-29 09:28:50 UTC
Hmm, it should be already compiled in:
-- Building with kernel driver detaching enabled

And IIRC it always worked for me.

Comment 2 Jaroslav Škarvada 2016-03-29 09:47:06 UTC
I retried on f23 and it worked as expected:
Detached kernel driver
Found Rafael Micro R820T tuner
Exact sample rate is: 1500000,014901 Hz
Reattached kernel driver

Comment 3 Benji Wiebe 2016-03-30 04:06:30 UTC
Funny. It works for me now, too. I wonder if I was running it as a different user or something.