protonscr

Ability to disable/remove mono from prefix.

protonclosed Feature Request
ValveSoftware/Proton#2699 · opened 2019-05-17 by Charadon · updated 2026-04-11 · 19 comments · github
1 matching comments, n / p to jump
CCharadon 2019-05-17 github

Feature Request

I confirm:

  • [X] that I haven't found another request for this feature.
  • [X] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

Add the ability to uninstall or disable wine-mono in a given prefix so you can use winetricks to install dotnet.

Justification [optional]

You can already do this in normal wine, but for some baffling reason you can't in proton. Mono is forced on, this leads to issues where games that require, say, dotnet40 to run, can't work because you CAN'T install dotnet40 due to mono being there.

Risks [optional]

None

References [optional]

Kkisak-valve maintainer 2019-05-17 github

Hello @Charadon, this sounds like a non-starter feature request for the project. We should want wine-mono to grow the needed support for what's missing instead of relying on winetricks. Has feedback been given for the games that you are having trouble with wine-mono?

My understanding is that winetricks and complications from interacting with it are outside the scope of this project, but I'll leave this request open in case a Proton dev has a different opinion.

CCharadon 2019-05-17 github

The main issue I have, is that with normal wine, you CAN remove wine-mono from a prefix. I don't see why you can't with proton.

ZZorrototo 2019-05-17 github

Because as explained I think they want to rely on one package, Proton, and no winetricks.
And they would want you to report the problems for the games you have issues with, in order to make Proton work out of the box later with fixes, instead of having you to fiddle with winetricks to have games to work.

Mmadewokherd 2019-05-17 github

You can remove it in the same way as in normal Wine, though the procedure is unintuitive:

WINEPREFIX=~/.steam/steam/steamapps/compatdata/APPID/pfx/ ~/.steam/steam/steamapps/common/Proton\ 4.2/dist/bin/wine64 uninstaller

For right now, you must use wine64 to see it in the uninstaller list. This is fixed in current Wine.

If you want to install native .NET, remember to override mscoree.dll to native only (native,builtin doesn't work). Without that override, .NET won't install correctly, and any prefix update will reinstall wine-mono.

CCharadon 2019-05-17 github

@madewokherd Ah, I didn't know this. I guess the feature request should be closed now since this is what I was talking about. Didn't know I had to use wine64 to see it in the uninstaller.

Vverzensen 2020-05-24 github

Could someone break down this process for a complete Linux/ProtonDB newbie? Do you have to run the wine64 uninstaller via command line in order to remove mono, then make configuration changes for the game prefix the same way? Any help is appreciated!

JJustCryen 2022-03-30 github

It doesn't seem to work for me.
Just to justify my need to remove mono, some old games straight up won't work with what mono provides.
I need specific dotnet version (dotnet40_kb2468871) and I can't install it because "some newer version on .NET is already installed"
removing mono the way you mentioned doesn't work.
In the uninstaller clicking on the remove button does nothing at all…

Mmadewokherd 2022-03-30 github

Does this happen to you in a new prefix?

winetricks should take care of all this when installing dotnet. I think you can even do winetricks remove_mono.

Mmadewokherd 2022-03-30 github

Also, is there a bug report for these games failing with mono? I understand the need for immediate work-arounds, but I'd like to have details so I can eventually get it fixed.

JJustCryen 2022-03-30 github

I initially tried doing things in the terminal but since nothing worked I tried the gui, still no luck.
It's a new prefix.
I tried uninstaller through winetricks (manually pointing to a prefix with WINEPREFIX and full path to proton) but it's the same.

Since it's proton it would need to be protontricks <gameID> remove_mono but I tried with winetricks and it actually fails straight up with remove_mono. ShellExecuteEx failed: File not found.
With protontricks it at least tried doing something but it didn't work.

Just to be sure I tried every attempt with a new prefix.
The game is straight up borked, as far as I know almost no one is playing it even on Windows so probably not a lot of people tried it with Linux, at least not enough of them to get it working.
It's TRON: Evolution and I got it to a good enough state but it boots up to a black screen and it complains about needing .NET 4.0 kb2468871, I'm just mad that I can't even try that option ;/

Mmadewokherd 2022-03-30 github

Yeah, looks like it got delisted on steam. :(

I don't think I ever tried uninstalling Wine Mono in Proton specifically, I'll have to check that that case works.

JJustCryen 2022-03-31 github

Yeah, it's probably unlisted because

  1. Disney
  2. Its multiplayer was built on top of Games For Windows Live
  3. Licensing(?)

I have the game on CD as well and I actually was successful running it on Linux so the dotnet issue is probably one of the last (if not the last) puzzle to fix in Proton.
The problem with the CD version is that it's an older version and the multiplayer is no longer accessible, supposedly it works on Steam.
A lot of replay value lies down in the multiplayer since there are game modes, maps and mechanics that only exist in multiplayer.

I would really appreciate if you could take a look at this.
No pressure tho, I'll probably keep trying and maybe someday I'll get it to work.

Mmadewokherd 2022-04-04 github

Yeah, it looks like uninstalling works in Wine but is broken in Proton specifically.

Mmadewokherd 2022-04-04 · hidden on GitHub github

Actually it's not specific to Proton but protontricks. It fails if I run:

protontricks 1719400 uninstaller

or

protontricks 1719400 remove_mono

But this works:

WINEPREFIX=~/.steam/root/steamapps/compatdata/1719400/ ~/.steam/root/steamapps/common/Proton\ -\ Experimental/files/bin/wine uninstaller

The options using the uninstaller command require manually selecting "Wine Mono Windows Support" and clicking Remove. It should then be removed from the list along with all associated files and registry entries.

I think this should be reported as a bug to protontricks.

Mmadewokherd 2022-04-04 github

Ignore that last comment, I had specified the prefix incorrectly. Which means that a prefix created by Proton is behaving differently from one created by the Wine in Proton.

Mmadewokherd 2022-04-04 github

I filed a bug internally for this at CodeWeavers.

The easiest work-around for now is probably to remove the prefix and have winetricks create it manually:

rm ~/.steam/root/steamapps/compatdata/1719400/pfx/ -rfv
WINE=~/.steam/root/steamapps/common/Proton\ -\ Experimental/files/bin/wine WINEPREFIX=~/.steam/root/steamapps/compatdata/1719400/pfx/ winetricks dotnet40
JJustCryen 2022-04-07 github

Unfortunately the work-around didn't work for this game.
It either fails to install other necessary components (d3dx9, gfw, physx)
Or it fails to boot.entirely, it crashes seconds after clicking play.
I hope it'll work at least a little bit better when it'll be fixed in Proton.

Steam terminal output:

GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to ProcessingInstallScript with ""
Proton: Upgrading prefix from None to 7.0-100 (/home/cryen/.local/share/Steam/steamapps/compatdata/315440/)
Traceback (most recent call last):
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 1463, in <module>
    g_session.init_session(sys.argv[1] != "runinprefix")
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 1265, in init_session
    g_compatdata.setup_prefix()
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 858, in setup_prefix
    self.update_builtin_libs(builtin_dll_copy)
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 677, in update_builtin_libs
    with open(self.tracked_files_file, "r") as tracked_files:
FileNotFoundError: [Errno 2] No such file or directory: '/home/cryen/.local/share/Steam/steamapps/compatdata/315440/tracked_files'
GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to SynchronizingControllerConfig with ""
GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 315440, ActionID 5] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 315440, ActionID 5] : LaunchApp continues with user response "CreatingProcess"
/bin/sh\0-c\0/home/cryen/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=315440 -- '/home/cryen/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/home/cryen/.local/share/Steam/steamapps/common/TRON Evolution/Binaries/Win32Live/GridGameLauncher.exe'\0
Game process added : AppID 315440 "/home/cryen/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=315440 -- '/home/cryen/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/home/cryen/.local/share/Steam/steamapps/common/TRON Evolution/Binaries/Win32Live/GridGameLauncher.exe'", ProcID 275590, IP 0.0.0.0:0
chdir /home/cryen/.local/share/Steam/steamapps/common/TRON Evolution/Binaries/Win32Live/
ERROR: ld.so: object '/home/cryen/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/home/cryen/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/cryen/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/cryen/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/cryen/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
GameAction [AppID 315440, ActionID 5] : LaunchApp changed task to Completed with ""
pid 275594 != 275591, skipping destruction (fork without exec?)
Proton: Upgrading prefix from None to 7.0-100 (/home/cryen/.local/share/Steam/steamapps/compatdata/315440/)
Traceback (most recent call last):
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 1463, in <module>
    g_session.init_session(sys.argv[1] != "runinprefix")
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 1265, in init_session
    g_compatdata.setup_prefix()
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 858, in setup_prefix
    self.update_builtin_libs(builtin_dll_copy)
  File "/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental/proton", line 677, in update_builtin_libs
    with open(self.tracked_files_file, "r") as tracked_files:
FileNotFoundError: [Errno 2] No such file or directory: '/home/cryen/.local/share/Steam/steamapps/compatdata/315440/tracked_files'
Game process removed: AppID 315440 "/home/cryen/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=315440 -- '/home/cryen/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/cryen/.local/share/Steam/steamapps/common/Proton - Experimental'/proton waitforexitandrun  '/home/cryen/.local/share/Steam/steamapps/common/TRON Evolution/Binaries/Win32Live/GridGameLauncher.exe'", ProcID 275590
Mmadewokherd 2022-04-11 github

It seems my work-around didn't work and actually broke the prefix.

I'm not convinced that the problem you're having with this particular game is related to .NET or Wine Mono at all.

I committed a change to Wine Mono which will have it install MSI's as system instead of per-user, but that will only fix this when a release with that change is integrated into Proton, and it won't fix existing broken prefixes.

It might be possible to work around this by editing registry files. Keys like this in system.reg:

[Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-21-0-0-0-1000\\Products\\3F5AD5212EC489456967ACA4B7DAD65B\\InstallProperties] 1648586765

would need to have S-1-5-21-0-0-0-1000 changed to whatever is the current user SID. Finding the current user SID isn't straightforward though. I guess you could look for keys like this

[Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-21-2289918999-1493192203-1001-1000] 1649450614

and choose the one with the most recent timestamp.

SSweeper5 2026-04-11 github

Just to add a heads up of a new problem that has cropped up that will lead more people down the path of removing Mono is .NET and applications wanting channelSecurity set to true.
Mono can't provide that, and it seems to be a "Won't fix" as they are worried about stepping on developer toes from my quick reading of issues on the Wine Mono issues tracker.

The legit issue is installing a 3rd party legally bought aircraft, and their little installer requires a secure channel and the error message becomes something like "wine is not securable while ensureSecurity is specified as true"

There are information that native .NET will handle this, but mono does not and probably never will.
If this isn't set the whole process comes to a screeching halt.