The officially official Devuan Forum!

You are not logged in.

#1 2021-04-23 17:35:56

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Modules, modprobe(.d) and kernel command line

Hello:

Here I am again with another chapter of the e1000e saga.
This particular one regarding module loading how-to.

If interested, here's some background: https://dev1galaxy.org/viewtopic.php?id=4274

From what I have learnt, apart from how the install sets up modules to be loaded, it can be done via modprobe from the command line
eg:

groucho@devuan:~$ sudo modprobe e1000e

Also, module configuration parameters can be added by adding a proper stanza to the kerneo command line:

groucho@devuan:~$ sudo dmesg
--- snip ---
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-16-amd64 root=UUID=d6841f29-e39b-4c87-9c52-3a9c3bafe2d3 ro e1000e.EEE=0 .....
--- snip ---
groucho@devuan:~$

... or by adding a *.conf file in /etc/modprobe.d:

eg:

groucho@devuan:~$ echo "options e1000e EEE=0" | sudo tee /etc/modprobe.d/e1000e.conf
groucho@devuan:~$ cat /etc/modprobe.d/e1000e.conf
options e1000e EEE=0
groucho@devuan:~$

I don't know if there's more to this, but that's what I have an idea about.

Now, let's see what's happening with my nemesis, the e1000e module:

If I add the e1000e.EEE=0 stanza to the kernel command line, I get this line in dmesg:

groucho@devuan:~$ sudo dmesg | grep e1000e
--- snip ---
[    2.158949] e1000e: unknown parameter 'EEE' ignored
[    2.237022] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    2.257549] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
--- snip ---
groucho@devuan:~$

Curiously enough, calling the wrong module ie: igb.EEE=0 does not generate a message of any sort.
Right.

As the kernel command line trick obviously does not work, I tried using the *.conf above.   
As a result, I get this line in dmesg:

groucho@devuan:~$ sudo dmesg | grep e1000e
--- snip ---
[    2.166788] e1000e: unknown parameter 'EEE' ignored
[    2.227702] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    2.241841] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
--- snip ---
groucho@devuan:~$

Clearly the e1000e module exists and is accessed (as far as the kernel is concerned), but does not accept the EEE parameter.

The last option I have is trying with modprobe.   

1. see if it is loaded

groucho@devuan:~$ lsmod | grep -i e1000e
e1000e                282624  0
groucho@devuan:~$ 

2. unload it and check

[root@devuan groucho]# rmmod e1000e
[root@devuan groucho]# lsmod | grep e1000e
[root@devuan groucho]# 

3. load it again with the required parameter

[root@devuan groucho]# modprobe -v e1000e EEE=0
insmod /lib/modules/4.19.0-16-amd64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko EEE=0
[root@devuan groucho]# 

Ahh ...
So now the unknown parameter is known?

Q: If it was unknown, wouldn't the -v have made modprobe print something to that effect?

man modprobe wrote:

-v, --verbose
      Print messages about what the program is doing. Usually modprobe only prints messages if something goes wrong.

It seems that the e1000e module has EEE enabled by default.
See https://access.redhat.com/documentation … t_Ethernet

Not only does it seem impossible to disable it via the usual methods: ethtool cannot query or access EEE settings because the e1000e does not support it.

No idea as to how to go about this, this EEE is probably the source of my bad shutdowns but if I can't reliably turn it off, it not possible to know.
ie: if I can't query the controller, how can I know?

A different driver, more up to date from Intel? IBM? RedHat?
A backport from Chimaera?

Any ideas would be welcome.

Best,

A.

Offline

#2 2021-04-23 18:08:15

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Modules, modprobe(.d) and kernel command line

Check for the available module parameters:

ls /sys/module/e1000e/parameters

Official documentation here: https://www.kernel.org/doc/html/v4.19/n … e1000.html

Altoid wrote:

So now the unknown parameter is known?

No:

$ doas modprobe -v e1000e madeup_nonsense=1                               
insmod /lib/modules/5.11.16-zen1-1-zen/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.xz madeup_nonsense=1
$

Brianna Ghey — Rest In Power

Offline

#3 2021-04-23 19:01:36

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Modules, modprobe(.d) and kernel command line

Hello:

Head_on_a_Stick wrote:

... available module parameters:

ls /sys/module/e1000e/parameters
groucho@devuan:~$ ls /sys/module/e1000e/parameters
copybreak
groucho@devuan:~$ cat /sys/module/e1000e/parameters/copybreak
256
groucho@devuan:~$ 
Head_on_a_Stick wrote:

Hmm ...
I think this is the e1000 driver but the 82566DM-2 controller uses the e1000e driver.
At least in my Devuan it loads the e1000e module.

groucho@devuan:~$ sudo ethtool -i eth0
driver: e1000e             <---- | x |
version: 3.2.6-k
firmware-version: 1.4-0
expansion-rom-version: 
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
groucho@devuan:~$ 

See https://downloadmirror.intel.com/15817/eng/readme.txt

Head_on_a_Stick wrote:

No:

$ doas modprobe -v e1000e madeup_nonsense=1                               
insmod /lib/modules/5.11.16-zen1-1-zen/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.xz madeup_nonsense=1
$

Ah ...
Thanks for the heads up, good to know.
No error for madeup_nonsense=1 then?

Thanks for your input.

Best,

A.

Offline

#4 2021-04-23 19:08:27

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Modules, modprobe(.d) and kernel command line

Altoid wrote:

I think this is the e1000 driver but the 82566DM-2 controller uses the e1000e driver.

Oh yes, sorry, my mistake. The 4.19 kernel documentation doesn't seem to have a section for the e1000e module, or at least not that I can find.

Here's the page for my 5.11 kernel: https://www.kernel.org/doc/html/v5.11/n … 1000e.html

You can also use the modinfo command.

Altoid wrote:

No error for madeup_nonsense=1 then?

The error message is printed to the kernel ring buffer rather than stdout or stderr:

 $ doas dmesg | grep e1000e
[13821.559641] e1000e: unknown parameter 'EEE' ignored
[13821.559729] e1000e: Intel(R) PRO/1000 Network Driver
[13821.559730] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[13922.922522] e1000e: unknown parameter 'madeup_nonsense' ignored
[13922.922575] e1000e: Intel(R) PRO/1000 Network Driver
[13922.922575] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
$

Brianna Ghey — Rest In Power

Offline

#5 2021-04-23 20:52:05

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Modules, modprobe(.d) and kernel command line

Head_on_a_Stick wrote:

... sorry, my mistake.

Don't worry.  8^D

Head_on_a_Stick wrote:

... 4.19 kernel documentation doesn't seem to have a section for the e1000e module ...

I found this:

https://www.kernel.org/doc/html/v5.2/ne … 1000e.html

The e1000 driver is no longer maintained by Intel and is integrated into the kernel.
Not the case with e1000e up to now. (?)

See: https://www.intel.com/content/www/us/en … ducts.html

Intel Support wrote:

Note
The e1000 driver is no longer maintained as a standalone component. Request support from the maintainer of your Linux* distribution.

and

The Linux* e1000e driver supports the Intel® PRO/1000 PCI-E (82563/6/7, 82571/2/3/4/7/8/9, or 82583) I217/I218/I219 based gigabit network adapters.
--- snip ---
The drivers are only supported as a loadable module. We don't supply patches against the kernel source to allow for static linking of the drivers.

https://downloadmirror.intel.com/15817/eng/readme.txt

Head_on_a_Stick wrote:

You can also use the modinfo command.

I don't think it will make any difference.
The thing is that there are many sources on the web explaining that e1000e.EEE=0 is what is used to turn off the %&$# EEE.

Head_on_a_Stick wrote:

... error message is printed to the kernel ring buffer rather than stdout or stderr ...

I see ...

Edit:
Reading some more, I found a parameter called SmartPowerDownEnable:

SmartPowerDownEnable
Valid Range:    0,1
Default Value:    0 (disabled)

Allows the PHY to turn off in lower power states. The user can turn off this parameter in supported chipsets.

Just for the fun of it ...

[root@devuan groucho]# rmmod e1000e
[root@devuan groucho]# modprobe -v e1000e SmartPowerDownEnable=0
insmod /lib/modules/4.19.0-16-amd64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko SmartPowerDownEnable=0
[root@devuan groucho]# 
groucho@devuan:~$ sudo dmesg
--- snip ---
1972.926673] e1000e: eth0 NIC Link is Down
[ 2004.654613] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 2004.654617] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 2004.654790] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 2004.654793] e1000e 0000:00:19.0: PHY Smart Power Down Disabled
[ 2004.967316] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:14:4f:4a:a2:81
[ 2004.967321] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[ 2004.967388] e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 6, PBA No: FFFFFF-0FF
[ 2007.811375] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
[ 2007.811486] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
groucho@devuan:~$ 

It works ...
But I'm not too enthusiastic about this one because I don't know exactly what it is or how close it is to EEE - or not.
In any case, default is 0 ie: disabled.

What do you think?

Thanks for your input.

Best,

A.

Offline

#6 2021-04-23 21:18:16

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Modules, modprobe(.d) and kernel command line

https://downloadmirror.intel.com/15817/eng/readme.txt wrote:

- EEE is not supported on all Intel(R) Ethernet Network devices or at all link speeds.

Check

# ethtool --show-eee eth0

Brianna Ghey — Rest In Power

Offline

#7 2021-04-23 21:51:49

Altoid
Member
Registered: 2017-05-07
Posts: 1,592  

Re: Modules, modprobe(.d) and kernel command line

Hello:

Head_on_a_Stick wrote:

Check

# ethtool --show-eee eth0

Yes, I'm aware than it is not supported in every NIC.

But if in this box I get this ...

groucho@devuan:~$ sudo ethtool --show-eee eth0
[sudo] password for groucho: 
Cannot get EEE settings: Operation not supported
groucho@devuan:~$ 

... while at the same time, at every instance of a bad shutdown I get this:

Devuan GNU/Linux 3 devuan tty1
devuan login: [   286.719428] e1000e: eth0 NIC Link is Down
--- snip ---
[287.219230] e1000e: EEE TX LPI TIMER: 00000000              <-------------- | x |
[287.223022] ACPI: Preparing to enter sleep state S5
[287.223551] reboot: Power down

... it is clear (to me) that this is a NIC that does support EEE.
At the same time, access to both the EEE status and settings via ethtool is disabled in the e1000e driver.

But I think I am (?) getting somewhere:

I now tried this:

[root@devuan groucho]# echo "options e1000e SmartPowerDownEnable=0" | sudo tee /etc/modprobe.d/e1000e.conf
groucho@devuan:~$ cat /etc/modprobe.d/e1000e.conf
options e1000e SmartPowerDownEnable=0
groucho@devuan:~$ 

An update-initramfs -u -k all and a reboot later ...

groucho@devuan:~$ sudo dmesg | grep e1000e
--- snip ---
[    2.147204] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    2.158309] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    2.169606] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[    2.180672] e1000e 0000:00:19.0: PHY Smart Power Down Disabled           <-----  | x |
[    2.603166] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:14:4f:4a:a2:81
[    2.616729] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[    2.637607] e1000e 0000:00:19.0 eth0: MAC: 7, PHY: 6, PBA No: FFFFFF-0FF
[   27.495860] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
[   27.507904] e1000e 0000:00:19.0 eth0: 10/100 speed: disabling TSO
--- snip ---
groucho@devuan:~$ 

The tty1 on a plain sudo shutdown -h now instead the one I've been using sync && sudo ethtool -s eth0 wol d && sudo rmmod -s -v e1000e && sudo shutdown -h now shows no trace of the EEE TX LPI TIMER: 00000000 (have to check with a video grab)*.

If that is so, I'll start using the plain unedited shutdown script I  was using ie: sync && sudo shutdown -h now and wait to see if I get another bad shutdown.

Hopefully, I won't.  8^/

* Unfortunately, I can confirm that disabling SmartPowerDownEnable does not do much with/to EEE.

The tty1 output when shutting down with sync && sudo shutdown -h now shows the line e1000e: EEE TX LPI TIMER: 00000000, which unless I am mistaken, is telling me that EEE is still active.

Which is precisely what I want to avoid.  8^7

Devuan GNU/Linux 3 devuan tty1
devuan login: [        ] e1000e: eth0 NIC Link is Down
[        ] EXT-fs (sdb1): re-mounted. Opts: (null)
[        ] kvm: exiting hardware virtualization
[        ] sd 7:0:3:0: [sdf] Syncronizing SCSI cache
[        ] sd 7:0:2:0: [sde] Syncronizing SCSI cache
[        ] sd 5:0:0:0: [sdb] Syncronizing SCSI cache
[        ] sd 5:0:0:0: [sdb] Stopping disk
[        ] sd 4:0:0:0: [sda] Syncronizing SCSI cache
[        ] sd 4:0:0:0: [sda] Stopping disk
[        ] e1000e: EEE TX LPI TIMER: 00000000    <--------- | x |
[        ] ACPI: Preparing to enter sleep state S5
[        ] reboot: Power down

Thanks for your input.

Best,

A.

Last edited by Altoid (2021-04-23 22:35:36)

Offline

Board footer