" itemprop="description"/>

JSE's Blog

Jonah's blog is here

So someday I'd like to write more about NTFS and Linux support of the Microsoft designed file system overall, however too much to do now -- like redesign this blog, so perhaps I'll do this some other day.

What I wanted to write about today is simply a quick tweak I do on many linux distros that helps improve NTFS performance, and make mounting filesystems instant like windows. This makes, for example, having multiple disks easy to work with without having to muck around with /etc/fstab if you have a disk you want to work out of instantly upon boot without having to manually mount them -- something I occasionally do.

Anyhow, to do this, I use a daemon called "udevil" (a play on udev). "udevil" will automatically mount filesystems as soon as they're connected, and it has the added bonus of you being able to specify which mount options you want as well.

Because one thing you might realise about NTFS support (using ntfs-3g, the FUSE ntfs driver that pretty much every distro currently uses) is it is crazy slow. Thankfully, there is a mount option called "big_writes" which you can apply to NTFS-3G which speeds up write operations. There's discussions on the internet about what this does but the tl;dr of it is: 1. It makes NTFS write operations faster on linux 2. It's safe to use (so why isn't it default!?!?)

Now of course, you can always just mount ntfs manually with big_writes and not use udevil. In my cause this isn't convenient so the rest of this post is about automating this task.

So first, install udevil on your distro: Debian/Ubuntu: sudo apt install udevil Arch/Manjaro: sudo pacman -Syu udevil

Next, go to /etc/udevil and edit the file udevil.conf

Scroll down to the "default_options" section and find the line default_options_ntfs. You will see a number of options there which udevil will use when it automounts ntfs drives, with each option separated by a comma. At the end of the line, add the option big_writes after a comma.

Next, scroll down a bit more and you'll see allowed_options. Add big_writes to allowed_options as well. You will likely notice there is no allowed_options_ntfs section on most distros. You are free to add this if you like, however there is no harm in my opinion to just add it to allowed_options.

Save and exit the file.

Now, I'm going to presume you use systemd. You must enable a service called "devmon" to make everything work. Devmon requires a username specified, in my cause, my user on my system is jse, so simply running: sudo systemctl enable [email protected] Will enable the service.

To avoid rebooting and use devmon now, you can then run sudo systemctl start [email protected]

And of course, if you change the config, go ahead and restart the service. Don't forget if you misconfigure it (such as forget to add the mount option to allowed_options which is what I initially did lol), log files are your saviour ;)

Hope this helps. Enjoy the automounting and better NTFS performance! :)

So OVH has it's pros and cons. Ok... well... lots of cons, but the main pro is that they're cheap for dedicated hardware.

So anyway, I have this problem with SSH dying ALL THE TIME if you leave the prompt idle, and it's super annoying. Thankfully, this is easy to fix with your client alone. Here are the settings for each of the work environments I use:


On windows, you probably use putty. If you don't, well, I don't judge. Maybe you judge me, I use putty.

Anyway, all you need to do is go to the "Connection" category, and set the keepalive interval to something like 30 seconds. If you use profiles, just save the profile too.

Putty keep alive interval screenshot


On linux, just go to your ssh_config file. Not to be confused with sshd_config, which is for the ssh server, this config file is for the openssh client that is pretty much included with every distro.

Generally, this is located in /etc/ssh/ssh_config on every distro I use, but if not, look for it.

Just add to the config: ServerAliveInterval 30 Or whatever interval you want, again, this is in seconds.

Ok thanks have a good day! o/

So a while back I posted this video on getting osu! working on linux. It was incredibly low effort (like so low effort I cringe just watching it) so I thought it was hilarious it even has gained the views it has, but whatever. There has always been numerous guides on the internet regarding osu! Linux support, but I've found the best, tried and true method for getting it to just work is to use the Lutris installer. It's not perfect, but it doesn't require any of the tedious tinkering many of the other guides suggest.

Now thankfully, osu!lazer is becoming more and more feature complete as the days go by, so soon we will see it eventually support online play, which has full Linux support, but in the mean time wine is where it's at.

Wine is to the point that, with the easy tweak scripts provided by Lutris, the ability to run osu! (and many other Windows only games) on Linux is pretty much flawless. Even the bugs I encountered in the video I made don't seem to happen anymore, at least for me, so it seems things have improved even in the last year or so.

One thing that has changed though is Discord-RPC. You might notice, if you check the Lutris install script, that it fetches a discord-rpc.dll to override the one osu! (used to) provide. Why?

Well the reason goes back to the differences in Windows vs Linux IPC (Inter-process communication). Discord RPC on Linux uses UNIX sockets for games to communicate with the discord client, but not for Windows of course. The modified discord-rpc.dll file was designed to translate the Windows Named pipe (how discord and games communicate on wind0ws) to something Linux can understand, and thus worked with the Linux client. Unfortunately, due to some changes, discord-rpc.dll is no longer in use by osu! it seems, so the file gets instantly deleted from the install, regardless if you copy the modified dll or dll that was originally included discord-rpc.dll file.

Anyhow, back to wine. Since wine implements Windows functionality, including named pipes, I wondered why can't we just get the Windows version of Discord working. This actually worked, to my surprise, as I know Chromium (which Discord uses in the background) has traditionally not played well with Wine. Seems wine has improved immensely in that regard.

The new ("easy") solution I use now for getting Discord RPC working with osu! on linux is to merely run Discord's windows client itself on the same wine prefix as osu! is running on.

What's a wine prefix? Think of it like a "virtual" install of Windows, only, it's wine. Given how wine is finnicky at best sometimes, the general practice is to install each application, or game, in a unique prefix. This is because depending on the app, sometimes an app requires dependencies that are incompatible with another app. This isn't always because the app itself would behave this way in Windows, but because some libraries may not work for wine unless it's appearing as a different version of windows.

Anyhow, we can't follow the general "each app in it's own prefix" philosophy in this case, since each instance of wine cannot communicate with each other. Instead, you need discord to run in the same prefix as osu!

Thankfully, it appears Discord will generally install nicely on wine of any recent version. You do seem to need .net installed for it to work, but after that the installer, and client will load up correctly. osu! requires .net anyway (lutris installs 4.5.2) so since we're going to be installing discord in the same prefix, we don't need to worry about any winetricks.

There are a couple key changes you will need to make in winecfg first however. First, you need to change Wine's windows version from "Windows 2003" to "Windows 7". In case you're wondering why it's Windows 2003 to begin with: Lutris calls on winetricks to install .net 4.5.2 (as is necessary). Part of this "winetrick" is to set the Windows version to Windows 2003 to work around some bugs that it would otherwise encounter. Now, I'm not certain if those bugs are just related to installing .net itself, or with certain functions that are incompatible otherwise in .net (perhaps there are bug reports on winehq or with winetricks that discuss this), but I've not encounted any bugs doing this regarding discord + osu!

I did, however, try setting it to Windows 10 as well, but setting this causes super amounts of lag to the osu! client when you attempt to search your beatmaps, so if you feel Windows 10 might be a better choice, I advise you don't. Still, your milage may vary. Consider yourself warned if you decide to play with this.

Next, and this is important otherwise the discord client would eat my mouse due to this bug, you need to disable your Window manager from decorating Wine Windows, which is on the graphics tab of winecfg.

Once you've made these two tweaks, installing and using discord seems to work fine, and as long as osu! is running after you've opened the windows version of Discord, RPC will work. If this is all you're after then problem solved! Enjoy your discord RPC integration in osu!. Just remember to launch discord in the same prefix before osu! to get RPC integration.

Okay now for some additional ramblings not really related to Discord RPC + osu! on Linux.

You may now find yourself being tempted to switch to the Windows discord client and dumping the linux client. It appears to work at first glance, right? So why have a notorious electron app running twice in the background anyway?

First off: I was pleasantly surprised at just how much of the client is functional. However, as soon as you make a call or join a voice channel, you'll probably notice the problem. Discord will crash, reload, then reattempt to join again, only to crash again since joining is what caused this issue in the first place. Rinse, repeat. If you happen to have the debug info, you'll probably notice the console output say:

wine: Call from 0x7b031dbf to unimplemented function qwave.dll.QOSAddSocketToFlow, aborting
wine: Unimplemented function qwave.dll.QOSAddSocketToFlow called at address 7B031DBF (thread 00f0), starting debugger...

It seems qwave.dll in Wine is just a stub library, which discord makes a call to for an unimplemented function that doesn't exist in the dll, causing the app to crash. Thankfully, this library isn't too special in that you can easily trade in this DLL for one from Windows and wine will work with this just fine.

Now just to be clear, swapping out dlls in wine for windows ones probably violates some Microsoft license, not to mention it can result in catastrophic behavior from wine, but that's up to you to deal with. Let's just say though, that there are a number of websites on the internet that allow you to download this DLL. Just make sure you get one from something like Windows 7, since I read somewhere there are API calls in newer versions of this said library that Wine doesn't support yet. I went with a version 6.0.6001.18000 of the DLL, which I think is from Windows Vista since NT 6.0 was Vista.

You will need to get the 32bit version of this dll and paste it into your system32 directory of the wine prefix. If you happen to be using a 64bit prefix, then you will need to paste it into your syswow64 directory instead. In my case, syswow64 doesn't exist as Lutris just makes a 32bit prefix for osu!, so mine was located at /home/jsebean/Games/osu/drive_c/windows/system32/.

Once I did this, I went to winecfg, went to the DLL Overrides section and changed qwave to native since this is a native DLL, not a wine dll, then just restart discord. Now, connecting to voice channels works perfectly in wine. Hooray!

Now all that's left is to make an easy to use shortcut to launch discord. I did this in Lutris by just hitting the + button in the top left, click "Add Game", enter in the name Discord and pick wine as the runner. Finally, and this is important, you need to clone all of the settings you have from osu! as this runs in the same prefix except for the executable. Be sure to toggle "Show advanced options" at the bottom to see them all. For me, the options are setting the executable (For me, I just set /home/jsebean/Games/osu/drive_c/users/jsebean/Desktop/Discord.lnk). Fore prefix, it's /home/jsebean/Games/osu, set 32bit for the prefix, set the wine version to be identical, and whatever other options are set. Typically "reduce pulseaudio latency" is also set, but I turned this off.

After all that Discord should get it's own launcher in Lutris and you can easily create a shortcut. Everything seems to work now :)

Now here's to hoping we might see this API become available in wine so all this hackery wont be needed in the future.

UPDATE: It appears this bug has been fixed and everything should work fine in wine 5.4. It has also been backported to 5.0.1.