leif's blog

systemd strikes again with systemd-resolved...

systemd must be the worst thing ever invented. It started off being a good replacement for old rc startup scripts, but has since evolved into a monstrocity that makes Linux unusable. The latest nonsense is call systemd-resolved. It's apparently there to deal with a local resolver for things that can not support NSS, like Chrome.

Not only does this seems rather silly, for something I clearly do not care about at all, but it's also detrimental when your app does its own resolution. In my case, Apache Traffic Server fails to run its regression when it finds this local resolver ...

The solution was simple for me, just disable this useless systemd service:

$ sudo systemctl disable systemd-resolved.service



Windows 10 and too many connections ...

This weekend, I decided (foolishly...) to upgrade the only Windows 10 box that we have, a NUC that me and Peter use for some gaming time. This ended up being an enormous mistake (read: clusterfuck), because the box sort of bricked itself with an error

The number of connections to this computer is limited and all connections are in use right now.
Try connecting later or contact your system administrator.

So, neither of the proposed solutions worked; I even tried rebooting numerous times, to try to get it to Safe Boot, which it did not. And lo and behold, Windows 10 has removed the F8  boot option to go into safe mode as well... I did a little bit of research on this, and found a solution that suggested disconnecting the box from the LAN. Well, this was easily said than done, since the box is on WiFi, and you can't turn off WiFi from Windows unless you can boot into it. But, there is a BIOS, and fortunately, this Intel NUC machines has a BIOS option to turn off the WiFi (what they call the WLAN).

I did that, and this time Windows continued booting, finished with the upgrades that I had started, and so far so good. I haven't turned on the WiFi yet, so we'll see what happens after I do that...


Compiling LLVM with distcc

First off, I'm not a cmake expert, so I'm not 100% sure if I'm doing this right, but it does seem to work... Basically, I wanted to distribute my LLVM builds across a set of machines, using distcc. This is what I did

  1. As root, the first thing to do is making sure you have distcc linked to various compilers, e.g

    $ sudo ln -s /usr/bin/distcc /usr/local/lib/distcc/gcc
    $ sudo ln -s /usr/bin/distcc /usr/local/lib/distcc/g++


  2. Run cmake like

    $ CC=/usr/local/lib/distcc/gcc CXX=/usr/local/lib/distcc/g++ cmake -DCMAKE_INSTALL_PREFIX=/opt/llvm -G "Unix Makefiles" ../src
    $ pump make -j30  CC=/usr/local/lib/distcc/gcc CXX=/usr/local/lib/distcc/g++


However, the final link stages did not fair well with the parallel make, so I had to run again, without a -j option to make.


Swapping CAPS lock and CTRL on Raspbian

I was fiddling with one of my (new) RPi's, and realized there was no UI component to switch the CAPS lock to be CTRL. Really? So, found a couple of things that has to be modified:

First, I edited /etc/default/keyboard, adding


​​Secondly, I modified my ~/.config/lxkeymap.cfg, adding

option = ctrl:swapcaps



Fedora 24 issues on VirtualBox

As of some recent upgrades to my F24 VM (running under VirtualBox), my system would not boot properly any more, getting errors like

NMI watchdog: BUG: soft lockup - CPU#0 stuck


I couldn't find any details as to why this was, other than someone having similar issues with a bad GPU card (not under a VM). I checked my display settings for the VM, which had the minimum recommended setting of 21MB. This ought to have been plenty, since I run my Linux system in a head-less mode (no display etc.). However, Linux must have changed something, cause this no longer worked, but bumping the GPU memory to 32MB seems to have fixed it. Bizarre.


Sonos's APIs

I bought a couple of Sonos devices for the house, and they obviously literally rock. I found that there are several easy ways to control these devices with simple REST APIs. For example


There are some further details listing these here.


Software development on OmniOS

One of the OpenSource projects I work on, Apache Traffic Server, supports Solaris. I build on OmniOS for this development, and as much as I like it, it's semi-difficult to setup a development area properly. I'm likely missing something (like, a developer bundle or meta package), but these are the packages I find necessary to always install:

$ sudo pkg install gcc51 header object-file

Note that GCC installs in /opt/gcc-<version>, and without object-file autoconf / configure does not behave well. In addition, I use the OmniOS additional package repository as well, for goodies such as Emacs:

$ sudo pkg set-publisher -P -g http://pkg.omniti.com/omniti-ms/ ms.omniti.com

Software installed with this goes into /opt/omni.

Update: For some details on getting network setup on your OmniOS box, see http://blog.nemtallahdaher.com/wordpress/?p=127 . In addition to this, I also had to update the nsswitch.conf file of course (just copy over the DNS version of it).



Subscribe to RSS - leif's blog