Asus-E200HA-Linux-Post-Install-Script icon indicating copy to clipboard operation
Asus-E200HA-Linux-Post-Install-Script copied to clipboard

PC freezes anyone? [Possible workaround]

Open matt32106 opened this issue 7 years ago • 11 comments

Hello, i have started using my Asus (as opposed to testing). I have discovered that i now have total system freezes at random intervals. I have checked this while the resource monitor was working and CPU and memory were at ~ 50% use, no swap. After some googling, it seems that one possible workaround would be to set intel_idle.max_cstate=1 at kernel start.

EDIT: check the end of this thread, this workaround did not work

Is it supposed to work with this processor? any idea about the consequences? And will Grippentech's kernel be updated anytime soon?

Thanks

matt32106 avatar Nov 05 '17 12:11 matt32106

Hey Matt,

I'm not sure if that line would help or not.... could always try. It's safe to run since it's just part of your Grub config and you can always delete that line if it breaks anything or otherwise just boot from USB and edit your grub config file and rebuild it.

If you're curious about what cstates are you can read more about them here: https://software.intel.com/en-us/articles/power-management-states-p-states-c-states-and-package-c-states#_Toc383778910

I was under the impression that the last version of the kernel fixed that issue as I ran into it in older versions.

That being said I don't have plans to do a new build unless Takashi Iwai (the actual developer who's kernels I'm just trying to make more available) says there's significant changes that are worth actually going through the effort of building:

https://kernel.googlesource.com/pub/scm/linux/kernel/git/tiwai/sound/+/topic/asus-e100h-4.13

Right now as you can see the latest commit is actually reverting on a previous change.

In reality I keep hoping that all the changes just get streamlined into the main kernel but at this rate I'm not sure that's going to happen anytime soon.

Grippy98 avatar Nov 05 '17 14:11 Grippy98

This might also be useful if you want to play around with different settings: https://gist.github.com/wmealing/2dd2b543c4d3cff6cab7

As you can see from the tab, forcing Cstate to 1 would mean the CPU is always fully turned on.

Grippy98 avatar Nov 05 '17 14:11 Grippy98

do u know if i could try to capture the sleep state in order to confirm that it is actually causing the problem? like cat a sys variable to some kind of logfile that would keep only the most recent values? damn, am i bit too noob in linux scripting to not spend hours on this...

matt32106 avatar Nov 05 '17 15:11 matt32106

forcing Cstate to 1 would mean the CPU is always fully turned on.

http://www.hardwaresecrets.com/everything-you-need-to-know-about-the-cpu-c-states-power-saving-modes/ is interesting, from what i understand, it is not fully turned on in C1, it recognizes the HALT state. It just does not have more elaborate sleep states.

matt32106 avatar Nov 05 '17 15:11 matt32106

Yeah you're correct... you should be able to see the current C-State of the CPU using Powertop. I guess have it running and open on one side of the display and try to have the computer freeze and see what the last power state is? Otherwise I'm sure it's possible to log it to a file and then search your way through that.

Grippy98 avatar Nov 05 '17 16:11 Grippy98

I tried powertop but the refresh rate is not enough. I'll try the log idea but i need to rotate the values so that the file stays small and need to research that too...

matt32106 avatar Nov 05 '17 16:11 matt32106

i finally made the update in grub and confirmed with powertop that the max_cstate was 1. Unfortunately, i got a new freeze in this configuration so, back to the drawing board. :(

matt32106 avatar Nov 05 '17 17:11 matt32106

The situation looks grim according to this post: https://askubuntu.com/questions/945446/ubuntu-freezes-on-intel-atom where one of the commenter says that it's a problem that probably won't be fixed by kernel devs. I am testing right now the workaround mentioned in the reply, i.e. cpulimit fingers crossed (10 min without freeze so far)

matt32106 avatar Nov 06 '17 14:11 matt32106

Hope that works for you.... and yes the comments are quite right. I’m not entirely holding my fingers crossed for a permanent fix anytime soon. He’s right that the chips are becoming obsolete at this point. That’s why I’m not using or actively really supporting the E200H. I just don’t use it myself anymore. I try to keep users up to date as much as I can because I feel like there’s quite a few people that are reading this repo but otherwise I’m not really holding my fingers for Intel or anyone else to dramatically improve support anytime soon. It’s too bad really because I thought there was a lot of potential for low-cost Linux laptops with these chips.

Grippy98 avatar Nov 06 '17 14:11 Grippy98

After having my game running for 4 hours (instead of the PC freezing after 5-15 minutes), it looks like the workaround works for me (with a perf hit obviously) sudo cpulimit -p <pid> -l 50 There may be room for improvement by playing with the limit parameter, or number of cores accessible, we'll see. However, be aware that launching other programs may create the freeze condition again. I launched firefox in parallel with my game and it froze the machine while loading a couple of tabs.

matt32106 avatar Nov 06 '17 23:11 matt32106

If you are using Wayland, try Xorg. Helps on my HP x2 with similar hardware.

kmbt avatar Feb 03 '18 19:02 kmbt