forum

osu! on Linux (Use your faster card! [Hybrid Graphics])

posted
Total Posts
2
Topic Starter
byteturtle
Hi there,

i made some improvements to my osu! setup on Linux, that i want to share with you.

I followed one of the guides for installing osu! on Linux, that worked fine for me on Arch Linux.
But the FPS kept dropping on faster Maps (starting at about 200BPM), and osu freezed for a moment.
The reason for this were the hybrid graphics in my notebook. (osu! was running on the Intel HD Graphics by default)

Today i noticed something, when i was tweaking my GuildWars 2 Installation, and tried to apply some of the settings to osu! as well.
So i got my AMD Card working, which is a 76xx Series with 2GB dedicated RAM.

And now the awesome part: i get now around 200FPS on a 200BPM Map, and i havent noticed any Lags so far.

I can't guarantee that this works on nVidia Cards too, maybe someone can test it for me.

If you want to apply this little tweak yourself:
(I used the opensource driver, not the propiertary one)

I assume osu! is installed in the default prefix at ~/.wine
If you inststalled it in some other one like ~/.osu then you need to prefix the commands starting with
wine
with the Prefix Variable:

WINEPREFIX=/home/byteturtle/.osu/ wine regedit
This is just an example, change it to the location of your wine prefix.

winetricks d3dx9

Now open up the registry editor of Wine:

wine regedit

Navigate to: HKEY_CURRENT_USER\Software\Wine\

there you create a new key (the folder symbol should appear)
call it:
Direct3D

Create the Values, so it will look like this:



For VideoMemorySize you insert the size of the dedicated RAM you graphics card has attached. (2048MB for me)

Now a bit digging in the Wine documentation:

| +->VideoPciVendorID
| [DWORD Value (REG_DWORD): sets the pci vendor id of the video card. By default Wine estimates
| these values based on OpenGL info but this doesn't work well in all cases. If you want to
| override our estimates check the output of e.g. lspci -n on Linux. For a video card this
| could show 05:00.0 0300: 10de:0402 (rev a1). In this result 0x10de (Nvidia) is the pci vendor
| id and '0x0402' (Geforce 8600GT) is the pci device id. The '0x0300' means video card.]
|
So we do:

lspci -n | grep 0300

to get a list of attached video cards.

The output on my system was:
00:02.0 0300: 8086:0166 (rev 09)
01:00.0 0300: 1002:6840 (rev ff)

The first one in this example is the Intel HD Graphics, the second one the AMD Graphics.
1002 is the VendorID
6840 is the DeviceID

VendorIDs:

1002 is AMD
10de is nVidia (according to the Wine documentation above)
8086 is Intel

DeviceIDs:

0166: Intel® HD Graphics 4000 on Intel® Core™ i7-3632QM
6840: [AMD/ATI] Thames Radeon HD7670M

I hope we can expand this list over time.


So the Strings to enter are:

0x00001002 for the VendorID Value
and
0x00006840 for the DeviceID Value

You need to change these depending on what card you want to use.

Then close the registry editor and start osu!, be sure to set the FPS limit to unlimited, and do a bit of testing, you can easily revert the changes if you notice lags.

Tested with:
Wine Version: wine-1.8-rc4 (1.9.x killed the Beatmap drag and drop support for me)
Wine Windows Version: Windows XP, Windows 7, Windows 8
worked best with Version set to Windows 8 for me.
Espionage724
Are you using the open-source graphics drivers and have a typical Linux distro (Ubuntu, Fedora, openSUSE, possibly Arch, etc)? Would using DRI_PRIME=1 accomplish the same thing?

Can test if that variable does anything by running DRI_PRIME=1 glxinfo, and see if the GL renderer (towards the top) mentions your dedicated GPU. If that work, then in-theory, you don't need the registry PCI stuff, and can just start Wine with WINEPREFIX=/home/byteturtle/.osu/ DRI_PRIME=1 wine 'location/to/osu!.exe'

I can confirm that works on my dual graphics AMD laptop (7660G + 7670M), but I'm not too familiar if it'll work on Intel + AMD dGPU setups or Intel + NVIDIA (can't see why it wouldn't as long as the open-source graphics driver is in-use for both GPUs). But that glxinfo line above should confirm it.

On another note; osu! should be using OpenGL now, so d3d9x shouldn't really be necessary.
Please sign in to reply.

New reply