Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-01-2024, 06:38 AM
|
#1
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Rep: 
|
Why can the module “r8152” still be loaded after the driver “r8152.ko” was deleted?
I have a USB RTL8152 network adapter, which uses the “r8152” driver.
I just did the following test:
(1) I deleted "/var/lib/dkms/backport-ethernet/1.0.4/5.10.0-amd64-desktop/x86_64/module/r8152.ko"
(2) I deleted "/var/lib/dkms/backport-ethernet/original_module/5.10.0-amd64-desktop/x86_64/r8152.ko"
(3) I rebooted the PC.
(4) Now, I can still access the Internet via the RTL8152 adapter because “r8152” has been loaded as per the output of “lsmod”.
Does anyone know why “r8152” can still be loaded after “r8152.ko” was deleted? I have never installed "r8152" since I installed UnionTech OS.
Code:
Matthew_Wai@My-PC:~$ lsmod | grep 8152
r8152 245760 0
|
|
|
01-01-2024, 07:37 AM
|
#2
|
Member
Registered: Feb 2010
Posts: 416
|
r8152 module is part of my normal 6.6.8 kernel, so possibly it is enabled in your kernel config too and you don't need dkms?
|
|
|
01-01-2024, 10:42 PM
|
#3
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Original Poster
Rep: 
|
Quote:
Originally Posted by biker_rat
r8152 module is part of my normal 6.6.8 kernel, so possibly it is enabled in your kernel config too and you don't need dkms?
|
How can I find out whether it has been enabled in my kernel configuration?
Code:
Matthew_Wai@My-PC:~$ uname -rsm
Linux 5.10.0-amd64-desktop x86_64
|
|
|
01-02-2024, 12:37 AM
|
#4
|
Senior Member
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,696
|
Hi, you can/may blacklist the module by creating a file...
in /etc/moprobe.d/<file-name.conf>
/etc/modprobe.d/r8152-blacklist.conf
Code:
# blacklist r8152
blacklist r8152
note: some modules are dependants of other modules, maybe not in this case, but if you get multiple module loading failures, it could be this reason.
I hope this helps.
|
|
|
01-02-2024, 01:07 AM
|
#5
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Original Poster
Rep: 
|
Quote:
Originally Posted by GlennsPref
Hi, you can/may blacklist the module
|
I already know how to blacklist a driver, but I don't mean to do so.
|
|
1 members found this post helpful.
|
01-02-2024, 02:15 AM
|
#6
|
Senior Member
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,696
|
The loaded modules are in /lib/modules/6.5.0-0.deb12.4-amd64/kernel/ on my box.
your module is listed there.
/lib/modules/6.5.0-0.deb12.4-amd64/modules.order and modules.dep and maybe others the module is listed.
If it is really important to get it out of the system, configuring and compiling the kernel sources may be a better fit for your situation.
saw this... https://www.baeldung.com/linux/list-...kernel-modules
Last edited by GlennsPref; 01-02-2024 at 02:16 AM.
Reason: typo
|
|
1 members found this post helpful.
|
01-02-2024, 03:03 AM
|
#7
|
Member
Registered: Apr 2023
Distribution: mll,4M
Posts: 257
Rep: 
|
grep 8152 /boot/config-`uname -r`
CONFIG_USB_RTL8152=? m or y?
|
|
|
01-02-2024, 06:29 AM
|
#8
|
Member
Registered: Feb 2010
Posts: 416
|
ls /boot
pick out name of your config in boot
then what above guy said
ie:
grep 8152 /boot/nameofyourconfigfileinbootdirectory
|
|
|
01-02-2024, 11:09 AM
|
#9
|
Member
Registered: Jul 2017
Distribution: openSUSE Leap
Posts: 247
Rep: 
|
deleted
Last edited by Sauerland; 01-02-2024 at 11:12 AM.
|
|
|
01-02-2024, 11:40 PM
|
#10
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Original Poster
Rep: 
|
Quote:
Originally Posted by GlennsPref
The loaded modules are in /lib/modules/6.5.0-0.deb12.4-amd64/kernel/ on my box.
|
"r8152" cannot be found although it has been loaded. See below:
Code:
Matthew_Wai@My-PC:~$ lsmod | grep "r8152"
r8152 245760 0
Matthew_Wai@My-PC:~$ sudo find /lib/modules/$(uname -r)/ -name "8152.*"
[sudo] password for Matthew_Wai:
Verification successful
Matthew_Wai@My-PC:~$ sudo find /usr/lib/modules/$(uname -r)/ -name "8152.*"
Matthew_Wai@My-PC:~$
Quote:
Originally Posted by GlennsPref
If it is really important to get it out of the system, configuring and compiling the kernel sources may be a better fit for your situation.
|
There is misunderstanding.
I don't want to get it out. I want to find out where it is located. I am just curious to know.
|
|
|
01-02-2024, 11:53 PM
|
#11
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Original Poster
Rep: 
|
Quote:
Originally Posted by ___
grep 8152 /boot/config-`uname -r`
CONFIG_USB_RTL8152=? m or y?
|
What does " =m" mean in the following output?
Code:
Matthew_Wai@My-PC:~$ sudo cat /boot/config-$(uname -r)|grep 8152
[sudo] password for Matthew_Wai:
CONFIG_USB_RTL8152=m
Matthew_Wai@My-PC:~$
|
|
|
01-03-2024, 12:41 AM
|
#12
|
Member
Registered: Apr 2023
Distribution: mll,4M
Posts: 257
Rep: 
|
m means module. Not built into kernel. modprobe/insmod would load/unload it.
Your find -name needs a *8.... because it doesn't begin with an 8!
Code:
$ find /usr/lib/modules/$(uname -r)/ -name "*8152.*"
/usr/lib/modules/5.15.0-91-generic/kernel/drivers/net/usb/r8152.ko
That's different than /var/lib/dkms/backport-ethernet/...
(IDK about that but a web-search of "dkms/backport-ethernet" finds your https://www.linuxquestions.org/quest....php?p=6406608)
I'd suggest (after sudo updatedb): locate r8152.ko
Last edited by ___; 01-03-2024 at 12:54 AM.
|
|
1 members found this post helpful.
|
01-03-2024, 02:32 AM
|
#13
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Original Poster
Rep: 
|
Quote:
Originally Posted by ___
Your find -name needs a *8.... because it doesn't begin with an 8!
|
Thank you! I have found it. See below:
Code:
Matthew_Wai@My-PC:~$ lsmod | grep "r8152"
r8152 245760 0
Matthew_Wai@My-PC:~$ sudo find /usr/lib/modules/$(uname -r)/ -name "*8152.*"
[sudo] password for Matthew_Wai:
Verification successful
/usr/lib/modules/5.10.0-amd64-desktop/updates/ethernet-dkms/drivers/net/usb/r8152.ko
Matthew_Wai@My-PC:~$ sudo find /lib/modules/$(uname -r)/ -name "*8152.*"
/lib/modules/5.10.0-amd64-desktop/updates/ethernet-dkms/drivers/net/usb/r8152.ko
Matthew_Wai@My-PC:~$ sudo rmmod r8152
Matthew_Wai@My-PC:~$ lsmod | grep "r8152"
Matthew_Wai@My-PC:~$ sudo find /usr/lib/modules/$(uname -r)/ -name "*8152.*"
/usr/lib/modules/5.10.0-amd64-desktop/updates/ethernet-dkms/drivers/net/usb/r8152.ko
Matthew_Wai@My-PC:~$ sudo find /lib/modules/$(uname -r)/ -name "*8152.*"
/lib/modules/5.10.0-amd64-desktop/updates/ethernet-dkms/drivers/net/usb/r8152.ko
Matthew_Wai@My-PC:~$
|
|
|
01-03-2024, 10:33 AM
|
#14
|
Member
Registered: Jul 2017
Distribution: openSUSE Leap
Posts: 247
Rep: 
|
Code:
/lib/modules/5.10.0-amd64-desktop/updates/ethernet-dkms/drivers/net/usb/r8152.ko
It is installed.
I do not know how you have installed it....... apt?
Delete it with the proper command.
PS
all *.ko in the /lib/modules/xxxxxxxxx/updates directory will be copied on next kernel update to the new directory /lib/modules/yyyyy/weak-updates directory.
Thats why I build the drivers as rpm for openSUSE only for the kernel delivered with the Installation-DVD.
Last edited by Sauerland; 01-03-2024 at 10:40 AM.
|
|
|
01-07-2024, 07:32 AM
|
#15
|
Member
Registered: Jul 2019
Location: China
Distribution: UnionTech OS Desktop Home (64-bit)
Posts: 228
Original Poster
Rep: 
|
Quote:
Originally Posted by Sauerland
I do not know how you have installed it....... apt?
|
I have never installed it.
I booted my PC into a live session, in which the said adapter worked properly, as the driver was already loaded.
|
|
|
All times are GMT -5. The time now is 09:06 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|