You are not logged in.
[ 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! It is enabled for all by default. Hooray for *****. I will check your findings, when I get some time.
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.
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. Two wrongs get one right.
No need to be sorry, I am used to source code too much. 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
Better check my example above, no hand editing necessary, no VCS. :-) You just download your driver, patch and compile.
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$
Hmm ...
/* Currently only supported on 82579 and newer */ -> the 82566DM-2 is an older NIC.
Yeah, and noone took a look. Could not resist to answer to this one.
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.
Well, I guess there are others with e1000e fun issues. Good, if they find our posts.
Just try to apply the patch. If it fails, I check again. It is fun to read source looking for such issues.
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.
My patch explicitly sets the eee_disable flag to true as default.
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. 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.
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.
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....
/**
* 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
And another root cause of misbehaving intel NICs wrt EEE are (old!) CAT5 network cables.
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.
But yeah, its kind of energy savings feature, which is not always necessary.
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.
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?
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.
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. It is best to avoid that chipset....
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".
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*
linux-image-5.10.0-0.bpo.4-amd64 5.10.19-1~bpo10+1
http://deb.devuan.org/merged beowulf-backports/main amd64
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.
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.
dhcpcd 9.4.0, dhcpcd-gtk 0.7.8 and openresolv 3.12.0
Support Linux WiFi roaming
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!
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.
If you need a patch from cgit web frontend, see:
https://roy.marples.name/cgit/dhcpcd.gi … cpcd-9.3.3
https://roy.marples.name/cgit/dhcpcd-ui … d-ui-0.7.7
Roy likes to add fixes just after release.