Linux on the Acer Swift 3 (SF315-41) - Memory & reboot problems

Hi y’all I’m having a couple of issues with Linux on an Acer Swift 3 laptop and I was hoping you guys could give me a hand with it.

Specs SF315-41 and inxi -Fxz

I’m running the latest UEFI version 2.03, and the only OS in it is Antergos 4.18. No hardware changes where made to the machine.

TL;DR:

  • AMD-Vi errors are thrown when the computer boots.
  • Computer freezes at random intervals (sometimes after hours) might be related with the first problem as it happens while running a VM.
  • Can’t restart the computer or it will not be able to find a bootable device, turning the computer off and on again will prevent that from happening or fix it if it has already happen.

UPDATE: The problem that initially seemed to be with initialization is actually a memory problem in which the machine freezes if there’s a high memory consumption.

The main issue seems to be with virtualization; when I boot the system I get this errors:

[Firmware Bug]: AMD-Vi: IOAPIC[4] not in IVRS table
[Firmware Bug]: AMD-Vi: IOAPIC[5] not in IVRS table

And if I run a VM the computer will freeze after some random amount of time and I’ll have to shut it down “by hand” (I’m not 100% sure at this point that this “freeze” problem is related to this errors, maybe the computer just freezes at random times and I happen to be running a VM when it happens).

Looking for those errors online I ended up on this answer on SU and followed the steps under the title “2. Linux workaround”; doing that got me past those errors and into this new one:

AMD-Vi: Unable to write to IOMMU perf counter.

The “freeze” problem remains the same.

If I go with option 3 of the SU answer “Disable IOMMU in UEFI/BIOS configuration” then the errors go away but the “freeze” problem persists, that makes me suspicious that I might be looking at two unrelated issues :grimacing:.

I’ve tried going wit option 1 of the SU answer “Update motherboard firmware” and by that I mean contacting Acer, ask them to take a look at this and consider the possibility of a new UEFI patch but a customer service employee told me it was unlikely to happen since they do not provide support for problems happening under an after market OS. I’ve also posted on their community forums to no avail.

The other issue I’m having is that when I restart the machine it won’t recognize any bootable device and I’ll have to restart it again (ctrl+alt+del) or shut it off and on again for it to start recognizing the SSD as bootable again. This issue doesn’t trouble me as much since the workaround of shutting down and up again does not bother me much, I’ve made a much more comprehensive post about it on the Acer community forums.

These are my posts about the virtualization issue on the Acer community and on Unix Stack Exchange, just in case.

dmesg dumps:
Before the SU fix
After the SU fix

Thank you all for your time and for any light you can throw over this.

P.S.: I can’t figure out how to add tags to my post :confused: sorry for that.

1 Like

The freeze problem is due to powersave states not properly activating. You need to run performance CPU Governor the whole time.

Also, ACPI errors due to that are EXTREMELY COMMON on Ryzen. This thread has a few kernel command line fixes:

1 Like

That’s ok.

Basic users can’t add them. But once you level up thru the trust levels you can add them.

If you want me to add some let me know. Although each thread is limited to three tags.

1 Like

That’s great, I’m trying that now (used this command: cpupower frequency-set -g performance), I’ll let you know how it goes

EDIT: I’ve also enabled the cpupower service and set performance as the default governor on /etc/default/cpupower

OK good to know, I read somewhere before posting that I had to add the tag helpdesk if asking for help, thanks for adding it :slight_smile:

1 Like

I left the computer running all day on Saturday and it didn’t freeze :grinning: however I barley used it that day, now I’m back at the office if it goes trough the whole day without freezing we can call this a success.

Just freezed on me so… :sob:

Edit: and it happened again, I’m going to set the governor back to its original value.

You need to add the APIC kernel command line I linked to in the other thread with the ThinkPad. You also need to ensure your CPU doesn’t enter deeper C-states. Entering deeper C-states also cause freezing.

I’ll try that then but I don’t think APIC is causing the problem now because I’ve run this command:

stress --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k --vm-keep -m 1

Which fills 90% of the available RAM and after some minutes the machine freezes everytime, I’ve also noticed high RAM usage at the times the machine spontaneously freezes.

All of this is consistent with my original observation that it crashes when a VM is running and is also consistent with the “test” I ran on Saturday in which I left the machine on and IDLE for 10+ hours with no problems.

I hope the RAM is not at fault because this piece of crap has it soldered on.

Tomorrow I’ll give that APIC fix a try anyway… if you think it’s worth the trouble given the new evidence.

You might need to run a select multicore test of Memtest then. Don’t run the entire memtest test suite with multicore cause one has an impossible to solve bug which can never be fixed, so they left it unfixed. Run a specific test known to work with multicore on a loop.

I’m not sure I understand what you mean, this is what I’ve done:

  1. Downloaded https://www.memtest86.com/ into a USB stick
    a. Default tests: 4 passes with 1 core (skipped hammering on passes 3 and 4) - No errors.
    b. All tests except hammering 1 pass on 8 cores on parallel - No errors.

  2. Downloaded http://www.memtest.org/ into a USB stick and tried to boot from it only to realize that apparently it won’t boot on UEFI mode and I don’t have the option to run the computer on “BIOS” mode.

Anyway, since no errors occurred I guess the OS is at fault here, right? or is it inconclusive?

Update, I’ve done this:

  1. Enable the Magic SysRq Key by doing echo 1 > /proc/sys/kernel/sysrq as root.

  2. Run the stress test (stress --vm-bytes $(awk '/MemAvailable/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k --vm-keep -m 1)

  3. Confirm that Alt + SysRq + F actually works and kills the highest memory consuming process (which is in fact the stress test).

But after the computer freezes that key combination has no effect which means that the machine is beyond unresponsive and has actually crashed, right?

I’ve tried installing more OS:

  • Windows 10 - No memory nor reboot problems
  • Fedora 28 - Same memory & reboot problems
  • Ubuntu 18.04 - Same memory & reboot problems

I’ve also tried installing OpenSUSE thumbleweed and Debian but got into some issues with the installers and didn’t think it was worth the effort since the outcome was likely to be the same.

Finally I’ve tried Ubuntu 18.04 with no swap but got the same results.

I guess this is a kernel issue since 3 different distros are having the exact same problem.

I’ll go back to windows next week so I can keep using the computer for now and look into buying a new notebook that it’s proven to work right with Linux and has similar specs (although hopefully more memory).

Thanks anyway FurryJackman for the help and Goalkeeper for the edit :wink:

1 Like

I encourage you to check back on the Lenovo E585 thread, cause the Acer models seem more troublesome to work with because of stupid warranty voiding things like having no 2.5’’ SSD support or stuff like that.

Great, I’ll look into that one, I was also looking at Dell’s XPS line too.

It’s hard to get them where I live (Uruguay) since there’s no much to choose from on the local market and what little there is is ridiculously overpriced, I got this Acer while on vacation in Italy, anyway this last paragraph was just to unload some of my frustration :expressionless:

Thanks again for the help and for the tip on that Lenovo.

hello, OP, has the power usage been improve with latest kernels and drivers?

I couldn’t get Linux working on that notebook so I wouldn’t know

with the latest firmwaare BIOS andgood updated kernel I thinkyou aregong to be luck
have you tested ubuntu LTS last image?(it has linux 5.0) with an updated bios it has to works well

I already had the latest BIOS but I’ve been running the stress test for 10 minutes on the new Ubuntu LTS live usb and there are no signs of trouble! :grinning:

I need to do another longer test on Manjaro (that’s the distro I wish to use) but I’ll have to install it in order to update the kernel so I don’t know when I’m going to get the time to do that. I’ll post an update when I do.

Thanks for the suggestion I was about to buy a new notebook already! :V

okey, can you tell me the power usage in idle with linux?
have you windows in your laptop too?
I am going to return an asus with amd ryzen and I had very high power usage in linux… I dont want to have other laptop with high power usage in linux, it is why I am asking for power usages in your laptop, that I plan to buy
in linux you can see with sudo powertop and in windows you can see it with hwinfo, sensors, battery
all the tests with min brightness and 0 apps

PD: in my asus laptop I had 12 W of power usage in idle and with windows I had 4,59W…
pD2: I have read some comments that this laptop has a discharge of 7 percent each 24 hours. Have you suffered this too?

Ok, I got excited about the possibility of having Linux working on this machine so I stayed up late the other night and installed Manjaro, after that I siwtched to the latest available kernel and tried the stress test with no luck, the machine froze again (tried different versions of the 5.x kernel on Manjaro with no luck). After that I’ve installed Ubuntu 18.04 and left the stress test running for 30 minutes with no issues, so right now I’m running Ubuntu with the Cinnamon DE and have been working on it normally with no issues :slight_smile:

To answer your doubts, I find the battery life on this machine is really good, on Windows I could work all morning on a single charge (about 4hs) even running a VM on the background, on Linux I haven’t noticed any difference on battery life.

I’ve found that the machine will use battery even when turned off, I usually leave it fully charged, unplugged and turned off on the weekends and on Monday mornings it won’t have 100% charge (I don’t remember how much less)

powertop output (min brightness, no programs open):

The battery reports a discharge rate of 8.66 W
The power consumed was 163 J
The estimated remaining time is 4 hours, 11 minutes

Let me know if you want any more info and thanks for the heads up about the new kernel, you’ve saved me from buying a new laptop :slight_smile: