Shutdown problem - e1000 driver bug?
Hello:
My Sun Microsystems Ultra24 rig has a problem which up to now I’ve chalked up to a crap BIOS. It happened with the previous (original) version it came with and with this one, which is the latest one available. I'm on Devuan latest: Code:
groucho@devuan:~$ uname -a Code:
[root@devuan groucho]# apt-get update Code:
[root@devuan groucho]# apt-get upgrade Code:
[root@devuan groucho]# Code:
groucho@devuan:~$ inxi -b On shutdown, the rig will do one of three things: 1. shut down properly 2. shut down properly and after about 5s. reboot start reboot and freeze 3. freeze during the shutdown at this point ... Code:
e1000e: EEE Tx LPI Timer This happens ocasionally and I have not been able to reliably reproduce the behaviour, no idea what causes it. It happened when I only had wireless access ie: before I had a wired connection and it also happens now. Unfortunately, there’s no way of disabling the on board e1000e controller (you see, as this Sun MoBo has IME, that would be a no-no). Could it be that (at least part of the issue) is caused by this bug: https://sourceforge.net/p/e1000/mail...ssage/34986431 Apparently it was solved from kernel 3.16.49 on, but the behaviour is very similar. See: https://www.systutorials.com/linux-k...-linux-3-16-49 My power settings (Xfce Power Manager) are: General When power button is pressed: Shutdown When sleep button is pressed: Do nothing When hibernate button is pressed: Do nothing System System sleep mode: Suspend Put sytem to sleep when inactive for: Never This also happened with other distros I have tried before settling with Devuan. Previous owner of the rig used a Gates OS but I don’t think he would have mentioned this anyway. I have not found a way to log what is happening so as to be able to get a better idea of what is happening. I’d appreciate any suggestions you may have as this is a real PITA. Thanks in advance. A. |
Are there any wake-on-lan settings? If so, can you disable them?
|
Hello:
Quote:
System sleep mode is set to 'Never' so I guess it wouldn't matter. Thanks for your input. A. |
For logging it, run acpid with a '-l' option, which logs events to syslog. Don't presume that because you set something up in XFCE, it will happen. XFCE's power manager has the power to screw things up, but never to straighten them out, in my experience.
As for power saving states, S3 = suspend, S5 = hibernate. Sopmething is hibernating and nothing is going off directly. Try booting with the boot parameter "resume=/dev/<your-swap-partition>", & enable hibernate. For power off, run Code:
sudo shutdown -h now |
Hello:
Quote:
Do I add it to the boot string? I expect that if I run it on a terminal it would not survive a reboot. Quote:
But I did not have Xfce's power manager installed and did so before posting to see what was going on. After installing it, I applied the settings I mentioned previously. As part of this even on-going search for a solution, I set the Suspend option in BIOS to S1 (POS), it was previously set at S3 (STR). I have not had another episode since (knock on wood) but that does not mean anything: I've gone for a week or so without one, with me thinking I finally had it tied down and then it reared it's ugly head again. Quote:
Where did it come from? There was nothing set for the system to do that. I've never been a fan of hibernating or any other thing other than a basic S1 suspend. Not even with my netbooks, I simply don't trust it working properly. Comes from my other life when I ran MS OSs. But in any case, my rig is not a portable even though the BIOS IDs the it as one. (!) That's what Oracle dining on Sun Microsystems got us all. 8^| Code:
groucho@devuan:~$ inxi -b Cheers, A. |
Hello:
Just an update. Quote:
So it seems it's not the 'Suspend' setting in BIOS ie: S1 or S3 that can affect this issue. The problem exists with either setting. Cheers, A. |
Hello:
A further update: I've made some headway and managed to configure ACPID -l at boot in etc/default/acpid. Code:
# Options to pass to acpid Code:
Dec 8 18:23:32 devuan acpid: waiting for events: event logging is on Hopefully the entry will tell me what is calling for S5 in a rig that has anything S5 related turned off. I'll have to wait for the next one and see what it is. Cheers, A. |
Quote:
|
Hello:
Quote:
Power Management is set to 'Disabled', Power Button Mode is set to 'On/Off'. As I don't leave my rig on all day (if I'm not using it) day or leave the screen more than 10', I don't think it matters much if my setting is S1 or S3, but I understand your point. Now to see what is wanting to go S5 on me instead of shutting down and why. Where else can I look? Thanks for your input. Cheers, A. |
S5 is actually good, as long as you reboot the same kernel, and everything stands up S5 = off.
|
Hello:
Quote:
I may have made some headway. By looking at the /var/log I found there is a pm-powersave.log, so I checked it for eth0 activity. Sure enough: Code:
groucho@devuan:~$ cat /var/log/pm-powersave.log | grep -i eth0 There's a script somewhere that enables WoL but where? With further searches on the web I found this: https://wiki.archlinux.org/index.php/Wake-on-LAN And in that page I found a very interesting bit: Quote:
Quote:
WRT to the options listed above, #1 won't do as I use USB a lot, #2 is not explicitly an option as my rig is from 2007 and does not have that and with #3, if my rig ever goes into S1 it wakes up with the kb/mouse so it is already enabled. As I do not need or want WoL, I decided that the best was to disable it. Which will also keep the motherboard bug from cropping up. rant It really nags me that it is enabled. Why is it enabled and who enabled it? /rant To check the e1000e driver settings, I used ethtool, which I only now found out about. Code:
[root@devuan groucho]# ethtool eth0 Code:
# ethtool -s interface wol [x] d (disabled) p (PHY activity) u (unicast activity) m (multicast activity) b (broadcast activity) a (ARP activity) g (magic packet activity). <---- this being set by the driver, it is needed for WoL to work. MagicPacket ... Just the name makes me uneasy. To disable it I run the command with the 'd' option: Code:
# ethtool -s eth0 wol d Code:
[root@devuan groucho]# ethtool -s eth0 wol d Code:
[root@devuan groucho]# ethtool eth0 I check the log again and there's no trace of my attempt. The last entry is the same as above: Code:
groucho@devuan:~$ cat /var/log/pm-powersave.log | grep -i eth0 https://serverfault.com/questions/54704/how-to-get-ethtool-wake-on-lan-setting-to-st[quote=link]ick It says: Quote:
Code:
groucho@devuan:~$ cat /etc/network/interfaces So what to do now? Where is the script that enables WoL, as reported by pm-powersave.log? If I could set that to disabled it may be the solution to all this. Thanks in advance, A. |
Quote:
Once acpid is running, The scripts for events should be in /etc/acpi; there's 'events', & 'scripts' which should be two subdirs. It's a "kneebone connected to the thigh bone connected . . " type of thing. Bios events point at scripts which do stuff. |
Hello:
Quote:
And like I mentioned in an earlier post, the Gbe controller is hard wired to 'Enabled'. I think it is related to the IME. Quote:
For whatever reason, now I can (don't have a clue as to why it did not work before) set the e1000e WoL to disabled, but it does not survive a reboot: Code:
[root@devuan groucho]# ethtool eth0 Code:
[root@devuan groucho]# ethtool -s eth0 wol d Code:
[root@devuan groucho]# ethtool eth0 But if it does not survive a reboot it is because it is being set to 'g' again at boot time or at log-in time. Now, the thing is to make it stick, an issue with which I am not alone as the post I linked to previously seems to indicate. After looking at the pm-powersave.log file I looked for scripts that could be working against my intention of shutting down WoL for good, so to speak. And I came across the directory /usr/lib/pm-utils/power.d. Code:
groucho@devuan:~$ ls /usr/lib/pm-utils/power.d Code:
groucho@devuan:~$ cat /usr/lib/pm-utils/power.d/disable_wol That flag (wherever it is located) is now set to 'false'. One thing I could do is simply make the script non-executable and see what happens but for linux/bash literacy's sake, I'd really like to find out just what makes this script tick. ie: where the damn 'false' flag is located. I cannot make heads or tails of this disable_wol script and I have not found anything I could see had 'true' or 'false' in /sys/class/net/. żDoes it say where the flag is? Thanks in advance. Cheers, A. |
Quote:
|
Hello:
Quote:
I don't now if other workstation type rigs have the same setup, but the Sun Microsystems Ultra24 does. Like I've mentioned earlier, I think this is tied to the presence IME on the board. I've shut it down but (as I've read in a few places) it does not and that would be coherent with not being able to disable WoL on this board. Quote:
But I've found a solution, actually a temporary workaround. Searching around, I came across this very informative page: https://wiki.debian.org/WakeOnLan Among other things, it says: "Hardware --- snip --- Recent motherboards with onboard NICs support Wake On LAN without the need for any pins/cables." "Firmware / BIOS In a nice BIOS under power management you will have a clear, intuitive option labeled "Wake On LAN". Unfortunately my system wasn't so clear and has a couple options available." See, you have to have a nice BIOS. Not my case or the OP's. The fellow/s who wrote this up document an issue with how PM-Utils works: "PM-Utils Conflicts The pm-utils package contains scripts that are run on suspend, hibernate and on resume of the system. There is one script, /usr/lib/pmutils/power.d/disable_wol, which sets the configuration for interfaces to only wake on "Magic Packet" (g), regardless of the settings you may have configured in /etc/network/interfaces (or one of the files under /etc/network/interfaces.d, or manually using ethtool or in some other way). Look for lines in the file similar to the following: disable) ethtool -s "${d##*/}" wol d>/dev/null 2>&1;; enable) ethtool -s "${d##*/}" wol g>/dev/null 2>&1;; Obviously, if you have set an interface to Wake on LAN in the event of a unicast packet or "Magic Packet" (ug), then suspend using pm-suspend, for example, this script will set the interface to "Magic Packet" only (g) as part of the suspension process. --- Note: As you can surely gather, this guy does not know how to make the disable_wol script run with a 'true' flag. ie: for different reasons, has the same problem I do. --- You can detect the problem, once you know what you're looking for, by noticing through ethtool after a resume that the "Wake-on" settings for interfaces have been set to "g". A simple fix (that will not interfere with package updates) is to add a file with the same name, disable_wol to the local configuration directory, /etc/pm/power.d/. This overrides the script in /usr/lib/pm-utils/power.d/disable_wol." From this write-up I learned two things: 1. PM-Utils runs the /usr/lib/pmutils/power.d/disable_wol script on suspend/resume/hibernate, everytime. 2. As it is run everytime, it overrides any setting you've put in place previously. I did not have PM-Utils installed in my default Devuan setup and installed it to investigate the shutdown problem as I did not have an interface to check the settings. What I did was copy the /usr/lib/pmutils/power.d/disable_wol script to the local configuration directory, /etc/pm/power.d/ and modified it so that when it is run it will disable WoL whether the flag (wherever it is) is set to 'true' or 'false'. Code:
disable) ethtool -s "${d##*/}" wol d>/dev/null 2>&1;; I could uninstall PM-Utils but the motheorboard bug/WoL combination that caused the reboot on shutdown issue that prompted this thread was already there before I installed it so it is evident that WoL was being set without PM-Utils intervention. I still don't know where the 'true'/'false' setting is. ie: what is telling the disable_wol that the flag is 'false'. Any ideas? Thanks for your input. Cheers, A. |
All times are GMT -5. The time now is 03:07 PM. |