Rescuing an old Kobo Aura H2O that keeps bricking itself

I used to be a big fan of Kobo ereaders because they let you install your own fonts and gave you (often, not always) DRM-free ePub files. But my opinion changed a little when they bricked my beloved Kobo Aura H2O via a regular software upgrade.

To add insult to injury, the built-in recovery procedure is broken as well. Once your device is restored, Kobo claims that it must connect to a wireless network in order to add an account. Otherwise it won’t even let you read books you copy over via USB. But it can’t connect to wifi, presumably because the rescue firmware is so old.

Both of those claims are lies, as we can prove:

  • Grab a newer firmware (but not the latest one) from this website. The only one that was still functional for me was 4.35.20400.
  • Install it by extracting the ZIP file to the .kobo directory on the device.
  • Once you can mount the device on your PC, you might want to skip logging into a Kobo account. This can be accomplished by manipulating the onboard sqlite database at .kobo/KoboReader.sqlite:
insert or replace into user
  (UserID, UserKey)
  ('-', '-');

drop index if exists analytics_events_timestamp;

create trigger if not exists delete_analytics
after insert on AnalyticsEvents begin
  delete from AnalyticsEvents;
Code language: SQL (Structured Query Language) (sql)

Source: Jacob Albano’s blog (thanks!)

Unmount, restart and now you can use your Kobo entirely offline, prevent any future broken firmware updates and also sidestep the account requirement. Note that your user will simply be called “- -” and you’ll have no way to retrieve any purchases from the Kobo store this way, at least not from the device itself. You’ll have to copy over the .epub files from your PC.

But hey, at least your hardware works again and you don’t have to bring it in for recycling. I’ve been using the same reader for over 10 years now and I don’t see any compelling reasons to get a new one.

A half-decent escape from Google Photos

Maybe recent events made you aware that Google can arbitrarily suspend your Google account forever depending on the things you take pictures of. Even if they’re harmless things and the activity on your account was innocent and legal. What can you do if you want to avoid this risk and stop using Google Photos, but still want somewhere to put your phone snapshots?

A screenshot of PhotoView (courtesy of

For me, the auto-sync features from Android devices was Google Photos’ killer feature, so that’s what I wanted to replace. Now I have the following self-hosted solution:

  • Nextcloud for synchronizing photos to a small staging area on cloud storage
  • FolderSync because Nextcloud on Android can’t do proper two-way sync for photos
  • PhotoView to view photos from the NAS where they’re sorted and stored long-term

I’ve experimented for some weeks before settling on this configuration, read on if you want to know what my workflow ended up being.

Continue reading “A half-decent escape from Google Photos”

Render emoji in color even if your default font doesn’t want to

In some situations, you may end up with emoji displaying in color in GTK applications but not in Qt ones (such as Kate, Konsole, etc.)

If you’re sure you have a color emoji font installed (e.g. fonts-noto-color-emoji) and still get most emoji in black and white, it might be because your system default font provides black and white emoji already. The color font further down the line is never matched so you get black and white emoji instead.

The cause of this problem is very complicated but the solution is easy: Slap this into your /etc/fonts/local.conf (and maybe run fc-cache -f as root):

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
    <family>Noto Sans</family>
    <family>Noto Color Emoji</family>
    <family>Noto Emoji</family>
    <family>DejaVu Sans</family>
    <family>Noto Serif</family>
    <family>Noto Color Emoji</family>
    <family>Noto Emoji</family>
    <family>DejaVu Serif</family>
    <family>Noto Mono</family>
    <family>Noto Color Emoji</family>
    <family>Noto Emoji</family>
</fontconfig>Code language: HTML, XML (xml)

Shamelessly stolen from various sources.

Preventing MPD’s HTTP audio stream from turning silent on song change

If you stream audio in various formats from MPD to music clients, you may have run into a problem. Sometimes audio might simply go silent on a track change even though your MPD client says it’s playing the next song. This might actually have something to do with your player: some players don’t deal with audio frequency or resolution changes well. If you have audio in various resolutions and bitrates, this can trigger such a silence.

There’s one way to work around this, forcing your audio output to always have the same frequency and resolution via the format option:

audio_output {
  type        "httpd"
  name        "Whatever"
  encoder     "lame"
  port        "8001"
  bitrate     "320"     
  max_clients "8"    
  mixer_type  "software"
  format      "44100:16:2"
  always_on   "yes"
}Code language: JavaScript (javascript)

The always_on option may help as well with especially picky audio players. It produces a constant stream of silence so that there is always a bitstream for clients to receive.

A problem with this approach is of course that if you have a lot of audio in e.g. 48 KHz and 24-bit, the resulting stream will be downsampled. But you can try using e.g. 48000:24:2 in this case. I’m not sure if upsampling 44.1 KHz content to 48 KHz might introduce audible artifacting; I certainly can’t hear it.

Thanks to Neo-Desktop on GitHub for digging up my old gist about this issue and testing the workaround.

Google’s monopoly on the APK trust chain

Tomáš has an interesting article on trusting APKs from third-party mirrors.

Since Google is the gatekeeper of the APK trust chain, it’s not easy to independently verify APKs; Google doesn’t even give you the package signatures. The article shows a nifty method for extracting them by (ab)using the εxodus privacy audit project.

Do you know of a better way?

Flickering UI when running Windows Steam through WINE

Update 2011-07-19: This trick should no longer be necessary, at least not when playing Pinball FX3. Recent versions of Proton now include the anticheat support that Pinball FX3 requires. I would have preferred if Zen Studios had made anticheat optional when playing in single-player/offline mode, but OK, this is good too.

Okay, this one requires some explanation. There is one game I like that simply won’t work on Linux through Proton, and that’s Pinball FX3. The reason is probably some sort of weird anticheat mechanism the developers use; it just crashes on launch.

Now the problem isn’t the game itself: Once you crack the game, it runs perfectly fine. It must be something in the anticheat DLL that causes the crashes. The issue has been listed on Valve’s Proton issue tracker since 2018, so I’m not entirely sure there’s anything Valve can do about it. But several enterprising people in the Pinball FX3 discussion boards on Steam have discovered a solution: Just install the Windows version of Steam in WINE, then install Pinball FX3 in there. Works perfectly!

It seems WINE is good enough to offer whatever Windows syscalls the Pinball FX3 anticheat requires. The only problem I had when playing like this was that the Steam UI is flickering in and out of existence, and it’s hard to choose a game to start when you can’t see it half the time. But Redditor Lemonzest2012 has a nifty workaround:

wine steam.exe -no-browser +open steam://open/minigameslist

This not only works around the flickering, it also saves on resources and fixes another problem: steamwebhelper.exe randomly taking up 100% on entire CPU cores. Which is a thing. I swear.

What have we learned from this?

  1. Steam can be a dumpster fire.
  2. WINE does a bangin’ job implementing ye ole Windows syscalls.
  3. Zen Studios (the people behind Pinball FX3) should offer a native Linux port. They did sort of promise they’d look into it once Pinball FX2 (yes, two!) comes to Steam, but it’s been nothing but crickets since. That was in 2013. What’s almost a decade between friends, eh?

If you would like to support a digital pinball developer who hearts Linux instead, try Zaccaria Pinball. The newer “Deluxe” type tables are very good indeed, the thing runs smooth as butter even on moderately powerful hardware and the lighting in their engine is just delicious 👌

Fix for keyboard layout resetting to US on every login after installing Zoom

For several months now, my keyboard layout would reset to English (US) every time I log into Plasma. I’ve tried every possible way to force it to my preferred layout, EurKey, but nothing worked: xorg.conf snippets, localectl configurations, it seemed Plasma simply ignored these settings.

At first I blamed Plasma, but it’s innocent: The problem is Zoom! The Zoom package contains an unnecessary dependency on IBus, at least in the RPM that Zoom packages for openSUSE. IBus comes with its own keyboard handling and is useful if you want to type text in Chinese, Japanese, Korean or other languages using non-Latin characters. But it also means that if you don’t configure IBus, your Plasma session will start with English (US) no matter what XKB keyboard layout you have set in Plasma.

The solution, at least until Zoom fixes their package, is to tell IBus to use your XKB keyboard layout. Right-click the IBus widget in the system tray and go to advanced preferences:

Here, select “use system keyboard layout”. This will force IBus to use whatever is set via XKB.

No more Google Fonts here

Using Google Fonts on your site is a privacy problem because it allows Google to track your visitors even if you don’t use any other Google APIs or services. Why did you think Google so generously lets you use those fonts for free?

I asked the WordPress developers for an option to remove them (also in the admin panel) several years ago, but they were not really willing. It seems the situation hasn’t changed in the meantime, but there is now at least a third-party plugin that allows you to disable/remove Google Fonts in many popular themes.

It’s updated regularly and seems to work, so cheers for that!

Improving fan noise on AMD GPUs using software only

My RX 580 has been giving me trouble recently. There is now an audible clicking when its fans spin up from zero RPM, and unfortunately, this happens a lot in desktop use.

Not wanting to invest in an aftermarket fan just yet, I looked for ways to manage the fan RPM curves while overriding the GPU BIOS and I found amdgpu-fan.

I prefer this to the other solutions out there for a few reasons:

  • Doesn’t need (or even have) a GUI
  • It’s just a small Python script
  • The config file format uses nice human-readable numbers (percentages, not absolute values)
  • The file’s a simple bit of YAML
  • The tool seems to rather smoothly calculate curves between the stop points you configure

To prevent the clicking noise when the fan engages, I set it to run at 35% RPM even as a baseline, and not ramp up until the GPU hits 60 degrees. At this setting, I can’t hear the fans during desktop use; goal accomplished.

My config for an XFX Radeon RX 580 GTS XXX Edition looks like this:

- [0, 35]
- [30, 35]
- [45, 35]
- [50, 35]
- [60, 40]
- [70, 45]
- [75, 52]
- [80, 78]
- [92, 100]Code language: YAML (yaml)

I also slapped a systemd service into /etc/systemd/system/amdgpu-fan.service to activate on boot:

Description=amdgpu fan controller


WantedBy=default.targetCode language: TOML, also INI (ini)

So far, I’m happy!

Automatically unlock kwallet after KDE/Plasma login on openSUSE Tumbleweed

There’s a reason for the very specific title: It seems this feature is configured a little differently on Tumbleweed than on openSUSE Leap and I haven’t found any up-to-date information on this. So I’m writing this down as a note to myself.

A default Plasma desktop will use kwallet to save passwords for various desktop services (802.11x passwords, Nextcloud/ownCloud logins, SSH key passphrases, etc.). This can get inconvenient when e.g. Nextcloud wants to access the Internet, but the wallet isn’t unlocked yet, so Plasma can’t decrypt the WLAN PSK.

One solution is to:

  • Make your kwallet password the same as your user password
  • Ensure kwallet’s default wallet is called “kwallet” and that it’s the one that contains the keys you want unlocked on login
  • Make sure this wallet is using Blowfish encryption (this will not work in gnupg mode)
  • Install the require PAM modules

The package on openSUSE Tumbleweed is “pam_kwallet”, so:

sudo zypper in pam_kwallet

Log out from your desktop session, log back in and it should immediately work. In the past, you would have had to add the pam modules to /etc/pam.d/common-session or /etc/pam.d/sddm,but this is now done automatically.

The elegance of this is that you can still store more precious passwords in a separate wallet in Wallet Manager (just call that one something other than “kwallet”). That wallet can then be set to decrypt only on demand. This should save a lot of passphrase typing on a typical day.