forum

osu!(lazer) running slowly on Linux with an NVIDIA graphics card? (my solution)

posted
Total Posts
1
Topic Starter
PickSquid
If your situation is anything like mine, chances are that it's running on your CPU's integrated graphics (iGPU), not your dedicated graphics card (dGPU). I hope this post will save you some time (and sanity) Googling.

Here's how to check:

NOTE: By osu:/, I am referring to your osu! data directory (the technically correct name for a "folder"). By default, it's at ~/.local/share/osu/osu-lazer (correct me if I'm wrong), but you can change it in the in-game settings. You can also open it in your default file manager from the game by going to settings > General > Open osu! folder.

1. Navigate to osu:/logs. You will see a crapton of log files named like ${timestamp}.${type}.log. The game creates a new set of these files every time it launches.
2. Open the most recent ${timestamp}.runtime.log (the one that starts with the highest number) in a text editor. (I'm using VSCode, but gedit/Kate/nano will work too.)
3. Skim through the first few lines of the log file. Assuming you're running on OpenGL, you should see a line like the one I highlighted in this screenshot:

I have an Intel CPU, so I've been running osu! on the iGPU.

Hmm, so I am running on the iGPU. How do I get osu! to run on the dGPU?

There used to be a binary included in the proprietary NVIDIA drivers called "prime-run" that seems to have disappeared from more recent versions--but we can replicate its functionality by setting a few environment variables.
From a few searches on Stack Exchange, I made a small shell script to set these variables and start the AppImage.
I also posted the script as a GitHub Gist, which you can find here.
Create a new file, e.g. launch_osu.sh, in the same directory as your osu! AppImage and copy/paste the contents of launch_osu.sh from the Gist into it, then make it executable by typing chmod +x launch_osu.sh into a terminal. Now, you can type the path to the script into your terminal to launch osu! on your dGPU! You'll know it's working when your ${timestamp}.runtime.log files start showing something like this:


OK, but I don't want to type that into the terminal each time I want to play!

Most Linux desktop environments support .desktop files, which will let osu! (or any other local app you want easy access to) show up in your launcher/application menu!
I recently updated the Gist with the shortcut file I use, with some added comments to help you set it up to match your environment. It goes into ~/.local/share/applications.
Once you hit save, you should see a shortcut to launch osu! in your desktop environment's launcher/application menu. (I know it shows up immediately in GNOME, but I'm not sure if you may need to restart with other DEs. 🤔)

I hope this helps make your circle-clicking experience a bit smoother! If you have any questions/comments/corrections/death threats for me, drop a comment here, and I'll get to them sooner rather than later.
Please sign in to reply.

New reply