Bug 1217652 - yast2 lan does not show the proper kernel modules
Summary: yast2 lan does not show the proper kernel modules
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Leap 15.5
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-29 11:17 UTC by Stephan Hemeier
Modified: 2024-01-05 16:30 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Hemeier 2023-11-29 11:17:47 UTC
I have the following error.

I build some Network kmps with my uefi cert.

The are loaded and the Kernel modules are blacklisted.

f.e. r8168
S  | Name                  | Type  | Version                                | Arch   | Repository
---+-----------------------+-------+----------------------------------------+--------+--------------
i+ | r8168-blacklist-r8169 | Paket | 8.052.01-lp155.65.1                    | x86_64 | Sauerland-OSS
i+ | r8168-kmp-default     | Paket | 8.052.01_k5.14.21_150500.53-lp155.65.1 | x86_64 | Sauerland-OSS
i+ | r8168-ueficert        | Paket | 8.052.01-lp155.65.1                    | x86_64 | Sauerland-OSS

My OBS:
https://build.opensuse.org/package/show/home:Sauerland/r8168

hwinfo --netcard
19: PCI 500.0: 0200 Ethernet controller                         
  [Created at pci.386]
  Unique ID: rBUF.eyqrN5GWcA7
  Parent ID: 0Rrv.A9So_BltpS4
  SysFS ID: /devices/pci0000:00/0000:00:1c.7/0000:05:00.0
  SysFS BusID: 0000:05:00.0
  Hardware Class: network
  Model: "Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
  Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd."
  Device: pci 0x8168 "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x8677 "PRIME B450M-A Motherboard"
  Revision: 0x15
  Driver: "r8168"
  Driver Modules: "r8168"
  Device File: eth0
  I/O Ports: 0xd000-0xdfff (rw)
  Memory Range: 0xf7504000-0xf7504fff (rw,non-prefetchable)
  Memory Range: 0xf7500000-0xf7503fff (rw,non-prefetchable)
  IRQ: 19 (no events)
  HW Address: 10:7b:44:4a:5a:16
  Permanent HW Address: 10:7b:44:4a:5a:16
  Link detected: yes
  Module Alias: "pci:v000010ECd00008168sv00001043sd00008677bc02sc00i00"
  Driver Info #0:
    Driver Status: r8169 is not active
    Driver Activation Cmd: "modprobe r8169"
  Driver Info #1:
    Driver Status: r8168 is active
    Driver Activation Cmd: "modprobe r8168"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #12 (PCI bridge)

lsmod | grep r816
r8168                 593920  0

Its working here but yast2 lan shows on the Hardware tab of the netcard:

https://paste.opensuse.org/pastes/8d66be3c4842

only auto and r8169 which is blacklisted and not loaded (see lsmod)

yast2 lan log:
https://paste.opensuse.org/pastes/5882ef97537e

Same also with broadcom-wl

It has worked before but now not anymore.

Stephan
Comment 1 Stefan Hundhammer 2023-11-29 12:12:08 UTC
I guess yast2-network uses an agent based on libhd. I am not sure if it's enough that the kernel modules are suddenly available; it might also need a rebuilt libd (hardware detection, the basis of the 'hwinfo' command; part of package 'hwinfo').
Comment 2 Stefan Hundhammer 2023-11-29 12:12:32 UTC
'libhd', of course.
Comment 3 Stefan Hundhammer 2023-11-29 12:13:08 UTC
Steffen, any input from your side?
Comment 4 Stefan Hundhammer 2023-11-29 12:21:24 UTC
Michal, Knut?
Comment 5 Steffen Winterfeldt 2023-12-11 13:14:14 UTC
hwinfo just presents the kernel module info; it does not check any modprobe
configuration files. So whether or not a module is blacklisted does not matter.

What yast makes of this, I've no idea.
Comment 6 Steffen Winterfeldt 2023-12-11 13:29:10 UTC
> I am not sure if it's enough that the kernel modules are suddenly available;
> it might also need a rebuilt libd

To be clear: hwinfo parses modules.alias from the running kernel. An
explicit database update is not needed.
Comment 7 Stephan Hemeier 2023-12-11 13:59:25 UTC
I think, hwinfo is not the problem as you can see in my first post.

It shows both modules and also shows the active ones.

> Driver Info #0:
>    Driver Status: r8169 is not active
>    Driver Activation Cmd: "modprobe r8169"
>  Driver Info #1:
>    Driver Status: r8168 is active
>    Driver Activation Cmd: "modprobe r8168"

But yast2 lan (networksettings) shows only r81689 or automatic.
r8168 is missing.

Same if I install broadcom-wl, only bcma is available (but is not the proper one for my Card), wl is missing.

Stephan
Comment 8 Stephan Hemeier 2023-12-11 14:00:41 UTC
I think, hwinfo is not the problem as you can see in my first post.

It shows both modules and also shows the active ones.

> Driver Info #0:
>    Driver Status: r8169 is not active
>    Driver Activation Cmd: "modprobe r8169"
>  Driver Info #1:
>    Driver Status: r8168 is active
>    Driver Activation Cmd: "modprobe r8168"

But yast2 lan (networksettings) shows only r8169 or automatic.
r8168 is missing.

Same if I install broadcom-wl, only bcma is available (but is not the proper one for my Card), wl is missing.

Stephan
Comment 9 Stefan Hundhammer 2023-12-12 16:10:42 UTC
I narrowed it down to this code:

https://github.com/yast/yast-network/blob/master/src/lib/y2network/hwinfo.rb#L232-L238


    def drivers
      driver = @hwinfo.fetch("drivers", []).first
      return [] unless driver

      modules = driver.fetch("modules", [])
      modules.map { |m| Driver.new(*m) }
    end


I am not sure if that '.first' is significant here.
Comment 10 Stefan Hundhammer 2023-12-12 16:13:35 UTC
Knut, Michal?
Comment 11 Knut Alejandro Anderssen González 2023-12-13 10:13:13 UTC
(In reply to Stefan Hundhammer from comment #9)
> I narrowed it down to this code:
> 
> https://github.com/yast/yast-network/blob/master/src/lib/y2network/hwinfo.
> rb#L232-L238
> 
> 
>     def drivers
>       driver = @hwinfo.fetch("drivers", []).first
>       return [] unless driver
> 
>       modules = driver.fetch("modules", [])
>       modules.map { |m| Driver.new(*m) }
>     end
> 
> 
> I am not sure if that '.first' is significant here.

I will take a look, it looks like a clear candidate to be fixed / checked as it should select the active one instead of the first one.
Comment 12 Knut Alejandro Anderssen González 2023-12-13 12:22:16 UTC
(In reply to Stephan Hemeier from comment #8)
> I think, hwinfo is not the problem as you can see in my first post.
> 
> It shows both modules and also shows the active ones.
> 
> > Driver Info #0:
> >    Driver Status: r8169 is not active
> >    Driver Activation Cmd: "modprobe r8169"
> >  Driver Info #1:
> >    Driver Status: r8168 is active
> >    Driver Activation Cmd: "modprobe r8168"
> 
> But yast2 lan (networksettings) shows only r8169 or automatic.
> r8168 is missing.
> 
> Same if I install broadcom-wl, only bcma is available (but is not the proper
> one for my Card), wl is missing.
> 
> Stephan

It should be fixed by:

https://github.com/yast/yast-network/pull/1347
Comment 13 Stefan Hundhammer 2023-12-13 13:32:12 UTC
Thanks, Knut!


The fix should arrive in Leap 15.5 / SLE-15 SP5 as yast2-network-4.5.22.
Comment 17 Stephan Hemeier 2023-12-21 18:47:45 UTC
Excuse for the late answer.

Thanks for your fix, now I can see my drivers as before.

Stephan
Comment 18 Maintenance Automation 2024-01-05 16:30:06 UTC
SUSE-RU-2024:0040-1: An update that has one fix can now be installed.

Category: recommended (moderate)
Bug References: 1217652
Sources used:
SUSE Linux Enterprise High Performance Computing 15 SP5 (src): yast2-network-4.5.22-150500.3.8.1
SUSE Linux Enterprise Server 15 SP5 (src): yast2-network-4.5.22-150500.3.8.1
SUSE Linux Enterprise Server for SAP Applications 15 SP5 (src): yast2-network-4.5.22-150500.3.8.1
SUSE Linux Enterprise Desktop 15 SP5 (src): yast2-network-4.5.22-150500.3.8.1
Basesystem Module 15-SP5 (src): yast2-network-4.5.22-150500.3.8.1
openSUSE Leap 15.5 (src): yast2-network-4.5.22-150500.3.8.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.