No YouTube Videos on Google Chrome v50

After upgrading to Google Chrome version 50 I could hear sound in YouTube videos, but no images/video. At first I thought this was a matter just affecting me. Now I noticed that another machine which I upgraded to Google Chrome v50 also lost the ability to watch video in YouTube. This other machine had a different graphic setup, so the problem was not something related just to my graphic-card configuration. The same problem is true for Chromium. For some time I switched to Firefox, which does not suffer from this hitch.

Luckily I had yet another machine which still had a working Google Chrome v49 browser. I used the very handy fakepkg program written by Gordian Edenhofer to make an Arch package from this v49 installation, see also pacman/Tips and tricks and the bacman command. And voilà, I can now downgrade to a usable Google Chrome version, whenever there is a need:

pacman -U google-chrome-49.0.2623.112-1.pkg.tar.xz

I called

fakepkg google-chrome

which after two minutes generated google-chrome-49.0.2623.112-1.pkg.tar.xz. These two minutes are mostly due to compressing with xz.

Google Chrome is in AUR. I recommend to set


in /etc/makepkg.conf, so AUR packages are cached, very similar to the “normal” packages.

See also Google Chrome Became a Performance Hog.

Upgrading from OxygenOS 1.0.3 to 2.1.4 on the OnePlus One Smartphone

This short guide describes how to upgrade your OnePlus One Smartphone from OxygenOS version 1.0.3 to 2.1.4. In this case the initial version of your OS is of no relevant importance — you can also upgrade from version 1.0.0, but see Installing OxygenOS 1.0 on the OnePlus One Smartphone and Upgrading from OxygenOS 1.0.0 to 1.0.3 on the OnePlus One Smartphone.

Before start we need adb and fastboot. On ArchLinux these programs are in android-tools:

pacman -Syu android-tools

Copying the OS image to the phone takes almost three minutes.

adb devices

time adb push /sdcard/
4842 KB/s (767726302 bytes in 154.821s)

real    2m34.909s
user    0m0.007s
sys     0m0.683s

Upgrading from OS 1.0.3 to 2.1.4 is apparently not possible by using TWRP. OxygenOS 2.1.4 for the OnePlus One says
Continue reading

Performance Comparison C vs. Lua vs. LuaJIT vs. Java

Ico Doornekamp on 20-Dec-2011 asked why a C version of a Lua program ran more slowly than the Lua program. The mentioned discrepancy cannot be reproduced, neither on an AMD FX-8120, nor an Intel i5-4250U processor. Generally a C version program is expected to be faster than a Lua program.

Here is the Lua program called lua_perf.lua:

local N = 4000
local S = 1000

local t = {}

for i = 0, N do
        t[i] = {
                a = 0,
                b = 1,
                f = i * 0.25

for j = 0, S-1 do
        for i = 0, N-1 do
                t[i].a = t[i].a + t[i].b * t[i].f
                t[i].b = t[i].b - t[i].a * t[i].f
        print(string.format("%.6f", t[1].a))

It computes values for a circle.

Continue reading

Performance Comparison of mmap() versus read() versus fread()

I recently read in Computers are *fast*! by Julia Evans about a comparison between fread() and mmap() suggesting that both calls deliver roughly the same performance. Unfortunately the codes mentioned there and referenced in bytesum.c for fread() and bytesum_mmap.c for mmap() do not really compare the same thing. The first adds size_t, the second adds up uint8_t. My computer showed that these programs do behave differently and therefore give different performance.

I reprogrammed the comparison adding read() to fread() and mmap(). The code is in GitHub. Compile with

cc -Wall -O3 tbytesum1.c -o tbytesum1

For this program the results are as follows:

Continue reading

2015 in review – report generated by WordPress

See the fireworks Elmar Klausmeier’s Weblog created by blogging on Check out their 2015 annual report.

Here is an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 14,000 times in 2015. If it were a concert at Sydney Opera House, it would take about 5 sold-out performances for that many people to see it.

There were 47 pictures uploaded, taking up a total of 425 MB. That’s about 4 pictures per month.

The busiest day of the year was January 2nd with 93 views. The most popular post that day was Three Free Invites For the OnePlus One.

Source: My 2015 annual report.