Do you have a minute to talk about our lord and savior, Zen buddhism?

I’m (re)reading a lot of Brad Warner’s books during these holidays. If you ever feel like learning about no-bullshit hardcore Zen buddhism from a punk bass player and ordained Zen master (who hates that term), I can recommend: Sit Down and Shut Up, Don’t Be a Jerk and It Came From Beyond Zen, in that order. You can also try Hardcore Zen, the original work

Brad explains Zen itself and Eihei Dōgen’s Shōbōgenzō in plain English so you don’t have to spend 30 years studying classical Japanese. Dōgen was about 800 years ahead of his time, so reading him now is excellent timing

The books are short and if they pique your interest, you can always follow up with the very compact, unrelenting and and intense Mastering the Core Teachings of the Buddha by Daniel M. Ingram.

Brad’s stuff is at http://hardcorezen.info/store, Daniel’s book is free at http://integrateddaniel.info/book/ and I’m just a fan and not affiliated with either person.

Takeaways from Eindhoven Metal Meeting 2018

The festival was great in theory, but also way too cramped, more so than usual. That’s why there aren’t many takeaways:

  • Necrophobic. I saw them live a few years ago but somehow didn’t realize they’re this interesting. Bought Mark of the Necrogram, but they have a sizeable backlog I now have to work on. Unfortunately, they don’t seem to be on Bandcamp so I had to buy from one of the evil empires (Google in this case).
  • Slægt. A sort of blackened heavy metal from Denmark. I don’t like all the songs but the style mixture is compelling. Slægt on Bandcamp.
  • Desaster. A thrash and black thing? Maybe. It’s a bit straightforward for the most part so I haven’t bought any albums just yet, but they had a very energetic stage presence so the show felt great. If they’re at some other festival or on a solo tour I’d definitely consider going.
  • Wiegedood. Can’t decide if it’s plain black metal or if they’ve mixed a harsher type of shoegaze into it. Think of a heavier Alcest song played on a slightly broken amp that you run too loudly.

Usually I find more bands at EMM, but this time it was almost impossible to watch any acts on the small stage because everything was so packed with people. This is a shame, as it’s the small stage that has the more underground stuff and I’ve discovered at least 10 groups there in the last two years.

Of course you can always watch some of the more interesting-sounding parts of the lineup on YouTube, but that’s so not the same. Oh, well.


Making Steam’s magic work when using a Dual Shock 4 controller

A few kernel versions (or Steam versions) ago, my Dual Shock 4 controller spontaneously stopped working in Steam. Big Picture mode said “no controller detected” and only games that had their own native DS4 support managed to still use it.

Looks like you need some udev rules to make sure all things are good. For my wired DS4v2 I stuck this:

SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
KERNEL=="uinput", MODE="0660", GROUP="myusername", OPTIONS+="static_node=uinput"
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"

into /etc/udev/rules.d/99-ds4.rules. And reloaded udev. Thanks Xard and others from Freenode’s #gamingonlinux for the pointers.

Getting rtl8814au USB sticks like the ASUS USB-AC88 to actually connect

If you’re forced to use newer and more bizarre USB wifi sticks that rely on the rtl8812au/rtl8814au chipset, you need to do two things:

  1. Compile the driver yourself, since most distros don’t include one
  2. Tell NetworkManager to stop randomizing MAC addresses for that device

You can get the updated source from diederikdehaas’ project on GitHub. The build instructions there are great and the driver integrates with DKMS. However, you won’t be able to connect because NetworkManager is scrambling your MAC address. To make it stop, add this to /etc/NetworkManager/NetworkManager.conf:

[device]
wifi.scan-rand-mac-address=no

And restart NetworkManager (systemctl restart NetworkManager on e.g. Debian 9). With MAC scrambling enabled, the interface came up for me but failed to authenticate.

The solution is from this issue on GitHub.

Wanna use a Mayflash DolphinBar with Dolphin on Linux? You’ll need this udev rule

This is what I needed, I put it in /etc/udev/rules.d/80-dolphinbar.rules:

SUBSYSTEM=="hidraw", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", MODE="0666"

I can’t remember where I found this, I’m pretty sure I didn’t figure this out for myself. If you need a DolphinBar, Aliexpress should have you covered. It could be that the vendor code differs for yours, so make sure to watch dmesg when you plug it in.

Build your own Spotify-like music streaming solution using mpd

Since I distrust centralized services such as Spotify that can delete content you love at any time they like, I’ve always bought my own music and have a huge collection. But there’s no denying that streaming music to any device or location is a useful feature. You still don’t need Spotify for that, thanks to the FOSS community you can build your own Spotify-like streaming system, and this guide shows one combination of software to accomplish this.

The goal: Stream your music collection from your own PC (or NAS or whatever storage you have) to any web browser, mobile phone and desktop clients.

The method: A little Linux magic involving the following components:

Continue reading “Build your own Spotify-like music streaming solution using mpd”

Yet another way to get a tear-free, stutter-free desktop with Plasma/KDE and Nvidia

So the proprietary Nvidia driver is a large, steaming, smelly pile of shit. At least that’s the impression you get when you read what developers say about it. There’s a bug here and a workaround there, and we haven’t even started talking about the messy situation that is EGLstreams yet. So why do people use Nvidia cards on Linux? Because so far, they give good bang for the buck, use relatively little energy for what they do and work with all commercial games. I’m pretty sure those are the reasons, anyway.

But Nvidia at least on Plasma/KDE has some serious problems with tearing and stutter — I have three Nvidia setups and they all are unsatisfying out of the box. If you use ForceCompositionPipeline like I recommended earlier, you will probably run into stutter issues. But I think I found the perfect setup now, stutter-free and tearing-free for desktop use as well as perfect for gaming.

There are two alternatives:

Method 1: Solve it by switching the GL yield mechanism to USLEEP

Add the following to ~/.config/plasma-workspace/env/kwin.sh:

#!/bin/sh
export __GL_YIELD="usleep"

Thank mahenou on Steam for suggesting I try this again. The first time I did, it was probably too late in the environment for Kwin to pick it up. It’s important that the var is set when Kwin initializes.

Method 2: Solve it by forcing triple buffering

Add the following to ~/.config/plasma-workspace/env/kwin.sh:

#!/bin/sh
export KWIN_TRIPLE_BUFFER=1 

And chmod +x the file. Then add the following to an Xorg config snippet, for example /etc/X11/xorg.conf.d/20-nvidia.conf:

Section "Device"
        Identifier      "Videocard0"
        Driver          "nvidia"
        Option          "TripleBuffer" "true"
EndSection

Finally, enable compositing and vsync

Then make sure you have compositing enabled in System Settings -> Display and Monitor -> Compositor. If you are very doubtful, do a restart. After that you should have a perfect, tear-free and stutter-free desktop experience. I had to disable compositing manually with Alt-Shift-F12 before starting games with the triple buffering method. This was unnecessary with the __GL_YIELD method.

I can’t truthfully explain why this works, but I know it works around a bunch of bugs and unexpected default settings in the Nvidia driver. Also, Kwin is now able to compute the right timings and handle triple buffering instead of rendering half-finished frames like a fucking moron when it still believed Nvidia was doing triple buffering by default.

For me this has been wonderful. The desktop is smooth as if I were using a proper graphics card like an AMD RX 580 with Mesa. Games run exceedingly well, and there is no stutter or delay like with ForceCompositionPipeline. Not even in videos. It’s all just perfect.

This is a mix of hints received from several people on Reddit and Steam that I unfortunately forgot the names of, as well as info from the Arch Linux wiki. I’d like to thank all these people for their knowledge.

Working around broken firmware for Realtek USB WLAN adapters on newer kernels

If you run a combination of newer (4.9ish) kernels and systemd, your USB wifi networking gear probably now gets funky names such as “wlx74da387e95fe” instead of “wlan0” like you were used to back in the good days. This wouldn’t be so bad, only that the firmware on those dongles can mess up when the device gets a long name. Suddenly it won’t let you connect to your wireless network, claiming that the network does not exist, even though you know for a fact that it does. What your machine is actually trying to say, I believe, is that the network device doesn’t seem to exist.

If you have those symptoms, this answer by Maciek on Stackexchange will probably help. I encountered the problem while using one of the Edimax USB wifi dongles that are popular on the Raspberry Pi.

I had to add this to /etc/udev/rules.d/70-persistent-net.rules:

# edimax USB stick
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ba:ba:ba:ba:ba:ba", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan", NAME="wlan1"

Substitute your own dongle’s MAC address for ba:ba:ba:ba:ba:ba and things should work. Of course make sure wlan1 isn’t taken already. If everything turns out well, your dongle now has a sane name again and connecting should just work.

Using Xbox 360-compatible controllers properly inside WINE

Update: There are now easier ways to manage this, for example through Lutris. If you manage your WINEs in Lutris, you simply have a checkbox whether to include dumbxinputemu or not.

If you need to use WINE to play some Windows games, the lack of Xinput support might get on your nerves. WINE maps joystick devices to Dinput. That works for some older games, but buttons need to be mapped manually, and many newer games don’t detect the controllers at all because they expect Xinput.

I tried to get by this issue using x360ce, but this is a fickle beast already when run natively on Windows; even more so in WINE. What worked really well for me was dumbxinputemu. Sometimes dumb things are the best.

To use it, determine if you’re running a 64-bit or a 32-bit game, then copy at least the matching xinput1_3.dll from the latest release to the same directory as the game’s binaries. In the case of Steam, that’s probably somewhere inside Steam/steamapps/common. Then make sure your WINE is set to prefer the native version of the DLL via winecfg:

In the “New override for library” dropdown select “xinput1_3”, then “Edit…” that entry to set it to “native” only. If you have a very new game, you might need to do repeat all these steps for xinput9_1_0.dll. This worked surprisingly reliably for me, no more double-detection of joysticks, no more wrong labels for buttons inside games, no more fiddly x360ce that works sometimes but then mysteriously breaks. Everything behaves as it shoud. Thank you, kozec.