Krita: Using built-in Lenovo C940 pen on Windows

What I expected When running Krita in Windows on a Lenovo C940 laptop I should be able to use the built-in pen to get pressure sensitivity. E.g. when using a pen which becomes larger the more you press. What I got The pressure sensitivity is non-functional but strange. On a normal document, when doing quick swipes with a pressure sensitive pen, there is a thin line and many large circles which appear haphazardly....

The quest for high quality sound on a Lenovo Yoga C940

Introduction I recently bought a new laptop, a Lenovo C940, and installed Ubuntu 20.04 on it. Everything works grand on it, except for the audio. When using Windows, the sound quality was great, however when in Linux, the sound is really tinny and can be harsh to listen to. It doesn’t matter if I use the speakers or the headphone-jack, both sound the same. The strange thing is that when I connect my bluetooth headphones (and use bluetooth A2DP), the sound is absolutely perfect....

Heroes of Might and Magic VI does not start (black screen)

What I expected After installing Heroes of Might and Magic VI and then starting it through Steam, the game should enter the main menu. What I got The game screen is only black and never enters the main menu. How I solved it Go to My Documents > Heroes of Might and Magic VI. Open ProfileData with your favorite text editor Replace <gfx_Fullscreen2>Fullscreen</gfx_Fullscreen2> with <gfx_Fullscreen2>Windowed</gfx_Fullscreen2> Start game. Game will be in windowed mode, but it’s better than nothing

Turn off caps-lock without the key

I usually don’t have a keyboard key mapped to caps, since I have my caps mapped to escape instead. However, from time to time it still gets activated. So to save me googling-time, this is the easiest way to turn it off: Alternative 1 xmodmap -e "clear Lock" Alternative 2 #! /usr/bin/env python from ctypes import * import subprocess class Display(Structure): """ opaque struct """ X11 = cdll.LoadLibrary("libX11.so.6") X11.XOpenDisplay.restype = POINTER(Display) display = X11....

Firefox on linux with a dark theme has black input fields

If you are using firefox on linux with a dark theme, unstyled input fields will have black background and white text. Sometimes just white text on white background. According to this bug report it has been this way for the last 17 years. To fix it, pop by about:config and add a new key-value (String): "widget.content.gtk-theme-override": "Adwaita:light". After restarting firefox, things will be as they should be.

Allowing access to programs in SELinux through modules

This page just describes how I have found out you can do to make stuff work in SELinux when they don’t. I feel there may be a better way to update SELinux in an organized manner. If you know how, don’t hesitate to send me an email at olle at iix dot se. Anyhow, here is my way of making stuff work at the moment. Locate the problem In this example....

Audio sounds crap on bluetooth headphones on Linux

So maybe sounds like crap is an overstatement, but compared to what it sounds like on windows / macos / my phone it’s not even a comparison. Apparently this is is caused by the pulseaudio-profile being set wrong. You can check available profiles by connecting to the bluetooth headphones and running pacmd list: profiles: headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown) a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: no) off: Off (priority 0, available: yes) When trying to set the profile, pacmd will refused (related to the available: no):...

No wifi drivers on macbook running linux

I recently decided to dual boot linux my macbook air from 2014 (or maybe 2015). Apparently dual booting on macOS works really well, since you will enter GRUB on normal boots, but can enter macOS by holding the alt/option key during boot. However, there are no free wifi drivers available, so you will need to download extra non-free drivers, which can be really annoying if you only have wifi to connect by, and wifi doesn’t work....

Guests are offline

This is a very broad title, and will probably not help anyone except for me if this happens for me again. One day when I had to restart my KVM host, none of my guests had internet connection. The eth0 on the KVM host was attached to a bridge (br0) and that host had connectivity through the bridge. Here are some configs (which had not changed since it worked): # /etc/network/interfaces source /etc/network/interfaces....

Restore after messing up a database

This is an example of doing a quick and dirty restore of a database. Typically happens after doing something stupid, like running UPDATE without a WHERE (oops). In this case, we restore database iix-notes (which by pure coincidence is the same name as this site) from a daily backup. The database is hosted on a postgresql docker container, but it should work the same regardless. Fetch a backup and copy it to the docker container cd $HOME gpg -o iix-notes....