The officially official Devuan Forum!

You are not logged in.

#51 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-29 15:57:56

Altoid wrote:

[    2.254057] e1000e 0000:00:19.0: EEE Support was initialized to be enabled
[    2.276187] e1000e 0000:00:19.0: EEE Support has been reset to be disabled

What I hoped for! big_smile It is enabled for all by default. Hooray for *****. I will check your findings, when I get some time.

#52 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-29 06:16:00

Well, you try to apply the patch in the sub directory src. As you see in the patch, it wants to patch src/param.c. So a ls -l src/param.c should return a valid file. Otherwise you are in a wrong directory, as said before and shown in my example which path to cd to. ;-)

JFYI, the code block of my example commands to execute is scrollable. I do not like it to be scrollable, because people may oversee it is actually sctrollable and that there is more than you see at first sight. In Gentoo forums, the code blocks are not scrollable and all is shown. Far better. big_smile

Edit
And if you enter sub directory to apply a patch, patch pararmeter -p0 turns into -p1 to tell patch to remove the sub directory. File src/param.c turns with -p1 to file param.c to be patched. cool Two wrongs get one right.

#53 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 21:05:35

No need to be sorry, I am used to source code too much. big_smile I am using Gentoo, its just so natural to patch on issues. And I usually keep my explanation short and too short. Just ask, if something is unclear.

I made another patch that hopefully compiles and prints the state of EEE Support, enabled or disabled, on module initialization, which you can see with dmesg then.
Patch: https://geki.selfhost.eu/hacks/e1000e_3 … bled.patch

#54 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 18:37:59

Better check my example above, no hand editing necessary, no VCS. :-) You just download your driver, patch and compile.

#55 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 18:31:33

And here are the steps to unapply(-R) and appy the patch. You just need to apply, obviously.

die@deiwl:~$ cd Downloads/e1000e-3.8.4/
die@deiwl:~/Downloads/e1000e-3.8.4$ cat e1000e_384_param_eee_be_disabled.patch 
--- src/param.c	2021-04-27 23:48:45.280682963 +0200
+++ src/param.c	2021-04-28 00:03:09.596756791 +0200
@@ -540,17 +540,17 @@
 			.type = enable_option,
 			.name = "EEE Support",
 			.err  = "defaulting to Enabled (100T/1000T full)",
-			.def  = OPTION_ENABLED
+			.def  = OPTION_DISABLED
 		};
 
+		hw->dev_spec.ich8lan.eee_disable = !opt.def;
+
 		if (adapter->flags2 & FLAG2_HAS_EEE) {
 			/* Currently only supported on 82579 and newer */
 			if (num_EEE > bd) {
 				unsigned int eee = EEE[bd];
 				e1000_validate_option(&eee, &opt, adapter);
 				hw->dev_spec.ich8lan.eee_disable = !eee;
-			} else {
-				hw->dev_spec.ich8lan.eee_disable = !opt.def;
 			}
 		}
 	}
die@deiwl:~/Downloads/e1000e-3.8.4$ rm src/param.c.orig 
die@deiwl:~/Downloads/e1000e-3.8.4$ patch -p0 --dry-run -i e1000e_384_param_eee_be_disabled.patch 
checking file src/param.c
Reversed (or previously applied) patch detected!  Assume -R? [n] ^C
die@deiwl:~/Downloads/e1000e-3.8.4$ patch -p0 -R --dry-run -i e1000e_384_param_eee_be_disabled.patch 
checking file src/param.c
die@deiwl:~/Downloads/e1000e-3.8.4$ patch -p0 -R -i e1000e_384_param_eee_be_disabled.patch 
patching file src/param.c
die@deiwl:~/Downloads/e1000e-3.8.4$ patch -p0 --dry-run -i e1000e_384_param_eee_be_disabled.patch 
checking file src/param.c
die@deiwl:~/Downloads/e1000e-3.8.4$ patch -p0 -i e1000e_384_param_eee_be_disabled.patch 
patching file src/param.c
die@deiwl:~/Downloads/e1000e-3.8.4$ grep -C 10 FLAG2_HAS_EEE src/param.c 
	{
		static const struct e1000_option opt = {
			.type = enable_option,
			.name = "EEE Support",
			.err  = "defaulting to Enabled (100T/1000T full)",
			.def  = OPTION_DISABLED
		};

		hw->dev_spec.ich8lan.eee_disable = !opt.def;

		if (adapter->flags2 & FLAG2_HAS_EEE) {
			/* Currently only supported on 82579 and newer */
			if (num_EEE > bd) {
				unsigned int eee = EEE[bd];
				e1000_validate_option(&eee, &opt, adapter);
				hw->dev_spec.ich8lan.eee_disable = !eee;
			}
		}
	}
	/* configure node specific allocation */
	{
die@deiwl:~/Downloads/e1000e-3.8.4$

#56 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 18:13:49

Altoid wrote:

Hmm ...
/* Currently only supported on 82579 and newer */  -> the 82566DM-2 is an older NIC.

Yeah, and noone took a look. big_smile Could not resist to answer to this one.

#57 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 14:01:27

Yeah, bad description of me. You have to patch the source. ;-)

Like you see in the .rej file - we want to patch the source file: src/param.c.

If you are asked to enter file name when patching, either the path you are in or the '-pN' parameter to patch is wrong. Or the patch is not for your source code. Ctrl-C helps to escape. If you enter the patch command I posted earlier, it should not ask you anything. To test the patch you can do patch -p0 --dry-run -i /path/to/patchfile. The --dry-run saves you from corrupting sourcecode by a bad patch, especially if the patch is big. And to be pedantic, wary or cautious, add --fuzz 0, so that no accompanying lines of code around the changed lines differ.

#58 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 11:44:53

Well, I guess there are others with e1000e fun issues. Good, if they find our posts.

#59 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-28 06:31:54

Just try to apply the patch. If it fails, I check again. It is fun to read source looking for such issues. big_smile

Yes, since that eee_disable flag has any value which is in memory at that position, it was true in the old times by sheer luck? Any memory value != 0 at that location is true in that case. And now, with kernel hardening, like default struct values initialization to zero, EEE is on for all e1000e PHY, even if the hardware has no EEE. Well, just some wild guess-work. big_smile

My patch explicitly sets the eee_disable flag to true as default.

#60 Re: Installation » Linux e1000e module removal and e1000e EEE timer - Part II » 2021-04-27 22:10:35

I read the source of the intel out-of-tree module. Looks a bit more development went into that than in the one in linux source. Good to use that one. ethtool cannot query because I guess it is incompatible with the out-of-tree module. No need to, if you can read the source. smile Another fun fact. The eee_disable flag seems to be initialized, only if FLAG2_HAS_EEE is set, which is not for your device AFAIS and AFAIUI. So you setting EEE=0 does nothing at all. And that smart shut down thing is disabled by default AFAIS.

I will add a patch soon, so that the eee_disable flag is being initialized, and default be disabled, since most PHY have no FLAG2_HAS_EEE feature, e heh.

Patch: https://geki.selfhost.eu/hacks/e1000e_3 … bled.patch
Apply: cd /path/to/driver/source/ && patch -p0 -i /path/to/e1000e_384_param_eee_be_disabled.patch

I wonder if that helps.

#61 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-27 11:32:49

Well the same function should be in the driver you compiled yourself and comment that line out there and recompile. I wonder if that EEE timer has anything to do with the bad shutdown. Though, I may be wrong. smile

#62 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-26 22:17:46

I continue posting my findings here. :-)

Looking at [0], there is just one e1000e device/phy/whatever type of many supporting ethtool EEE queries. Bad luck for you. Looking at [1], I guess you need to compile your favorite kernel version and comment out one line, to see if that helps. The call to e1000e_igp3_phy_powerdown_workaround_ich8lan in drivers/net/ethernet/intel/e1000e/ich8lan.c. Maybe your hardware hangs there, who knows. Maybe is no good on your hardware? Trial and error....

e1000e_igp3_phy_powerdown_workaround_ich8lan wrote:

/**
*  e1000_ipg3_phy_powerdown_workaround_ich8lan - Power down workaround on D3
*  @hw: pointer to the HW structure
*
*  Workaround for 82566 power-down on D3 entry:
*    1) disable gigabit link
*    2) write VR power-down enable
*    3) read it back
*  Continue if successful, else issue LCD reset and repeat
**/

[0] https://github.com/torvalds/linux/searc … G2_HAS_EEE
[1] https://github.com/torvalds/linux/searc … nd_ich8lan

#63 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-21 06:14:52

And another root cause of misbehaving intel NICs wrt EEE are (old!) CAT5 network cables. big_smile roll If you want, try with CAT6/7 (S)FTP cable, if you got such old cable. That solved the EEE issues with some, though, I wonder...

e1000e EEE driver part seems to need to "see" some link layer state and with old cables somehow gets it wrong and enters some bogus state, so that it cannot shutdown properly in your case?! That would be crazy, but I have seen all kind of things already. Always worth to try. yikes

But yeah, its kind of energy savings feature, which is not always necessary. smile

#64 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-20 06:22:23

Altoid wrote:

But the last information you would get would be the tty1 output, ...

I wonder, the above-mentioned link says something different AFAIUI. But it seems to be the best to use the latest kernel with its newest e1000e driver and hope for the best. roll

#65 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-19 21:47:18

Hmm, on a second thought. For embedded hardware, there is this kernel (early) log piped to serial line feature. To debug early errors. I wonder if that feature works for shutdown, too?! To debug late errors? Never actually used that feature. At some point mounts are ro, right, and gfx stops updates to monitor. Is there some kernel commandline to activate that for debian kernels?

See: https://kernelnewbies.org/Linux_Kernel_ … e_Chapter3

#66 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-19 17:25:52

The next step is to see kernel log of the shutdown. Dunno, if it needs to be configured to generate them. You could check /var/log/kern.log*, if there is a kernel oops or such.

#67 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 21:43:48

I have aided someone else with e1000e issues a decade ago, or so, on the gentoo forums. That one actually worked then with the e1000e linux developer back then. The linux developer of the e1000e actually did not own the hardware, IIRC. The e1000e linux driver thrashed its MAC Address in its early days, IIRC. big_smile It is best to avoid that chipset....

#68 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 21:30:08

Altoid wrote:

I fail to understand why e1000e: EEE TX LPI TIMER: 00000000 is still there at shutdown if the module had been previously removed.

That is the nature of "My 2 cents: Delayed work is quite dangerous indeed. "

They delay the work item of the watchdog timer for that device. The device is unloaded. Then the watchdog tries to process the work item and instead of crashing or invalidating, it hangs waiting for the device, which is no longer there and therefore cannot answer, to answer. I am not involved there. Just the symptoms from the far.

And this is what they reverted, not to push delayed work items but process directly or otherwise "simpler".

#69 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 21:26:48

That c19 refers to patch from c11. The important patch is referenced in c33 and c55, which went in upstream kernel 5.5. That one seems to undo a major regression wrt the watchog timer handling. So, if you can, you should test kernel 5.5 or newer from beowulf-backports. I may have overseen, that you tested that kernel versions already.... See: https://pkginfo.devuan.org/cgi-bin/poli … mage-5.10*

example wrote:

linux-image-5.10.0-0.bpo.4-amd64 5.10.19-1~bpo10+1
http://deb.devuan.org/merged beowulf-backports/main amd64

#70 Re: Installation » Linux e1000e module removal and e1000e EEE timer » 2021-04-18 17:01:19

Well, I guess you know, but for reference. There is an open linux kernel bug[0] for the e1000e watchdog timer. And a patch included in 5.5.0. Did you test that Kernel already? Otherwise 4.19 still seems to need a reworked patch.

My 2 cents: Delayed work is quite dangerous indeed. big_smile

[0] https://bugzilla.kernel.org/show_bug.cgi?id=205047

#71 Re: DIY » Packaging latest dhcpcd, dhcpcd-gtk and openresolv for Beowulf » 2020-12-29 20:11:58

Remember, if you move from resolvconf to openresolv, purge resolvconf apt-get purge resolvconf to delete init script; and stop it from emitting errors on boot and shutdown.

#72 Re: DIY » Packaging latest dhcpcd, dhcpcd-gtk and openresolv for Beowulf » 2020-12-29 20:06:15

dhcpcd 9.4.0, dhcpcd-gtk 0.7.8 and openresolv 3.12.0

  • Support Linux WiFi roaming

#73 DIY » Packaging latest dhcpcd, dhcpcd-gtk and openresolv for Beowulf » 2020-12-29 20:04:44

geki
Replies: 3

Well, yeah, I am used to dhcpcd from Gentoo and I just like it - distro-independent network foo. These packages are built on my Devuan Beowulf system.

    https://geki.selfhost.eu/files/devuan/

Changes of dhcpcd

  • Disabled PRIVSEP feature.

  • Set proper RUNDIR path.

  • Add latest fixes from git HEAD, if necessary or requested.

Changes of dhcpcd-ui

  • Gtk 3 dependency.

Have fun! big_smile

#74 Re: DIY » Packaged dhcpcd 9.3.3 and dhcpcd-gtk 0.7.7 for Beowulf » 2020-12-07 19:51:37

Well, since I cannot update first post's title, let's write some replies.

Packaged dhcpcd 9.3.4 and dhcpcd-ui HEAD. Latter has quite low development activities and works.

Board footer

Forum Software