Fanless NUC

My newly built fanless was nice, but I could still hear my NUC if listened closely. During my investigations I noticed the fanless cases from Akasa, including replacement cases for various NUC motherboards/kits. After wondering  if I maybe shouldn’t replace my NUC I eventually decided to just buy a new fanless case for my existing NUC. The reasoning was quite simple, the Akasa case was 51.96 EUR including shipping. Any other solution would probably be much more expensive.

I didn’t monitor the temperature change too closely. It seems the fanless case keeps my CPU at least 10 degrees Celsius cooler than the Intel case. As the Akasa case is entirely metal it’ll ruin the WiFi/Bluetooth reception. The case does have the option to install an external WiFi antenna, but it doesn’t include the proper wire to do that. I’ve bought that from AliExpress for 5.72 EUR.

The next thing I want to replace is my current mouse. The mouse wheel has been giving issues since forever and the mouse gives off a light. I tried investigating the best possible replacement but there’s too many options. Plus it’s difficult to easily filter out the irrelevant options. Eventually I noticed a fairly cheap somewhat silent Logitech mouse. A quieter mouse fits with my fanless cases so I bought that. The website said it does next-day arrival.. it didn’t arrive the next day.

New computer

Shortly after I assembled my current/old pc the older pc died. I intended to have two and ended up with only one; my NUC. With memory prices slowly dropping to more affordable levels I decided to assemble a new pc.  I tried to go for components with a good price/performance. I don’t want to spend 50% more for maybe 10% more performance. Next to price/performance I opted for an AMD CPU because Intel has so many more security issues. I went with a 1TB SSD (SATA because of price/performance), 65W TDP AMD Ryzen with integrated GPU, a mini-ITX size motherboard with good 5.1+ sound, plus a fanless case. PSU wise I found a laptop-like PSU/charger which needed a DC-DC converter. The result is an utterly quiet pc. I did a stress test and checked the temperatures. Everything seems ok, though wonder how things will be during summer. I quite like the lack of any noise.
My existing older pc is a NUC with a slowly spinning fan. I noticed a company making fanless cases for pretty much all NUC models. I’m wondering whether to make my existing NUC fanless, or maybe do something else.

32GB of memory, 1TB SSD, AMD Ryzen

Installing Mageia was annoying. Latest stable didn’t work, latest beta same. Eventually ended up installing it via internet (net install).

Before buying all the components I wasn’t aware something like fanless existed for such a CPU. It’s nice to do the research and make a pc which mostly follows the  tips  I found, my preferences and the trade-offs I had to make. Price wise I spent about 800 EUR on the various components (I didn’t list all of them). In case people want to know the exact components I’ll put it into the comments (update: had to put it under the “more” link). I’m trying to avoid making this appear as an advertisement.

Continue reading “New computer”

GUADEC 2017 on the cheap

I’ve just booked flight and hotel for GUADEC 2017, which will be held in Manchester. André suggested that I should decide this time. We’ll be staying a wheelchair accessible (the room is slightly bigger :P) room with Easyhotel. It’s 184 GBP for 5 nights and NOT close to the venue (but not bad via public transport). Easyhotel works like a budget airline. You’ll have to pay more for WiFi, cleaning, breakfast, a remote, etc. I ignored all of these essential things which means André has to do without that as well. The paid WiFi might even be iffy, so rather use my mobile data, plus per half June that shouldn’t cost anything extra thanks to new EU regulations. Before GUADEC I might switch to another mobile phone company to get 4-5GB/month for 18 EUR/month. André will probably want to work remotely. Let’s see closer to the date what’s a good solution (share my data?).

Flight wise for me Easyjet is cheapest (70 EUR) and it’s the fastest method. Funny to combine Easyjet with Easyhotel. I usually use a combination of Google flights and Skyscanner to see the cheapest options. However, rome2rio works as well. The latter will also check alternative methods to get to Manchester, e.g. via Liverpool and so on. For Skyscanner, somehow the Dutch version often gives me cheaper options than Skyscanner in other languages. Google flights usually is much more expensive. I only use Google flights to determine the cheapest days, then switch to Skyscanner to get the lowest price.

 

Window Managers under Wayland: libweston

One of the criticisms towards Wayland is the lack of a Window Manager concept. This to have an option of a different window manager behaviour/experience without needing to write a whole compositor as well. On LWN, daniels confirmed that it’ll become easier with time thanks to libweston.

Quoting daniels (first line/paragraph he’s quoting me):

> Not exactly sure what this allows, but I assume that most of the compositor logic is in this libweston, thereby reducing the complexity creating a different Wayland compositor.

Correct. The idea is to let people write window managers and desktop environments without having to worry about the details of DRM/KMS/GBM, EGL, dmabuf, the Wayland protocol itself, and whatever other plumbing. It’s not there yet, but hopefully in the next year or so it’ll become a really solid viable alternative.

Secret santa: GNOME

With a group of colleagues we held a secret santa. One of the rules specified to only list hobbies and likes; specific gift requests weren’t allowed. I wrote down: GNOME, Salsa, purple and travel. I assumed this list would be entirely useless and I’d rather have santa use their imagination. The picture explains all:

A pink GNOMEThe secret santa even included a poem with the request to send pictures of me and the gnome during my travels. Anyone remember the traveling gnome that we used to see on Planet GNOME?

Apparently Googling ‘GNOME’ doesn’t really explain what is meant with ‘GNOME’ :-P Aside from above gnome I also got a ‘The best places to be today’ from Lonely Planet!! Also, look carefully at the picture.

GUADEC 2016

I’m going to GUADEC 2016 Karlsruhe, Germany

I’ve arranged pretty much everything for Karlsruhe. Meaning: transportation (train) and the hotel. According to the feedback I received, the public transport will be pretty terrible during the conference. So make sure to get a hotel nearby. The one I chose (Leonardo Hotel) is about 20 minutes walking. Make sure to read the reviews of this hotel. The closest hotel will be Achat and the GUADEC website should soon have a discount code for that. Achat with discount is still more expensive than Leonardo; though Achat should be worth it.

Aside from the likely non-working (UPDATE/correction: mostly working except maybe 1 tram line) public transport, they’ll also have bikes for around 1 EUR/30 minutes. So that’s probably what I’ll use to get around. The bikes likely require a data connection to rent.

To get there I’ll go by train; seemed like the best option (100 EUR round trip for about 6 hours one way). Coach would take 8+ hours and cost at least 100 EUR. Anyone looking into doing the same I recommend booking asap, trains are getting more expensive. I gambled on not paying the additional 8 EUR to reserve a seat on the high speed train part. Let’s see if that was a wise choice :P Still remember the time I reserved and the train was pretty much empty, as well as the time I did not and I had to change seats multiple times!

User conference

In case you use GNOME, the GUADEC conference is also for users. In case you’re wondering if you’ll fit in: Everyone is usually super friendly. First year you go you go to see talks and maybe a few drinks (alcohol is optional). Second year you talk more with the people you met from last year. Third year onward the talks are an excuse to go and the only talks you see are the ones where the speakers asked you to please attend :P

Post-FOSDEM+DevConf.cz plans I’ll never get to

Attending conferences is a good way to get some excitement into helping out. Lots of people trying to improve and make things better. I attended FOSDEM (6000 people) and DevConf.cz (1600 people). As usual, I’ve had various ideas:

  1. Create an imperfect way to automatically create tarballs:
    Over the various years people often asked “why do we still use tarballs”? But moving away from tarballs is not easy so I don’t want to handle that. Instead, I want to take a small part of the idea and get that working. This to save time for maintainers as well as shortening the time needed to make a GNOME release.

    • Make use of build.gnome.org
      Actually have no idea how build.gnome.org works
    • Perform various sanity checks and bail out if something is wrong or not as expected (“make distcheck”)
    • Do NOT try to handle everything
      Not everything is on build.gnome.org; not every branch might be on there. Too bad!
    • Do try to encourage rewarding a proper module (e.g. be a bit strict in the requirements so that those modules get benefits such as automated releases)
    • Find a way to handle NEWS
      We’ll probably want to generate those from commit messages. E.g. NEWS: bla bla bla
    • Probably need to define an expected workflow
  2. Create an extension for having points on Bugzilla
    We used to have this ages ago. Each time I work on Bugzilla I find various gaps. Either bugs, lack of API, etc. I think this might require an major version upgrade of GNOME Bugzilla else I’d need to apply too many workarounds. Still, points have often been requested and it would really help not only GNOME but also Mageia.
  3. Do minimal amount of work to speed up downstream development
    Example: help out Tails and maybe promote them a bit. They requested a keyword on Bugzilla. Super easy to add. Asked them if anything else might be nice but apparently there’s not much.
    Related: for many years I was planning to see how GNOME would be easier to work with. Find the things which might be easy to change and really help someone else.

Very likely I’ll not get to actually doing any of above. It would be nice though!

Perfect storm: GTK+3.x behaviour under KDE and Firefox’s move to GTK+3.x

Introduction

At Mageia, various people suddenly started complaining about the scrollbar behaviour of GTK+3.x. Not always in the most constructive manner. One example:

“GTK+3 is the way of the future and all you luddites had better fall in line sooner if not later”

The reason was two fold. For one, Mageia could not use oxygen-gtk anymore. Oxygen-gtk played an important part in ensuring GTK+ not only looked but also behaved like Qt. The second big reason was the Firefox package being compiled with GTK+3.x support instead of GTK+2.x.

Loads of people use Firefox. These people don’t like their Firefox behaving different from what they’re used to and expect.

Already lots of moons ago people complained about the different behaviour of toolkits. One of the solutions is xsettings; a way to inform a toolkit at runtime regarding about settings such as (quoting): “double click timeout, drag-and-drop threshold, and default foreground and background colors for all applications running within a desktop”. Checking the xsettings spec git log this standard was created around 2001!

The solution seems obvious: Ensure the right xsetting is set. In practice there were some difficulties:

  1. The KDE xsettings manager was unmaintained for ~3 years
  2. There wasn’t any xsetting for this in gtk+
  3. GNOME bug 688524: Expose gtk-primary-button-warps-slider as an X setting was marked as WONTFIX

Road towards fixing the behaviour

First up was getting commit access to xsettings-kde. This was initially written by various Mageia people using the example code included in the xsettings spec. Unfortunately it seems the maintenance more or less died as soon as it was moved to KDE. One of the listed maintainers is Colin Guthrie; the same Mageia person whom I always pester for getting fixes for things I don’t understand. Furthermore, I recently helped out Ben Cooksley (KDE sysadmin) by fixing a GNOME mailserver misconfiguration which caused problems for KDE. Surely us finally (configuration was there for years) not causing problems for KDE anymore was worth KDE commit access right?
A few days after requesting access it was the same Ben Cooksley who setup the account! Though probably not a good idea to follow the same path if you want KDE commit access. :-P

Next up: the gtk+ xsetting. At the time of requesting xsettings-kde access, I didn’t know that gtk+ lacked the xsetting to control the scrollbar behaviour. Reading the related bug it was pretty clear the WONTFIX was not so much about the xsetting itself: The bug wanted an xsetting which was controlled by gsettings. Having an xsetting in gsettings is pretty much over the top. We already have an ini file (applies to everything), xsetting manager/client, xsetting overrides key in gnome-settings-daemon, etc. A gsetting changing an xsetting? This resulted in the WONTFIX. Matthias Clasen was worried if KDE would actually use the xsetting. Quite nice to explain that I got KDE commit access specifically to improve xsettings-kde (+ok from Colin Guthrie). This resulted in an “ok to reopen”. The xsettings patch was outdated plus I didn’t like the chosen xsettings name, so I spend 5 minutes writing a new one. Most of those 5 minutes I spent on aligning my commit message with previous ones as well as figuring out the nicest place to put the one liner change.

Lastly: Patching it back into the existing Mageia packages. I then discovered I made a typo in the xsettings-kde patch. Ugh.

Response from users

<R> is the firefox misbehaviour under gtk3 on cauldron fixed now?
<M> yes, the scrollbar works fine, now

Also seems quite telling people are trying this out within 1 hour of me updating the packages!

The patches

For any distribution wanting these fixes as well. The easily backportable patches:

I’m going to send above information to the GNOME distributor mailing list with the request to forward it. Any GNOME packager should subscribe themselves to this mailing list!

Other desktops

Other desktop environments should determine for themselves if they want to change GTK+ behaviour. Any Qt using distribution should make use of xsettings-kde. If a desktop environment (e.g. MATE) is maintaining a gnome-settings-daemon fork, one way would be to change the ‘fixed_entries’ variable in plugins/xsettings/gsd-xsettings-manager.c. If the desktop uses a custom GTK+ theme, another solution would be to store a settings.ini in the theme directory next to the gtk.css file. I’ve suggested to the Mageia MATE packager to reach out to MATE.

Future

Various other xsettings which might make sense to set under KDE. There’s some backlog in the xsettings-kde maintenance which needs to be done. For the backlog I probably need to find some assistance (I’m not a C developer). I need to check if there are outstanding bugs and where they are.

My intention is that GTK+ under other desktop environments at most is considered different. GTK+ should not be out of place (or worse).

Hardware accelerated video playing with Totem

Introduction

Various months ago I had hardware problems. To debug this and because I wanted a small server I bought an Intel NUC5PPYH. It’s a really small low power PC. Using this I discovered that my hardware troubles weren’t related to my SSD. Since that time I’ve been using the NUC as my main machine. My previous machine had upgraded parts, but GPU/motherboard and memory all were from around 2007. A slow low power 2015 NUC is somewhat in the same performance range as that 2007 machine (50% slower in some things, faster in others) while using way less power. My previous machine had 2 cores, the new one has 4.

My previous machine already had difficulty with some of the super high quality videos. Depending on the settings, some videos can use a very high amount of CPU. The CPU of the NUC is slightly slower to play videos.

Initially the various GNOME video playing bits crashed when trying to play video. Those crasher bugs got fixed, but Totem never properly played anything. I quickly discovered that mpv didn’t have any problem with hardware accelerated video playing, so used that and stopped filing bugs.

It helped me to improve the Mageia mpv package. Ensuring it had an OSD, was compiled with vaapi support, etc. Then recently gstreamer-vaapi 0.7.0 was released and gave me the idea to try Totem again. I’m guessing that change made things work, though not exactly sure.

Hardware accelerated video playing

Two frames from Tears of Steel showing Koen Martens, GUADEC 2010 organizer (together with Vincent and Reinout). First screenshot shows Totem with 6-7% CPU usage. The second shows MPV with 3-4% CPU usage. System Monitor itself uses around 20% CPU. Now that it works nicely, I’m working on having Mageia 6 automatically install VAAPI for you if your system has a similar GPU as mine.

Playing 1080p movie using Totem with 6-7% CPU usage
Tears of Steel using Totem – 6-7% CPU
Playing 1080p movie using mpv with 3-4% CPU
Tears of Steel using MPV – 3-4% CPU

Secret bonus: Polari

If you look at the CPU usage, you’ll not spot something. I’m also running Polari on a different workspace. It previously used 10-20% even when idle. I filed a bug but the developer couldn’t reproduce. Now I cannot reproduce as well — 0% CPU!! :-D

Pranking and the horrors of VBA

Various years ago I thought it would be a fun way to brighten someones start of the day by having the browser go to a Youtube clip of “Hey DJ”; a nice reference to his nickname (DJ). One way of doing this in Windows is by adding a shortcut to the “Startup” folder, making it pretty obvious and easy to remove. Further, it avoids any resets of the homepage (group policy and/or login scripts). Many months after this I noticed that he quickly closed his browser after he had to restart his pc. Despite him raising various tickets with the helpdesk; his browser kept going to Youtube whenever he logged in. The helpdesk couldn’t figure it out; not even after looking at it various times over the course of a few weeks. It was just easier to keep closing the browser than to try and get it fixed. My attempt to make him laugh had some unexpected results! After that I decided better not to do anything even if not meant in a bad way.

Though in previous example I didn’t have any bad intentions, some people think it is funny to prank you by changing things on your computer. I don’t particularly like people touching my computer, even if I forgot to lock it. One person changed my chat status. I wanted to get  a bit overboard in my response to avoid having to deal with it ever again. This requires delving into Windows, MS Office, etc.

In my example I was trying to be obvious. This time the goal is to make it difficult enough to detect. Knowing the knowledge of the helpdesk, my concern was more with the ability of the person than the helpdesk. It should still be kept simple as that’s often overlooked. As such I thought of the following:

  • Run a script as a scheduled task (to avoid being able a running process)
  • Execute actions randomly to avoid figuring out that the script is scheduled:
    • Only once every random X minutes
    • Only after a delay of a random seconds (Windows task scheduler can do this automatically)
  • Only starts at least 1 day after being installed (to avoid noticing any link between “infection” method and results)

Above is actually really easy to do from VBA (the horrid language used in MS Office). Though VBA is terrible the automation options within Windows are endless and way better than Linux. Almost anything on the system is exposed as an object so you don’t need to mess around with starting commands and checking either exit codes or parsing command output. You can easily control the scheduler as an object for instance.

On to the pranking itself: What to do was fairly easy thanks to Google. Not only can you quickly find nice suggestions, there’s often some code included as well. In the end I created a script which randomly selects from the following pranks:

  • Say something via the speaker (using text to speech engine)
  • Mute/unmute sound
  • Send enter key to running application
  • Send backspace key to running application
  • Increase the volume 3 steps
  • Decrease the volume 1 step
  • Press capslock key
  • Press alt-tab (switches applications)
  • Change mouse to a left handed mouse
  • Show Google in the browser
  • Minimize all windows
  • Tile all windows horizontally
  • Show taskbar properties
  • Show the window switcher mode (win+tab)
  • Send users name to the running application
  • Open some internal website

Some actions are only executed based on the idle state. E.g. not idle, idle for 2 min, etc. This helps in ensuring the person gets really annoyed.

Outcome: Infection was fairly easy. However, I made a very stupid error, resulting in the person being really suspicious and eventually figuring out that I put a script on his pc. Fortunately the person is still unable to find the script (yay hidden files!), nor is aware that something like a task scheduler exists (simplicity is good). Even if he’d know about the task scheduler, you can even hide tasks in there (which I obviously did). To be clear: the person is still suffering from all pranks listed above. :-P

Initially I wanted to post the source code as well, but I’ll spare you. There’s nothing like try/except, etc.