this post was submitted on 25 Sep 2023
37 points (97.4% liked)

Linux Gaming

15802 readers
38 users here now

Gaming on the GNU/Linux operating system.

Recommended news sources:

Related chat:

Related Communities:

Please be nice to other members. Anyone not being nice will be banned. Keep it fun, respectful and just be awesome to each other.

founded 4 years ago
MODERATORS
 

From my understanding, at least one other necessary component is dxvk, and that wine is not enough.

If I dont use lutris or some other manager, how can I game on linux? do I have to configure dxvk? do I need soemthing else too? vulkan?

Is there a guide that explains it?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago (1 children)

The problem is Winetricks doesn’t support updating DXVK.

Are you sure about that? Every time I run winetricks (once in a blue moon) it always says I have DXVK (Latest)

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Reasonably sure, but willing to be corrected. See this section of the Winetricks code (it's just shellscript):

        # Don't install if already installed
        if test "${WINETRICKS_FORCE}" != 1 && winetricks_is_installed "$1"; then
            echo "$1 already installed, skipping"
            return "${TRUE}"
        fi

Followed by:

winetricks_is_installed()
{
    unset _W_file _W_file_unix
    if test "${installed_exe1}"; then
        _W_file="${installed_exe1}"
    elif test "${installed_file1}"; then
        _W_file="${installed_file1}"
    else
        return "${FALSE}"  # not installed
    fi

    # Test if the verb has been executed before
    if ! grep -qw "$1" "${WINEPREFIX}/winetricks.log" 2>/dev/null; then
        unset _W_file
        return "${FALSE}"  # not installed
    fi

Winetricks determines whether a verb has been installed by writing and reading to a winetricks.log file found in the root directory of the Wineprefix you're working with. It also tests if the file actually exists too, but let's just focus on winetricks.log for simplicity.

The first time Winetricks installs the dxvk verb, which takes the latest DXVK release at the time you run it, it writes dxvk to the winetricks.log file. When a new version of DXVK is released, and you run WINEPREFIX=~/.local/share/wineprefixes/whatever winetricks dxvk, it will hit winetricks_is_installed and read ~/.local/share/wineprefixes/whatever/winetricks.log to see if DXVK is already is installed. It will see that dxvk is in the log file and give up.

When I was writing the Visual Novels on GNU/Linux guide, I did a lot of experimentation with Winetricks. I installed dxvk in a Wineprefix a few months ago and haven't touched it since then. A new version of DXVK was released three weeks ago. When executing the dxvk verb in that Wineprefix again, I get:

Executing w_do_call dxvk
dxvk already installed, skipping

Years ago, Winetricks would write a new verb definition for every new DXVK release. Presumably when it was much less stable. You can see remnants of that with the 100+ verbs for installing particular DXVK versions. Now it just takes the latest stable release. Yay for the maintainers, because that's a lot less work. As a side effect, Winetricks doesn't have a way of updating it normally.

Why doesn't Winetricks have the ability to update verbs? Well, you're often installing very specific versions of a native DLL to override the builtin Wine component. You don't want that changing on you randomly. The w_get_github_latest_release function, which extracts the latest release, was created purely for and only used for DXVK. DXVK is the only component that really works like this in Winetricks.

There is an easy way of updating DXVK anyway. Just run Winetricks with --force:

WINEPREFIX=~/.local/share/wineprefixes/whatever winetricks --force dxvk

Now, admittedly, I misspoke about Winetricks "not supporting updating DXVK". I learned this option exists just now. So you can force-update it with --force, which bypasses winetricks_is_installed and installs the latest version of DXVK. Guide has been updated accordingly; thank you for making me look into this again!

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Years ago, Winetricks would write a new verb definition for every new DXVK release. Presumably when it was much less stable. You can see remnants of that with the 100+ verbs for installing particular DXVK versions. Now it just takes the latest stable release. Yay for the maintainers, because that’s a lot less work. As a side effect, Winetricks doesn’t have a way of updating it normally.

Oh does it not add new entries for every new DXVK release anymore? In that case I guess my DXVK version is probably a year old by now even though it says DXVK (Latest) and that it's from year 2023: https://i.imgur.com/lNaqTPG.png

 

There is an easy way of updating DXVK anyway. Just run Winetricks with --force:

WINEPREFIX=~/.local/share/wineprefixes/whatever winetricks --force dxvk

Now, admittedly, I misspoke about Winetricks “not supporting updating DXVK”. I learned this option exists just now. So you can force-update it with --force, which bypasses winetricks_is_installed and installs the latest version of DXVK. Guide has been updated accordingly; thank you for making me look into this again!

Oh I had no idea about this, and I normally just use winetrick's GUI while using it so I would've had to look up how to update dxvk if not for you explaining it.

 

Although as a side note I've got the winetricks-git AUR package, not winetricks so maybe there's some fix for it somewhere already, I'll have to look into it. So far I haven't had an issue with DXVK being too old, but I mostly play older games

 

When I was writing the Visual Novels on GNU/Linux guide, I did a lot of experimentation with Winetricks.

Unrelated but I'll check that guide out, I've had trouble playing VNs that are in Japanese, as without LANG="ja_JP.UTF-8" wine /path/to/game.exe they won't even run but even with it the fonts don't work and are shown as empty boxes.

[–] [email protected] 2 points 1 year ago (1 children)

Oh does it not add new entries for every new DXVK release anymore?

Looks like the last time a verb for a new DXVK version was added was dxvk2010 or DXVK 2.1, in February this year. We're up to DXVK 2.3 now. Because the Winetricks codebase is around 20,000 lines of shellscript and I'm not the best at reading shellscript...I don't think the dxvk verb updates the Wineprefix's DXVK version based on what the newest version is. I think that's just an alternate way of installing DXVK; you can pull the latest stable release, or you can install a particular version.

I think executing a particular verb for a DXVK version would override whatever DXVK dlls you currently have installed in that prefix, too. I have no idea how to check what DXVK version is installed a particular Wineprefix, though.

even though it says DXVK (Latest) and that it’s from year 2023

That's based on the verb metadata; not what version of DXVK you currently have installed. A contributor bumped the year for the dxvk verb from 2017 to 2023 in a commit in February this year.

Oh I had no idea about this, and I normally just use winetrick’s GUI while using it so I would’ve had to look up how to update dxvk if not for you explaining it.

Happy if it helps. I've never used the GUI, but it's awesome that they managed to create a functioning GUI frontend with shellscript. Insane, really. God I hate shellscript...

So far I haven’t had an issue with DXVK being too old, but I mostly play older games

You probably won't get an issue with DXVK being "too old", but newer versions of DXVK implement more features (particularly for D3D12) and include bug fixes to improve compatibility or performance. From the 2.3 release notes:

Fixed a minor issue with D3D9 feedback loop tracking.

Test Drive Unlimited 2: Fixed shadows on grass.

Tomb Raider Anniversary: Improved performance.

So you want to be running the latest version for better compatibility. That said, I mostly play visual novels. My biggest problems are still DRM and media playback, which DXVK has very little to do with.

Unrelated but I’ll check that guide out, I’ve had trouble playing VNs that are in Japanese, as without LANG="ja_JP.UTF-8" wine /path/to/game.exe they won’t even run but even with it the fonts don’t work and are shown as empty boxes.

You're the exact person this guide was written for! This sounds like an issue that's easily fixed by installing fakejapanese with winetricks. More info here: https://wiki.comfysnug.space/doku.php?id=visualnovel:problems#japanese_characters_aren_t_displaying_properly

And if you have .txt files in the game directory (like documentation or whatever) with garbled text, that's probably because they're encoded in Shift JIS. There's an easy fix to make them readable: https://wiki.comfysnug.space/doku.php?id=visualnovel:problems#text_files_with_garbled_text

(That last one had me scratching my head for a very long time)

[–] [email protected] 2 points 1 year ago

Installing the fake japanese font did the trick 👍