forum

Installing osu! on Linux with low-latency [2022]

posted
Total Posts
273
Topic Starter
MarshNello
Welcome! o/

❤️ | Thanks to everyone who donated osu! supporter! I love you guys so much <3 | ❤️

Video example:
Houkago Rakuenbu - Houkago Kakumei [Revolution!] played on Zorin OS


Guide is also out on YouTube! Check it out here:
https://youtu.be/BdBcR8jfErc

A small introduction:

osu! working fine on Linux has been a thing for many years now, especially thanks to community patches and help, but it's time to make it even easier 8)
To install the game, we'll use my osu-winello script you can find at GitHub, which will handle the install itself.

Well, time to install osu! now!

Installation:

Just follow the commands and you'll be good e.e

========================================================================

Prerequisites:

First of all, check if you've already installed your GPU drivers.
You can read how to do that at here.

Then install PipeWire using the following commands (according to your distro):

sudo add-apt-repository -y ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt install -y pipewire libspa-0.2-bluetooth pipewire-audio-client-libraries
sudo add-apt-repository -y ppa:pipewire-debian/wireplumber-upstream
sudo apt update 
sudo apt install -y wireplumber
systemctl --user daemon-reload
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user mask pulseaudio
systemctl --user --now enable pipewire pipewire-pulse
Reboot and you should be done.

Remove PulseAudio:

sudo pacman -Rdd pulseaudio
And install PipeWire:

sudo pacman -Sy --needed --noconfirm pipewire pipewire-pulse pipewire-alsa wireplumber
systemctl --user enable --now pipewire.service pipewire.socket pipewire-media-session.service pipewire-pulse.service pipewire-pulse.socket
Manjaro users can instead use their distro's package:

sudo pacman -Sy --needed --noconfirm manjaro-pipewire
Reboot and you should be done.

Well, Fedora's latest versions already ship with Pipewire xD you might want to check doing this:

 sudo dnf install -y pulseaudio-utils
 pactl info
And if you see Server Name: PulseAudio (on PipeWire) you're good to go.

Now install Git, which is needed to download the script.

sudo apt install -y git

sudo pacman -Sy --needed --noconfirm git

sudo dnf install -y git

Done with prerequisites, time for the proper installation e.e

========================================================================

Installing osu!:

Installing the game is just as simple as this:

git clone https://github.com/NelloKudo/osu-winello.git
cd osu-winello
chmod +x osu-winello.sh
./osu-winello.sh
Follow the script's instructions and the installation will work with no problems!
You can launch the game after relaunching your terminal with:

osu-wine
or just using the shortcuts installed by the script e.e

But before playing, you need to adjust your universal offset to around -35ms, so that your osu! will sound just like on Windows.



Warning: -35ms is what I generally recommend, but try to find your sweet spot from -40ms!

And you're done! You can now play osu!



The script is bundled with some great tools too, you can check those with:

osu-wine --help

Check the troubleshooting box if you need any help or just write me on Twitter (@MarshNello) or Discord (MarshNello#4178) [OS in the ss is Zorin OS 16.1]
And that's it! Enjoy playing osu! on your Linux!

You used the old guide before and want the latest updates? See this.

Got any error? (Input lag, random crashes etc.)
Check the box below:

Troubleshooting:

What really affects input lag is desktop compositing, which is active by default on many desktop environments even when gaming.
If you're using Lutris to run osu!, you can disable it from the rule as you can see here:



If you are not, check the other box for "How to add osu! to Lutris" xd

If you don't know what Lutris is, just google it and install it for your own system (it's really simple).
After doing that (and launching it at least one first time), run:

osu-wine --lutris
and follow the instructions told there e.e

If your osu! throws some random error while playing or dealing with maps etc, reinstalling the prefix might just magically fix those.
You can do that with:

osu-wine --fixprefix
and then just launch the game as usual e.e

Gamemode is a tool which might improve your gaming depending on your system: to install it and try it, follow the instructions spunout enjoyer wrote here: https://osu.ppy.sh/community/forums/topics/1248084?n=61
(great job <3)

If you notice your game's actually running worse than before, just disable its rule on Lutris/don't use it when launching the game.

If after installing osu! your latency sounds strange and you want an even lower one, just apply gonX's PipeWire settings (don't forget to thank him for the help he always delivers with others on ThePoon's discord <3)

First of all, to prevent any missing files, run this command:

mkdir -p ~/.config/pipewire && cp -rv /usr/share/pipewire/* ~/.config/pipewire/ 

After doing this, you just need to edit the pipewire-pulse.conf file in ~/.config/pipewire/
I'll do it with nano:

nano ~/.config/pipewire/pipewire-pulse.conf

Here, you might want to push your latency as far as possible: starting from 256, try to find the closest value to 32 which makes your sound stable/not cracking. It depends on your pc, there's not a "default" value xD
I'll use 32 as an example, so edit the file like this:

context.modules = {
    pulse.min.req = 32/48000              # 0.67ms
    pulse.min.quantum = 32/48000          # 0.67ms
}

Once you've done this, just save with Ctrl+O and exit with Ctrl+X.
Reboot, and the settings are done e.e

First of all, make sure you installed the ntfs-3g package needed to read Windows partitions:
sudo apt install -y ntfs-3g
sudo pacman -Sy ntfs-3g
sudo dnf install -y ntfs-3g

Then, just copy the Skins and Songs folder to your Linux osu! folder, that you can find using:
osu-wine --info

Gosumemory actually works perfectly with this osu! guide e.e
Let's start from downloading the latest release from GitHub (you obv need to download the Linux version): https://github.com/l3lackShark/gosumemory/releases/
I'll go with amd64 since my PC is 64bits.

Now let's extract the file in the gosumemory folder: (remember to change "Downloads" to your language's name if needed!)

cd ~/Downloads && mkdir gosumemory
unzip -q gosumemory_linux_amd64.zip -d ~/Downloads/gosumemory/

Let's now run gosumemory once with:

cd ~/Downloads/gosumemory && chmod +x gosumemory
./gosumemory


Ignore the error and edit this file:

nano ~/Downloads/gosumemory/config.ini

Here, you need to edit these 2 lines like this: (replace username with your own)
You can find your osu! songs' path with 'osu-wine --info'

wine = true
path = /path/to/osu!/Songs

Save with CTRL+O and exit with CTRL+X.

Our gosumemory is now working, but let's create a script to launch it whenever we want:

nano ~/.local/bin/gosumemory

There, just paste the following:

#!/bin/sh

cd ~/Downloads/gosumemory
sudo ./gosumemory

And now just launch this one:

chmod +x ~/.local/bin/gosumemory

And we're done! You can now launch gosumemory whenever you want by just typing:

gosumemory
in your terminal! e.e

Last thing to do is: adding it to OBS.
Here, I reccommend y'all to use the Flatpak version of OBS (https://flathub.org/apps/details/com.obsproject.Studio) as it provides everything you might need for streaming.
Now open your osu!, launch gosumemory and then open your browser at this link: http://127.0.0.1:24050

Here you should see all the different overlays available: let's say I choose this one



You need to copy that link and paste in it OBS > Sources > Browser like this:



And you're done! PP Counter is finally working xD


OpenTabletDriver is the perfect alternative to any tablet driver.
Follow its guide to install it:
https://opentabletdriver.net/Wiki/Install/Linux

(Fedora users can use this: https://github.com/hwsmm/OpenTabletDriver.Packaging/releases/download/test/OpenTabletDriver.rpm and read more at here if they have problems not listed in FAQ.)

and enable it with:

systemctl --user enable --now opentabletdriver.service

Rebooting after that should be enough e.e

All these errors come from missing dependencies: make sure to install them all like told here: https://www.gloriouseggroll.tv/how-to-get-out-of-wine-dependency-hell/

You probably only need to reboot or reload PipeWire by doing this:

systemctl --user restart pipewire pipewire-pulse
systemctl --user daemon-reload

========================================================================

Credits:

Special thanks to:

  1. KatouMegumi's guide
  1. ThePooN's Discord server
  1. GonX's wine-osu builds
  1. hwsnemo's prepackaged wine-osu and patches
  1. l3lackShark's gosumemory
And to everyone willing to help! :3
- Marco -
Welcome to Linux or as I've recently taken to calling it, GNU plus Linux👍
hinuiiik

- Marco - wrote:

Welcome to Linux or as I've recently taken to calling it, GNU plus Linux👍
Welcome to osu! or as I've recently taken to calling it, circle game plus pain👍
pure2568

MarshNello wrote:

final result:

https://youtu.be/Ve4qr3jmDbM

A little introduction:

osu! working fine on Linux has been a thing for many years now, especially thanks to ThePoon's patches and Franc[e]sco's guide (https://osu.ppy.sh/community/forums/topics/367783), which are probably the best methods even now. However, in my case both ended up in a broken installation, so I kept searching for ways to install osu! until I actually managed to run it perfectly thanks to some workarounds. It's a pretty easy guide, written especially for beginners (just like me xd), so if you want to install osu! on your Linux distro, just keep reading e.e

PREREQUISITES:
install the following: git, build-essential, dialog, curl.

- sudo apt install git
- sudo apt install build-essential
- sudo apt install dialog
- sudo apt install curl

install wine (the script will do it itself but it's better to have it):
https://wiki.winehq.org/Download

also make sure you installed proprietary drivers for your gpu if you need to
guide for it: https://itsfoss.com/install-additional-drivers-ubuntu/

GUIDE:

to set up our osu!, we'll use osu-install script from yurisuki (credits to him):
https://gitlab.com/yurisuki/osu-install

just follow the instructions here and install it: https://gitlab.com/yurisuki/osu-install#how-do-i-execute-this-script

once you start the script, just follow its instructions.
the script was supposed to do everything automatically, from installing osu! to the patch, but it actually crashes after installing osu! and running it. That's fine, because we'll only use it for the installation indeed.

the steps to make it work are:

- step 1: run it the first time, follow the script's instructions which will install everything but, in the part supposed to run osu!, it shouldn't start (if it starts, skip to step 3); so run the script again.

- step 2: follow the script's instructions again until it starts osu! (if you get "osu! crashed", just click on restart osu! and it should be working now.)

- step 3: the game is now working fine: close it, press whatever key you want on the terminal and the script should crash. that's fine, move on to step 4.

- step 4: run the script again for the last time and follow whatever it says, until it runs osu! again. When it starts, close the game and close the terminal by pressing any key.

our osu! is now completely set up and working fine, but we gotta apply thepoon's patch for latency and create a script to launch (or eventually, kill) the game.

LATENCY PATCH:

let's begin with the patch:

- open the terminal as root using sudo su
sudo su

- type:
mkdir -p /etc/pulse/daemon.conf.d/

echo "high-priority = yes
nice-level = -15

realtime-scheduling = yes
realtime-priority = 50

resample-method = speex-float-0

default-fragments = 2 # Minimum is 2
default-fragment-size-msec = 2 # You can set this to 1, but that will break OBS audio capture." | sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf

(WARNING: if after applying this the system's audio is garbage, increase default-fragment-size-msec by 2, save and reboot)

- then type:
nano /etc/security/limits.conf

- scroll to the bottom of the file and add:
echo "USERNAME - nice -20

USERNAME - rtprio 99" >> /etc/security/limits.conf

- replace USERNAME with your username, save the file with ctrl+o and exit with ctrl+x.

- now open /etc/pulse/default.pa with
nano -c /etc/pulse/default.pa

- here somewhere near lines 40/50 you should find this line:
load-module module-udev-detect

- once you find it, add tsched=0 to the end of it, so like this:
load-module module-udev-detect tsched=0

save the file again with ctrl+o and exit with ctrl+x.

the patch is now applied. reboot your pc to apply the changes and go on with the guide e.e

OSU LAUNCHER:

we're almost done! the last thing to do is create a script to start the game.
to do that:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/
(if z: isn't your drive here, just search for the right one)

- type this to create the osu script:
cat > osu << "EOF"

- now paste in the terminal the following (always replacing username with yours):

#!/bin/sh

export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wine /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/osu\!.exe "$@"
EOF

- in the end launch these two commands.
sudo mv osu /usr/bin/
sudo chmod +x /usr/bin/osu

you can now launch your osu! by typing "osu" in the terminal!
to create a script to kill osu!, just in case it won't launch for any reason, let's do this:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/

- type this to create the osukill script:
cat > osukill << "EOF"

- now paste in the terminal the following:

#!/bin/sh

export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wineserver -k
EOF

- in the end launch again these two commands.
sudo mv osukill /usr/bin/
sudo chmod +x /usr/bin/osukill

you can now kill osu by typing osukill in the terminal when you need to :D

END
And that's it! Your osu! should now work perfectly fine!
Last but not least: you can also create a desktop shortcut for it, by left clicking on your desktop and selecting "create a launcher". It should look like this:



Well, that's the end of the guide! Thanks for reading, and have fun playing osu! on your linux <33

Hello,

This guide is helpful it's just I'm having trouble with the "LATENCY PATCH" section of the guide. I use first time Linux Manjaro XFCE as my distro and I'm just wondering if I'm using the correct commands.

I know after typeing "sudo su" it opens your terminal as root. But I'm confused on how the terminal should look after you type in "mkdir -p /etc/pulse/daemon.conf.d/" in the terminal. For me it looks like this:



[username@username-pc ~]$ sudo su
[sudo] password for USER:
[username-pc username]#
[username-pc username]# mkdir -p /etc/pulse/daemon.conf.d/
[username-pc username]# echo "high-priority = yes
> nice-level = -15
>
> realtime-scheduling = yes
> realtime-priority = 50
>
> default-fragments = 2
> default-fragment-size-msec = 2
> sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf
>




Is this correct?
Also I'm having trouble with the rest as well. <sorry for being a Linux noob!
Topic Starter
MarshNello

_Buddy wrote:

MarshNello wrote:

final result:

https://youtu.be/Ve4qr3jmDbM

A little introduction:

osu! working fine on Linux has been a thing for many years now, especially thanks to ThePoon's patches and Franc[e]sco's guide (https://osu.ppy.sh/community/forums/topics/367783), which are probably the best methods even now. However, in my case both ended up in a broken installation, so I kept searching for ways to install osu! until I actually managed to run it perfectly thanks to some workarounds. It's a pretty easy guide, written especially for beginners (just like me xd), so if you want to install osu! on your Linux distro, just keep reading e.e

PREREQUISITES:
install the following: git, build-essential, dialog, curl.

- sudo apt install git
- sudo apt install build-essential
- sudo apt install dialog
- sudo apt install curl

install wine (the script will do it itself but it's better to have it):
https://wiki.winehq.org/Download

also make sure you installed proprietary drivers for your gpu if you need to
guide for it: https://itsfoss.com/install-additional-drivers-ubuntu/

GUIDE:

to set up our osu!, we'll use osu-install script from yurisuki (credits to him):
https://gitlab.com/yurisuki/osu-install

just follow the instructions here and install it: https://gitlab.com/yurisuki/osu-install#how-do-i-execute-this-script

once you start the script, just follow its instructions.
the script was supposed to do everything automatically, from installing osu! to the patch, but it actually crashes after installing osu! and running it. That's fine, because we'll only use it for the installation indeed.

the steps to make it work are:

- step 1: run it the first time, follow the script's instructions which will install everything but, in the part supposed to run osu!, it shouldn't start (if it starts, skip to step 3); so run the script again.

- step 2: follow the script's instructions again until it starts osu! (if you get "osu! crashed", just click on restart osu! and it should be working now.)

- step 3: the game is now working fine: close it, press whatever key you want on the terminal and the script should crash. that's fine, move on to step 4.

- step 4: run the script again for the last time and follow whatever it says, until it runs osu! again. When it starts, close the game and close the terminal by pressing any key.

our osu! is now completely set up and working fine, but we gotta apply thepoon's patch for latency and create a script to launch (or eventually, kill) the game.

LATENCY PATCH:

let's begin with the patch:

- open the terminal as root using sudo su
sudo su

- type:
mkdir -p /etc/pulse/daemon.conf.d/

echo "high-priority = yes
nice-level = -15

realtime-scheduling = yes
realtime-priority = 50

resample-method = speex-float-0

default-fragments = 2 # Minimum is 2
default-fragment-size-msec = 2 # You can set this to 1, but that will break OBS audio capture." | sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf

(WARNING: if after applying this the system's audio is garbage, increase default-fragment-size-msec by 2, save and reboot)

- then type:
nano /etc/security/limits.conf

- scroll to the bottom of the file and add:
echo "USERNAME - nice -20

USERNAME - rtprio 99" >> /etc/security/limits.conf

- replace USERNAME with your username, save the file with ctrl+o and exit with ctrl+x.

- now open /etc/pulse/default.pa with
nano -c /etc/pulse/default.pa

- here somewhere near lines 40/50 you should find this line:
load-module module-udev-detect

- once you find it, add tsched=0 to the end of it, so like this:
load-module module-udev-detect tsched=0

save the file again with ctrl+o and exit with ctrl+x.

the patch is now applied. reboot your pc to apply the changes and go on with the guide e.e

OSU LAUNCHER:

we're almost done! the last thing to do is create a script to start the game.
to do that:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/
(if z: isn't your drive here, just search for the right one)

- type this to create the osu script:
cat > osu << "EOF"

- now paste in the terminal the following (always replacing username with yours):

#!/bin/sh

export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wine /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/osu\!.exe "$@"
EOF

- in the end launch these two commands.
sudo mv osu /usr/bin/
sudo chmod +x /usr/bin/osu

you can now launch your osu! by typing "osu" in the terminal!
to create a script to kill osu!, just in case it won't launch for any reason, let's do this:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/

- type this to create the osukill script:
cat > osukill << "EOF"

- now paste in the terminal the following:

#!/bin/sh

export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wineserver -k
EOF

- in the end launch again these two commands.
sudo mv osukill /usr/bin/
sudo chmod +x /usr/bin/osukill

you can now kill osu by typing osukill in the terminal when you need to :D

END
And that's it! Your osu! should now work perfectly fine!
Last but not least: you can also create a desktop shortcut for it, by left clicking on your desktop and selecting "create a launcher". It should look like this:



Well, that's the end of the guide! Thanks for reading, and have fun playing osu! on your linux <33

Hello,

This guide is helpful it's just I'm having trouble with the "LATENCY PATCH" section of the guide. I use first time Linux Manjaro XFCE as my distro and I'm just wondering if I'm using the correct commands.

I know after typeing "sudo su" it opens your terminal as root. But I'm confused on how the terminal should look after you type in "mkdir -p /etc/pulse/daemon.conf.d/" in the terminal. For me it looks like this:



[username@username-pc ~]$ sudo su
[sudo] password for USER:
[username-pc username]#
[username-pc username]# mkdir -p /etc/pulse/daemon.conf.d/
[username-pc username]# echo "high-priority = yes
> nice-level = -15
>
> realtime-scheduling = yes
> realtime-priority = 50
>
> default-fragments = 2
> default-fragment-size-msec = 2
> sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf
>




Is this correct?
Also I'm having trouble with the rest as well. <sorry for being a Linux noob!
It should be fine once it gets you out of the > things; then you can enter all the other commands
If it doesn't, just paste it like this, also with the comment

echo "high-priority = yes
nice-level = -15

realtime-scheduling = yes
realtime-priority = 50

resample-method = speex-float-0

default-fragments = 2 # Minimum is 2
default-fragment-size-msec = 2 # You can set this to 1, but that will break OBS audio capture." | sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf

It should do everything by itself e.e
Also sorry for the late reply!
keisuke5
.
Saxarok
Very nice, thanks.
foss
warms my heart to see more threads like this.
Liang J
is there a way to move my songs from windows to Linux?, i tried to move it directly but the game dosent recognize it
Topic Starter
MarshNello

Liang J wrote:

is there a way to move my songs from windows to Linux?, i tried to move it directly but the game dosent recognize it
you just need to paste your Windows' "Songs" folder to your Linux's osu! directory (which should be around here /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/)

after that just refresh your maps in osu! pressing F5 and you're good

update: this reply is outdated.
Your osu!'s location is: ~/.local/share/osu-wine/OSU, so if you need to copy your songs from Windows, just paste them in the Songs folder in ~/.local/share/osu-wine/OSU/Songs
lokitosi
help, when i execute the script the install window starts oppening and closing in an infinite bucle, i'm trying to install it in manjaro

console error : https://imgur.com/KicAhkQ.png
Peoy

MarshNello wrote:

final result:

https://youtu.be/Ve4qr3jmDbM

A little introduction:

osu! working fine on Linux has been a thing for many years now, especially thanks to ThePoon's patches and Franc[e]sco's guide (https://osu.ppy.sh/community/forums/topics/367783), which are probably the best methods even now. However, in my case both ended up in a broken installation, so I kept searching for ways to install osu! until I actually managed to run it perfectly thanks to some workarounds. It's a pretty easy guide, written especially for beginners (just like me xd), so if you want to install osu! on your Linux distro, just keep reading e.e

PREREQUISITES:
install the following: git, build-essential, dialog, curl.

- sudo apt install git
- sudo apt install build-essential
- sudo apt install dialog
- sudo apt install curl

install wine (the script will do it itself but it's better to have it):
https://wiki.winehq.org/Download

also make sure you installed proprietary drivers for your gpu if you need to
guide for it: https://itsfoss.com/install-additional-drivers-ubuntu/

GUIDE:

to set up our osu!, we'll use osu-install script from yurisuki (credits to him):
https://gitlab.com/yurisuki/osu-install

just follow the instructions here and install it: https://gitlab.com/yurisuki/osu-install#how-do-i-execute-this-script

once you start the script, just follow its instructions.
the script was supposed to do everything automatically, from installing osu! to the patch, but it actually crashes after installing osu! and running it. That's fine, because we'll only use it for the installation indeed.

the steps to make it work are:

- step 1: run it the first time, follow the script's instructions which will install everything but, in the part supposed to run osu!, it shouldn't start (if it starts, skip to step 3); so run the script again.

- step 2: follow the script's instructions again until it starts osu! (if you get "osu! crashed", just click on restart osu! and it should be working now.)

- step 3: the game is now working fine: close it, press whatever key you want on the terminal and the script should crash. that's fine, move on to step 4.

- step 4: run the script again for the last time and follow whatever it says, until it runs osu! again. When it starts, close the game and close the terminal by pressing any key.

our osu! is now completely set up and working fine, but we gotta apply thepoon's patch for latency and create a script to launch (or eventually, kill) the game.

LATENCY PATCH:

let's begin with the patch:

- open the terminal as root using sudo su
sudo su

- type:
mkdir -p /etc/pulse/daemon.conf.d/

echo "high-priority = yes
nice-level = -15

realtime-scheduling = yes
realtime-priority = 50

resample-method = speex-float-0

default-fragments = 2 # Minimum is 2
default-fragment-size-msec = 2 # You can set this to 1, but that will break OBS audio capture." | sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf

(WARNING: if after applying this the system's audio is garbage, increase default-fragment-size-msec by 2, save and reboot)

- then type:
nano /etc/security/limits.conf

- scroll to the bottom of the file and add:
echo "USERNAME - nice -20

USERNAME - rtprio 99" >> /etc/security/limits.conf

- replace USERNAME with your username, save the file with ctrl+o and exit with ctrl+x.

- now open /etc/pulse/default.pa with
nano -c /etc/pulse/default.pa

- here somewhere near lines 40/50 you should find this line:
load-module module-udev-detect

- once you find it, add tsched=0 to the end of it, so like this:
load-module module-udev-detect tsched=0

save the file again with ctrl+o and exit with ctrl+x.

the patch is now applied. reboot your pc to apply the changes and go on with the guide e.e

OSU LAUNCHER:

we're almost done! the last thing to do is create a script to start the game.
to do that:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/
(if z: isn't your drive here, just search for the right one)

- type this to create the osu script:
cat > osu << "EOF"

- now paste in the terminal the following (always replacing username with yours):

#!/bin/sh

export STAGING_AUDIO_DURATION=5000
export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wine /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/osu\!.exe "$@"
EOF

- in the end launch these two commands.
sudo mv osu /usr/bin/
sudo chmod +x /usr/bin/osu

you can now launch your osu! by typing "osu" in the terminal!
to create a script to kill osu!, just in case it won't launch for any reason, let's do this:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/

- type this to create the osukill script:
cat > osukill << "EOF"

- now paste in the terminal the following:

#!/bin/sh

export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wineserver -k
EOF

- in the end launch again these two commands.
sudo mv osukill /usr/bin/
sudo chmod +x /usr/bin/osukill

you can now kill osu by typing osukill in the terminal when you need to :D

END
And that's it! Your osu! should now work perfectly fine!
Last but not least: you can also create a desktop shortcut for it, by left clicking on your desktop and selecting "create a launcher". It should look like this:



Well, that's the end of the guide! Thanks for reading, and have fun playing osu! on your linux <33

THANK YOU
phantastic_old_2
As much as I love Linux, woah, the amount of work put to run this simple fun game makes me want to keep Windows installed :>
Peoy

MarshNello wrote:

final result:

https://youtu.be/Ve4qr3jmDbM

A little introduction:

osu! working fine on Linux has been a thing for many years now, especially thanks to ThePoon's patches and Franc[e]sco's guide (https://osu.ppy.sh/community/forums/topics/367783), which are probably the best methods even now. However, in my case both ended up in a broken installation, so I kept searching for ways to install osu! until I actually managed to run it perfectly thanks to some workarounds. It's a pretty easy guide, written especially for beginners (just like me xd), so if you want to install osu! on your Linux distro, just keep reading e.e

PREREQUISITES:
install the following: git, build-essential, dialog, curl.

- sudo apt install git
- sudo apt install build-essential
- sudo apt install dialog
- sudo apt install curl

install wine (the script will do it itself but it's better to have it):
https://wiki.winehq.org/Download

also make sure you installed proprietary drivers for your gpu if you need to
guide for it: https://itsfoss.com/install-additional-drivers-ubuntu/

GUIDE:

to set up our osu!, we'll use osu-install script from yurisuki (credits to him):
https://gitlab.com/yurisuki/osu-install

just follow the instructions here and install it: https://gitlab.com/yurisuki/osu-install#how-do-i-execute-this-script

once you start the script, just follow its instructions.
the script was supposed to do everything automatically, from installing osu! to the patch, but it actually crashes after installing osu! and running it. That's fine, because we'll only use it for the installation indeed.

the steps to make it work are:

- step 1: run it the first time, follow the script's instructions which will install everything but, in the part supposed to run osu!, it shouldn't start (if it starts, skip to step 3); so run the script again.

- step 2: follow the script's instructions again until it starts osu! (if you get "osu! crashed", just click on restart osu! and it should be working now.)

- step 3: the game is now working fine: close it, press whatever key you want on the terminal and the script should crash. that's fine, move on to step 4.

- step 4: run the script again for the last time and follow whatever it says, until it runs osu! again. When it starts, close the game and close the terminal by pressing any key.

our osu! is now completely set up and working fine, but we gotta apply thepoon's patch for latency and create a script to launch (or eventually, kill) the game.

LATENCY PATCH:

let's begin with the patch:

- open the terminal as root using sudo su
sudo su

- type:
mkdir -p /etc/pulse/daemon.conf.d/

echo "high-priority = yes
nice-level = -15

realtime-scheduling = yes
realtime-priority = 50

resample-method = speex-float-0

default-fragments = 2 # Minimum is 2
default-fragment-size-msec = 2 # You can set this to 1, but that will break OBS audio capture." | sudo tee -a /etc/pulse/daemon.conf.d/10-better-latency.conf

(WARNING: if after applying this the system's audio is garbage, increase default-fragment-size-msec by 2, save and reboot)

- then type:
nano /etc/security/limits.conf

- scroll to the bottom of the file and add:
echo "USERNAME - nice -20

USERNAME - rtprio 99" >> /etc/security/limits.conf

- replace USERNAME with your username, save the file with ctrl+o and exit with ctrl+x.

- now open /etc/pulse/default.pa with
nano -c /etc/pulse/default.pa

- here somewhere near lines 40/50 you should find this line:
load-module module-udev-detect

- once you find it, add tsched=0 to the end of it, so like this:
load-module module-udev-detect tsched=0

save the file again with ctrl+o and exit with ctrl+x.

the patch is now applied. reboot your pc to apply the changes and go on with the guide e.e

OSU LAUNCHER:

we're almost done! the last thing to do is create a script to start the game.
to do that:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/
(if z: isn't your drive here, just search for the right one)

- type this to create the osu script:
cat > osu << "EOF"

- now paste in the terminal the following (always replacing username with yours):

#!/bin/sh

export STAGING_AUDIO_DURATION=5000
export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wine /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/osu\!.exe "$@"
EOF

- in the end launch these two commands.
sudo mv osu /usr/bin/
sudo chmod +x /usr/bin/osu

you can now launch your osu! by typing "osu" in the terminal!
to create a script to kill osu!, just in case it won't launch for any reason, let's do this:

- open the terminal and cd to your osu! folder (replace username with yours):
cd /home/username/.wine_osu/dosdevices/z:/home/username/Downloads/

- type this to create the osukill script:
cat > osukill << "EOF"

- now paste in the terminal the following:

#!/bin/sh

export vblank_mode=0
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine_osu
wineserver -k
EOF

- in the end launch again these two commands.
sudo mv osukill /usr/bin/
sudo chmod +x /usr/bin/osukill

you can now kill osu by typing osukill in the terminal when you need to :D

END
And that's it! Your osu! should now work perfectly fine!
Last but not least: you can also create a desktop shortcut for it, by left clicking on your desktop and selecting "create a launcher". It should look like this:



Well, that's the end of the guide! Thanks for reading, and have fun playing osu! on your linux <33

This is the maximum performance I got even using that configuration, Spec (2gb ram, 1.35ghz cpu, no graphic card)(Lubuntu 20.04 lts)
Askar
Worked really well. Surprisingly the script didn't crash at all after installing liquorix and all dependencies before running it so I didn't even need to do some of the steps.
Destac
I have followed the steps and in the end wine gives an error and does not execute it...
I'm with Manjaro.

https://imgur.com/a/rTDopbn
Topic Starter
MarshNello

Destac wrote:

I have followed the steps and in the end wine gives an error and does not execute it...
I'm with Manjaro.

https://imgur.com/a/rTDopbn
Yeah I noticed it doesn't work on Arch-based distros (idk why tho)
Still I found this guide which is actually much simpler and reliable, give it a look

community/forums/topics/794952
felipe_x
D:
KatouMegumi
You could try this extremely experimental guide I am writing right now. (provided you're on Arch-based) https://wiki.archlinux.org/title/User:Katoumegumi#osu!_on_Arch_Linux
Shiyo
Thanks :)
show more
Please sign in to reply.

New reply