Jaguar: Portrait of Xena
Valid HTML 4.01 Transitional

Acer Aspire E5-573G
Hacking

Jim Carter, 2016-02-07

Table of Contents

Power and Memory Measurements

Looking at the OpenArena game, the energy used in the test (power 33W x time 1.3 hours) was 42.3 watt-hours or 1.52e5 joules, whereas the reported charge and voltage, multiplied, are 2.47 amp-hours x 14.4 volts = 35.6 watt-hours. Given various conversion losses, roundoff error and so on, I'm calling these two numbers consistent. And therefore it's valid to estimate the battery life in hours as charge (reported in amp-hours) times voltage divided by the measured power in watts.

Clearly Windows knows how to do something with power management that Linux doesn't. Interventions I tried to reduce power:

Lithium ion (cobalt oxide) batteries (on Wikipedia). All these values are volts per cell.

Memtest86+ reported parameters with one or two memory sticks. Memory speeds are in bytes per second.

Item Size 1x 8Gb 2x 8Gb Comments
Clock 2.195 2.195 GHz
L1 cache 32Kb 1.46e11 1.46e11
L2 cache 256Kb 3.33e10 3.33e10
L3 cache 3072Kb 2.31e10 2.48e10
Main memory 8-16Gb 1.13e10 1.43e10 1.27x
Run time 105 180 Mins/pass

On the NUC (Iris), adding a second stick of memory raised the memory bandwidth by almost exactly 1.5x. On the Acer, however, the score on the Phoronix memory test was speeded up 1.7x. It's hard to figure on which tasks raw memory bandwidth makes a difference, and how much.

Oops, in SMP mode after about 5 minutes it seems to have gotten stuck, no error message. I restarted the test in the default mode, single core. I'm guessing that memtest86+ imperfectly supports the Broadwell-U chipset, which is fairly new.

Machine Stuck!

I tested suspending to S3 again (by lid close), and the machine would not go down (power still 13W which is about right with the display off). When I opened the lid again I could not wake it with the power button. I had to hold down the power button until it powered off. This occurred twice in succession. The machine was on line power at the time.

When I rebooted, both times, the touchpad was inoperative; the X-server did not recognize it as existing; actually most likely the relevant device driver did not get loaded. I let it incubate about 18 hours with only battery power, and the touchpad is now back. This issue was not seen again. This is a different issue from kernel 4.1.12 not supporting the touchpad.

First hypothesis: If you're on line power and you suspend to S3, the machine gets hosed. I am pretty sure that every suspend on line power has failed. Not sure about hibernate (S4); I think I never tried it on line power. [Another source reports similar failure for S4 on line power.]

How about on battery power? I have suspended many times successfully. This time, I suspended on battery and left the machine overnight, 11 hours. It woke successfully (and I got a power measurement, looking at the battery charge). Then, still on battery, I suspended 15 times in succession by closing and later opening the lid. On the 15th attempt it turned on the lamp, showing the scene saved in video RAM, but user space did not wake. Various maneuvers had no effect and I eventually forcibly rebooted. The next attempt to suspend failed the same way.

Then I tried a similar test to S4, still on battery power. 30 repetitions were all successful. (Which is not a guarantee that the 31st try would also succeed.) It takes 7 secs to go down, and 21 secs to resume; when you use the hibernate button on the logout confirmation box, it starts the screen locker and the 21 secs is to when the locker is ready to read your password. Save and restore times are longer if more RAM is in use, e.g. when testing a game or a movie.

Back to S3: succeeded once, failed on the second try.

Second hypothesis: the behavior on battery power is different, but both issues are probably a BIOS bug. It may be fixed eventually but not soon, because I already installed the latest BIOS.

So what am I going to do; what is the action plan? The goal is to have a great laptop with all its parts working. Issues:

Actions: I'm still in the phase of diagnosing the problem.

Results of Google search for other users having my symptom. Search terms: acer aspire E5-573g suspend freeze. There are few hits, and more false positives for the V5-573G which need to be ignored.

From the man page for systemd-suspend.service, which is what is eventually invoked by all programs wanting to suspend the machine (also hibernate or hybrid-sleep): Put hack scripts in /usr/lib/systemd/system-sleep/ and they will be executed (in parallel) with 2 args: pre/post, and suspend/hibernate. See also /etc/systemd/sleep.conf; man page systemd-sleep.conf; not useful in this problem. OK, I'm going to take the CPUs offline with a hack script. It worked -- on AC power you can now suspend to RAM or hibernate, and survive.

However, the other bug is still with us. Outcome of repeatedly suspending in various conditions. On all but one test, the procedure was to shut it down, wait for it to go down, leave it down 15 secs, wake it, wait for it to be fully awake, plus 15 secs more, and repeat from the beginning.

Phoronix Benchmarks

Web resources:

I'm using version 6.0 Hammerfest. Licensed under GPLv3. It is actually available on SuSE Build Service in the benchmark sub-repo; called phoronix-test-suite. General dependencies: PHP CLI (SuSE includes it in the main php5 package), and standard development tools like gcc. The SuSE package also requires requires xdg-utils, php5, and these php5- packages: curl dom gd json openssl pcntl posix zip.

It's going to be a challenge to learn to use this package.

A lot of reviewers use the Phoronix Test Suite on the machines they review, and I had hoped to get tests on my own machines that can be compared with the published results. But unfortunately there are tons of tests in the suite, and everyone uses different tests. Nonetheless, running these benchmarks is valuable because I can pick a wide range of tests, particularly tests that it wouldn't be reasonable for me to develop on my own.

Installing and Configuring Phoronix Test Suite

You also need a test configuration, and a standard one is available as phoronix-test-suite_data . If you install it, it will drag in phoronix-test-suite. It also requires glibc-devel-static . The package with all dependencies occupies 177Mb. However, this package has way too many tests and takes way too long for what I'm trying to do.

For historical reference, to make it run as a user (yourself), you need to create a symbolic link from ~/.phoronix-test-suite/test-suites/local/suse-basic-test-suite to /var/lib/phoronix-test-suite/test-suites/local/suse-basic-test-suite (directory). Then in the various commands you can refer to the SuSE test suite just as suse-basic-test-suite.

To execute the preset tests, just do /usr/bin/pts_launch_batch (no command line arguments). For interactive testing you will find in your desktop menu, System category, an entry for Phoronix Test Suite, which will launch /usr/bin/phoronix-test-suite in an xterm. It is able to install SuSE packages required for testing (it asks for the root password). It retrieves from the mother ship the source code for the tests you request.

I think I'm going to try to make this suite a little smaller. I made my own test directory called couchnet-bmk under ~/.phoronix-test-suite/test-suites/local, copied suite-definition.xml from the SuSE tests, and shortened it drastically. I also tried out the various tests on one machine, trying to find ones that would compile and execute in my context, and also to avoid tests that run forever. Here are the tests finally chosen:

I wanted these tests but they failed to install:

There are about 45 graphic tests available; I installed and tried quite a number of them. About half are actual game demos similar to OpenArena; I didn't try these since they don't give additional valuable information. Among 7 non-game tests, 4 could be installed, but only one subtest of one benchmark ran and gave a valid result. This was disappointing. I tried two light entertainment games; only one installed and ran: Super Tux Kart. See the results section for the outcome.

The fastest machine finished the tests (including the game) in 16 minutes. The slowest took 70 minutes, including waiting for the game to make progress and finally killing it.

Here's the suggested procedure to run the test suite:

Test Results

Here are the test results. The hosts are sorted kind of by product families. Mb/s means million bytes per second, decimal. For tests reporting in seconds, lower is better; if per second, higher is better. When the SSD and the second memory stick were installed, the Acer was retested, and where there was a difference a second number is shown.

  kermit piki jacinth aurora diamond iris xena-vaio xena-acer
CPU AMD E-350 AMD Neo 6850e AMD G-T40E AMD G-T56N Intel i7 3517UE Intel i5 5250U Intel i7 3632QM Intel i5 5200U
GHz 1.6 1.8 1.0 1.65 1.7 1.6 2.2 2.2
Graphics Radeon HD 6310 Radeon HD 3200 Radeon HD 6250 Radeon HD 6320 Intel HD 4000 Intel HD 6000 GeForce GT 640M GeForce 940M
AIO-Stress random write (Mb/s) 14.7 26.2 17.0 30.5 65.2 2235 (!) 133.0 283.9-
2196.24
OpenArena game (frame/s) killed 8.8 killed killed 5.4 (kill) 5.5 (kill) 51 34-55
Stream memory perf (Mb/s) 2558 3953 2447 3143 14360 13262 11900 8238-
14021
Loopback TCP net perf (sec) 123 68 120 144 20.3 19.3 18.4 19.0
Himeno Poisson eqn (Mflop/s) 206 233 167 187 1153 1374 1354 1323
FLAC encoding (sec) 70 40 90.5 73 10.8 10.1 9.2 10.1
OpenSSL RSA 4096bit (sign/s) 40 102 36 33 160 204 204 229
Total run time (minutes) 71 41 29 70 44 29 16 16
Jimc's SHA-512 and I/O (Mb/s) 23.0 41.9 26.2 26.0 72.6 81.5 115.4 81.3
Power at idle (watts) 14 29 13 19 14 9 30 15

These patterns can be seen in the results:

On the Acer machine (with one memory stick) I investigated OpenArena in detail. If you run it individually, rather than as part of a suite, it will go through a range of resolutions, with these outcomes:

Screen px Frames/sec Pixels/sec
800x600 88.4 4.24e7
1024x768 54.4 4.28e7
1280x960 35.9 4.41e7
1280x1024 34.2 4.49e7
1400x1050 30.1 4.42e7
1920x1080 19.2 3.98e7

So its frame rate is inversely proportional to the number of pixels per frame, with ±6% scatter. In the suite test it did not report the resolution it was using, but comparing with these results and eyeballing the screen during the test, the closest match is to 1280x1024px, and possibly the same resolution was used on the other machines.

By looking at /proc/$PID/fd and locating the graphic device (/dev/dri/card0) in the /sys filesystem, I was able to confirm that the game was using the Intel HD Graphics 5500 controller, which is integrated on the CPU chip, rather than the nVidia GeForce 940M (GM108M GPU). Hiss, boo! Likely the demo would run even faster with the nVidia GPU.

Wanting more coverage in the graphics category, I tried a lot of tests, excluding real games like OpenArena which I already had information from, but only one installed and executed successfully: Super Tux Kart. Here are the frames per second and pixels per second achieved. The Acer had two memory sticks.

Host Screen px Frame/sec Pixel/sec
Piki 800x600 1.5 7.2e5
Vaio 800x600 40 1.9e6
Vaio 1920x1080 19 3.9e7
Acer 800x600 42 2.0e7
Acer 1920x1080 19 3.9e7

I tested it first on Piki, where at 800x600px resolution it got about 1.5 frames/sec (compared to 8.8 for OpenArena); I killed it. It was more successful on the Vaio and Acer (using Intel HD 5500 graphics), which performed very similarly to each other, and roughly similarly to what they did (at 1920x1080px) on OpenArena. However, OpenArena could deliver about twice the (already high) frame rate at 800x600px, perhaps because the artwork was more complex for Super Tux Kart.

Certainly these particular games are playable on this machine, but it's hard to make a judgment whether all (Linux) games would be similarly playable. I think the achieved frame rates can be used to recognize which machines are pathetic in their gaming performance, but a functional judgment about gaming on the Acer machine (in Linux) cannot really be made from this limited test data.

(Not) Reviving the nVidia GeForce 940M

I really would like to know how fast my GPU is, and how much of a power pig it is. If you do lspci the line item for the nVidia card will include the GPU model in the device title: GM108M. The open source nouveau X-Windows driver (SuSE package name: xf86-video-nouveau) recognizes up to GPU GM107 but does not know about the GM108M, code name Maxwell. The recommendation in this case is to install the nVidia proprietary driver, if your security or political rules permit that.

There are several nVidia drivers depending on the GPU family; the one for this machine is [believed to be] x11-video-nvidiaG04 and dependencies will have a suffix of G04. Look at the SuSE guide to installing nVidia drivers and follow the link to the procedure to add the nVidia sub-repo. They suggest using zypper install-new-recommends (abbreviation: inr) but that is not going to fly in my context since I have suppressed a lot of recommended packages that are either useless or make trouble for me. I just did zypper install x11-video-nvidiaG04-361.28, picking the latest version from among the (unstable) packages available in the repo. As part of the installation it drags in nvidia-gfxG04-kmp-default and compiles the enormous kernel module for the standard kernel. This is driver version 361.28 dated 2016-02-03.

However, I'm using kernel 4.4.0 from Tumbleweed, to get support for the Qualcomm/Atheros QCA9377 Wi-fi NIC. After abortive and fruitless attempts to avoid version skew I just booted the stock kernel (see below under Backport for the dramatic soap opera surrounding Wi-fi). Even so, the kernel module compiled itself for kernel 4.1.12 which had already been superceded by 4.1.15 for a security patch. I retrieved the modules and moved them to be accessible from 4.1.15, did depmod, then mkinitrd.

The kernel module was loaded as was the nvidia X-Windows module, which reported that it is for all Supported NVIDIA GPUs. Evidently the GM108M is not a supported GPU: the X-Windows module was unloaded and we got the Intel driver. I forced use of the nvidia driver with an explicit device and screen section in a file in /etc/X11/xorg.conf.d, but it reported that it could not find any relevant devices, and exited. That was very disappointing, and that's where I left it. Reverting to kernel 4.4.0 and the Intel driver.

Backported ath10k_pci Driver (Failed)

There are several reasons that I would like to use my distro's stock kernel which is 4.1.12 at the moment.

Therefore I investigated the backported ath10k stack of drivers. To cut to the conclusion, the latest backport set is from kernel 4.2.6, which does not yet support the Qualcomm-Atheros QCA9377 NIC (PCI id 168c:0042). It does have the 168c:003c and 168c:003e. Look in ./backports-4.2.6-1/drivers/net/wireless/ath/ath10k/pci.c .

Also in kernel 4.1.12 the touchpad was inoperative. Losing the touchpad is not acceptable. Reprieve: if you set it to Basic mode in BIOS, it works in 4.1.x including acceleration and scroll gestures.

The backports documentation tells how to extract a backports package from any kernel version. I'm going to try to do this procedure on a 4.4.x variant.

Well, not so fast. Once I rebuilt the initrd, it stopped working. When it was setting the regulatory domain it recognized that it was in the US, but did not come up with any frequency ranges, and things went downhill from there. I tried hiding the backported cfg80211.ko and mac80211.ko and rebuilding the initrd; the stock drivers were used but it didn't help the symptoms. That's where it stands at the moment.

For historical reference here is the procedure to compile a preassembled backport tree.

Jaguar: Portrait of Xena