Dummy network device in Ubuntu Linux 18.04

Ubuntu is moving away from the old /etc/network/interfaces or /etc/network/interfaces.d/*.cfg style of configuration towards netplan. Unfortunately nobody seems to have thought about dummy network interface support. There seems to be a workaround with a bridge device without attached interfaces, but I could not get netplan to assign IP addresses to that bridge interface and it furthermore leads to the boot-up process hanging for a few minutes.

I therefore stick with the old /etc/network/interfaces for now and work around a bug with the dummy module initialization in 18.04 like this:

auto dummy0
iface dummy0 inet static
address 10.0.0.1
netmask 255.255.255.0
pre-up rmmod dummy; modprobe dummy numdummies=4

The last line did the trick.

Reducing CPU load and energy consumption of TeXstudio on the Mac

TeXstudio is a decent and free TeX editor on the Mac. One aspect of it bothered me, though: It uses too much CPU for no obvious reason. Even when no tex documents are open, it (version 2.10.8) does *something* very CPU intensive every ~8 seconds. On a desktop computer this wouldn’t be much of a hassle, but on a laptop unnecessary mean wasted energy and less battery life. With TeXstudio on a MacBook Pro it actually means several hours less battery life.

Using the Activity Monitor I found TeXstudio to frequently scan for network interfaces and nearby Wifi networks. That is very odd for a TeX editor and I cannot think of a good reason for it to do so.

TeXstudio is scanning for WIFI networks

TeXstudio is scanning for WIFI networks

Apparently, libqcorewlanbearer.dylib is involved. Simple fix: Delete it.

$ rm /Applications/texstudio.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib

TeXstudio will continue to work just fine but will use way less energy doing so. Why does this matter? Because it is spring and I want to work outside. 😀

Performance of tunneling methods in OpenWRT

WR841Nv9There are plenty of reasons to tunnel one network connection through another without encryption: You might, for instance, want to transparently connect two separate networks (e.g. data centers) through another, or want to use a publicly reachable IP address behind your providers NAT. Whatever the reason is, what you are going to do is to encapsulate your data within IP packets to pass through the transit network to your other tunnel endpoint. While it is out of question that this works (this has been a solved problem for a while), this article will look at the performance of various tunneling methods on a very, very low-end consumer-grade device: A TP-Link WR841N v9 wireless router. This device costs less than €15 and is still a very capable router because it can run the versatile open-source OpenWRT operating system.

Continue reading

Enable experimental nested virtualization in Citrix XenServer 6.5 (SP1)

Simply put: Nested virtualization allows a virtual machine (VM) to be a host for further VMs. If you wanted to run VMware inside a VM, you would need this feature. But you would also do well to consider it if you were developing Android apps inside a VM and wanted to use the Android Emulator with hardware acceleration (= virtualization). Continue reading

Enable passthrough of main/primary GPU in XenServer 6.5SP1

In its default config XenServer 6.5 will not permit you to use your host server’s primary GPU in a VM as a passthrough device. That’s reasonable in most cases, as reusing this GPU leaves the dom0 without output. However, passing through the device works nonetheless in many cases – your mileage may vary.

To convince XenServer to let you freely assign the GPU to VMs add this line to the file /etc/udev/rules.d/05-udev-early.rules:

KERNEL=="vga_arbiter", OPTIONS="ignore_device"

Reboot the server, that’s it.

No sound on Ubuntu Linux: “cannot open mixer: No such file or directory” (solved)

I had trouble getting audio to work on a Ubuntu 15.04 system with Intel chipset audio (Intel Corporation 9 Series Chipset Family HD Audio Controller). Trying to run the ALSA mixer would look like this:

$ alsamixer
cannot open mixer: No such file or directory

The fix was to edit /etc/modprobe.d/alsa-base.conf at the very end of the file (changes bold):

# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=0
options snd-hda-intel index=-2

I modified the index value for the snd-usb-audio module to zero and added a line for the snd-hda-intel module. Afterwards the mixer would start as expected.