Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

A prefix for selected game could not be found #615

Closed
NetariW0lf opened this issue Apr 24, 2024 · 55 comments
Closed

A prefix for selected game could not be found #615

NetariW0lf opened this issue Apr 24, 2024 · 55 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@NetariW0lf
Copy link

NetariW0lf commented Apr 24, 2024

(New linux user)

after getting through most of the installation for mo2 post installation of falloutnew vegas i get this error.

A prefix for the selected game could not be found.
Make sure you have followed the instructions on creating a clean prefix'

This is what the terminal gives me.

INFO: all dependencies met
INFO: selected game 'newvegas'
INFO: found Steam in '/home/tony/.steam/debian-installation'
INFO: game found in '/home/tony/.steam/debian-installation'
INFO: steam not found in '/home/tony/.var/app/com.valvesoftware.Steam/.local/share/Steam'
INFO: user confirmed prefix setup
ERROR: no prefix found

From what I can figure either i'm in the wrong directory or i need to create this 'prefix' as a new user to linux (Mint Cinnamon) I'm unsure of what to do.

@NetariW0lf NetariW0lf changed the title A predix for selected game could not be found A prefix for selected game could not be found Apr 24, 2024
@rockerbacon
Copy link
Owner

If you correctly followed the instructions on screen, that's a Protontricks issue. Does New Vegas show up when you run Protontricks on its own?

@rockerbacon rockerbacon added the question Further information is requested label Apr 24, 2024
@NetariW0lf
Copy link
Author

NetariW0lf commented Apr 24, 2024

how do you run protontricks? I don't think protontricks is a program to run.

Remember:New to linux.

@rockerbacon
Copy link
Owner

You should find Protontricks in the Mint start menu. If for some reason it is not there, you can run it from a terminal:

protontricks || flatpak run com.github.Matoking.protontricks

@NetariW0lf
Copy link
Author

protontricks does see new vegas

@TheShadowOfHassen
Copy link

I have the same issue but protontricks sees new vegas.

@NetariW0lf
Copy link
Author

yeah i'm still trying to figure out what to do.

@TheShadowOfHassen
Copy link

I'm having the same error when running the program. After rereading your previous comment @NetariW0lf, I think are problems are identical. I'm running Pop!_OS 20.04 which I think is the same Ubuntu base as the latest mint.

Seeing that you're new to Linux, @NetariW0lf, I just want to say it's usually best practices to say the exact version / distro you're using. Do you know what version of Mint you're running? It could help the devs figure this out.

@TheShadowOfHassen
Copy link

So I figured out the problem. @NetariW0lf run this in the terminal

sudo apt remove protontricks
(It's too old)
flatpak install com.github.Matoking.protontricks/x86_64/stable
Next run
echo "alias protontricks='flatpak run com.github.Matoking.protontricks'" >> ~/.bashrc echo "alias protontricks-launch='flatpak run --command=protontricks-launch com.github.Matoking.protontricks'" >> ~/.bashrc

Finally, install flatseal from the app store and give it permission to read/write your home folder. Then try the installer again.

@NetariW0lf
Copy link
Author

NetariW0lf commented Apr 25, 2024

So I figured out the problem. @NetariW0lf run this in the terminal

sudo apt remove protontricks (It's too old) flatpak install com.github.Matoking.protontricks/x86_64/stable Next run echo "alias protontricks='flatpak run com.github.Matoking.protontricks'" >> ~/.bashrc echo "alias protontricks-launch='flatpak run --command=protontricks-launch com.github.Matoking.protontricks'" >> ~/.bashrc

Finally, install flatseal from the app store and give it permission to read/write your home folder. Then try the installer again.


Before i do all this can you explain what this all is to me i understand the remove part and the flatpack install but after that you've lost me and why do i need to install flatseal?

Reminder:New to Linux For once i'd like to understand what I'm typing instead of blantly typing it.

@NetariW0lf
Copy link
Author

NetariW0lf commented Apr 25, 2024

I'm having the same error when running the program. After rereading your previous comment @NetariW0lf, I think are problems are identical. I'm running Pop!_OS 20.04 which I think is the same Ubuntu base as the latest mint.

Seeing that you're new to Linux, @NetariW0lf, I just want to say it's usually best practices to say the exact version / distro you're using. Do you know what version of Mint you're running? It could help the devs figure this out.

Mint Cinnamon 21.3, how do i look up the exact version? I did say mint Cinnamon in the begining

i tried /etc/*-release
and terminal said
bash: /etc/lsb-release: Permission denied
So i used another terminal command to get the version

@TheShadowOfHassen
Copy link

So I figured out the problem. @NetariW0lf run this in the terminal
sudo apt remove protontricks (It's too old) flatpak install com.github.Matoking.protontricks/x86_64/stable Next run echo "alias protontricks='flatpak run com.github.Matoking.protontricks'" >> ~/.bashrc echo "alias protontricks-launch='flatpak run --command=protontricks-launch com.github.Matoking.protontricks'" >> ~/.bashrc
Finally, install flatseal from the app store and give it permission to read/write your home folder. Then try the installer again.

Before i do all this can you explain what this all is to me i understand the remove part and the flatpack install but after that you've lost me and why do i need to install flatseal?

Reminder:New to Linux For once i'd like to understand what I'm typing instead of blantly typing it.

So the other two commands add the flatpak to a path where the system can call it. You see, flatpak is a sandboxed application, and usually it and your system (Linux mint) don't mess with one another.

The two commands I took from the source for protontricks, because it is how the guy reccomends doing it: https://github.com/Matoking/protontricks

Flatseal is a tool to handle flatpak permissions. Flatpak is sandboxed by default, and we have to use flatseal to let prontontricks out of its sandbox and be able to access your home folder.

@LethalManBoob
Copy link

(New linux user)

after getting through most of the installation for mo2 post installation of falloutnew vegas i get this error.

A prefix for the selected game could not be found. Make sure you have followed the instructions on creating a clean prefix'

This is what the terminal gives me.

INFO: all dependencies met INFO: selected game 'newvegas' INFO: found Steam in '/home/tony/.steam/debian-installation' INFO: game found in '/home/tony/.steam/debian-installation' INFO: steam not found in '/home/tony/.var/app/com.valvesoftware.Steam/.local/share/Steam' INFO: user confirmed prefix setup ERROR: no prefix found

From what I can figure either i'm in the wrong directory or i need to create this 'prefix' as a new user to linux (Mint Cinnamon) I'm unsure of what to do.

Are you accidental selecting yes do archiving your prefix? Try re reading the instructions, i got stuck there as well.

@NetariW0lf
Copy link
Author

So I figured out the problem. @NetariW0lf run this in the terminal
sudo apt remove protontricks (It's too old) flatpak install com.github.Matoking.protontricks/x86_64/stable Next run echo "alias protontricks='flatpak run com.github.Matoking.protontricks'" >> ~/.bashrc echo "alias protontricks-launch='flatpak run --command=protontricks-launch com.github.Matoking.protontricks'" >> ~/.bashrc
Finally, install flatseal from the app store and give it permission to read/write your home folder. Then try the installer again.

Before i do all this can you explain what this all is to me i understand the remove part and the flatpack install but after that you've lost me and why do i need to install flatseal?
Reminder:New to Linux For once i'd like to understand what I'm typing instead of blantly typing it.

So the other two commands add the flatpak to a path where the system can call it. You see, flatpak is a sandboxed application, and usually it and your system (Linux mint) don't mess with one another.

The two commands I took from the source for protontricks, because it is how the guy reccomends doing it: https://github.com/Matoking/protontricks

Flatseal is a tool to handle flatpak permissions. Flatpak is sandboxed by default, and we have to use flatseal to let prontontricks out of its sandbox and be able to access your home folder.


Would flatseal allow me to run mod organizer from the desktop?

@TheShadowOfHassen
Copy link

No, flatseal allows proton tricks out of its box so it can access your files.

I'm not sure what you mean by desktop, though, as in an app?

@NetariW0lf
Copy link
Author

NetariW0lf commented Apr 29, 2024

No, flatseal allows proton tricks out of its box so it can access your files.

I'm not sure what you mean by desktop, though, as in an app?


on windows there's a shortcut i can clikc on the desktop to launch the app.

@TheShadowOfHassen
Copy link

You would make the desktop shortcut using steam. Right click a game in the steam library go to manage and the option is there.

@NetariW0lf
Copy link
Author

I want to launch mo2 not the game, because i don't want to update skyrim from SE to AE

@TheShadowOfHassen
Copy link

This installer (at least for my fallout) rerouted the game through the steam play button. You press play in the steam to launch the mod utility. I can't help you much more or explain why they did that. I didn't write the script.

@swjzielinski
Copy link
Contributor

I want to launch mo2 not the game, because i don't want to update skyrim from SE to AE

You might be able to set up Lutris so that you can launch the executable outside of Steam.

Alternatively you can go offline in Steam and play from there.

@NetariW0lf
Copy link
Author

NetariW0lf commented Apr 29, 2024

I want to launch mo2 not the game, because i don't want to update skyrim from SE to AE

You might be able to set up Lutris so that you can launch the executable outside of Steam.

Alternatively you can go offline in Steam and play from there.


I'll look more into it later, i want to use linux mint as my main OS at least on my next PC, but m02 is probably the last thing i need to get working before i can fully switch over Steam has alot of my games covered, but i need mo2 for mods i use alot. I really want to avoid windows 11 if possible.

I wonder if you can just run the windows version of M02 with something like wine or lutris....

@swjzielinski
Copy link
Contributor

I want to launch mo2 not the game, because i don't want to update skyrim from SE to AE

You might be able to set up Lutris so that you can launch the executable outside of Steam.
Alternatively you can go offline in Steam and play from there.

I'll look more into it later, i want to use linux mint as my main OS at least on my next PC, but m02 is probably the last thing i need to get working before i can fully switch over Steam has alot of my games covered, but i need mo2 for mods i use alot. I really want to avoid windows 11 if possible.

I wonder if you can just run the windows version of M02 with something like wine or lutris....

Lutris in itself is just a program to manage games. It uses Wine to run Windows games.
It's also possible to run a program with Wine through the terminal.

@rockerbacon
Copy link
Owner

rockerbacon commented Apr 30, 2024

Running outside of Steam is possible but not recommended, see #275.
Refer to #544 for game update related discussions.

Edit: post-install instructions also includes some info on running MO2 from outside of Steam.

@Aldahir215
Copy link

I have been having this same issue and uninstalled and reinstalled all programs, including FNV, Protontricks and 7z. I run Pop OS 22.04. I have the flatpak version of Steam and Protontricks. I uninstalled protontricks that you get from the ubuntu repository. I also had flatseal give protontricks permissions to my home folder and it still does not work. FNV does launch when running normally and I checked the compat folder in steam and the game prefix is there. When launching protontricks it does detect fallout new vegas. Is there something I am doing wrong?

@swjzielinski
Copy link
Contributor

Can you run the command
flatpak run 'com.github.Matoking.protontricks' -c 'echo $WINEPREFIX' 22380

It should display the path to the FNV prefix.

@Aldahir215
Copy link

This is what I got
x86_64-linux-gnu-capsule-capture-libs: warning: Dependencies of libnvidia-pkcs11.so.550.67 not found, ignoring: Missing dependencies: Could not find "libcrypto.so.1.1" in LD_LIBRARY_PATH (unset), ld.so.cache, DT_RUNPATH or fallback /lib:/usr/lib
steam-runtime-launcher-service[85]: W: The --socket option is deprecated. Prefer to use --session or --bus-name.
/home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/22380/pfx

@swjzielinski
Copy link
Contributor

And do you see the windows offering to clean the prefix, or does the script crash beforehand?

@Aldahir215
Copy link

If you are referring to the command you told me to put: there was no window popping up and my terminal went on as normal.
If you are referring when you try to install MO2 and it tells you to change force compatibility to Proton 8 and follow the steps before hitting continue. A window never appeared to clean the prefix.

If it is neither could you expand on what you meant by "see the windows offering to clean the prefix"?

@NetariW0lf
Copy link
Author

okay i'm totally lost here what do i do to make a wine prefix also i'm getting this Failed to load module "xapp-gtk3-module"

@Aldahir215
Copy link

If you are referring to the command you told me to put: there was no window popping up and my terminal went on as normal. If you are referring when you try to install MO2 and it tells you to change force compatibility to Proton 8 and follow the steps before hitting continue. A window never appeared to clean the prefix.
If it is neither could you expand on what you meant by "see the windows offering to clean the prefix"?

Sorry, I meant the installer. You're saying this windows shows up:

Now you need to create a clean prefix:

1. On Steam: right click the game > Properties > Compatibility
2. Check the option "Force the use of a specific Steam Play compatibility tool"
3. Select the Proton version you would like to use
	* Proton 8.0 is the currently supported and recommended version
4. Launch the game and wait for Steam to finish its setup
5. Close the game. It must remain stopped through the entire install process

but this window doesn't?

It is highly recommended to clean your current game prefix
before starting the installation process.

Would you like to archive your current game prefix and
create a new one?

Yup that one does not pop up for me.

@Aldahir215
Copy link

Aldahir215 commented May 2, 2024

okay i'm totally lost here what do i do to make a wine prefix also i'm getting this Failed to load module "xapp-gtk3-module"

Playing a Windows game through Steam will create a Wine prefix in the Steam library.

Don't they also need to make sure they has Proton enabled for the prefix to be made?

@swjzielinski
Copy link
Contributor

Yup that one does not pop up for me.

That's interesting, since the second window is supposed to open before the first one. So first you are offered to clean the prefix, and then the prefix would have to be regenerated; but you're only getting the regeneration part.

Don't they also need to make sure they has Proton enabled for the prefix to be made?

Without Proton/Wine, the game will just not work. You just need to open the game once to create a prefix for it.

@ChanceNCounter
Copy link

I'd just like to call contributors' attention to this closed issue, which people (including me) have been periodically bumping for years. The developer appears to have insta-closed it on the assumption that the OP was a moron. Thanks, developer!

In reality, at least 4 people are experiencing this in situations where the game itself is completely functional. I sat through the first 5 minutes of FO3: GOTY just to be certain. It's MO2 that can't see the prefix. Works for FO4, doesn't work for FO3: GOTY. I'd be happy to help debug, but every time somebody reports this issue, the response they get is "read the error."

@swjzielinski
Copy link
Contributor

I think the problem is that the script can't find the prefix location. (wow, no way)
The function "load_prefix_locations" from step/clean_game_prefix.sh returns an empty string. However, I've asked one person in this issue to run the same command as the function does, and it did produce the expected result.

@ChanceNCounter are both FO4 and FO3 GOTY in the same library / on the same drive?

@rockerbacon
Copy link
Owner

That's interesting, since the second window is supposed to open before the first one. So first you are offered to clean the prefix, and then the prefix would have to be regenerated; but you're only getting the regeneration part.

That’s normal, the prefix archival prompt only appears if a prefix exists prior to installation. If Protontricks can’t find a prefix, the user won’t get the prompt.

/home/$USER/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/22380/pfx

@Aldahir215 Have you edited the output or are you literally getting “$USER” in the path?

@rockerbacon
Copy link
Owner

I’ll ask affected users to provide logs for installer version 4.6.2. It doesn’t include any fixes per se, but it has additional logs that should help the investigation.

@rockerbacon rockerbacon added bug Something isn't working help wanted Extra attention is needed and removed question Further information is requested labels May 5, 2024
@Aldahir215
Copy link

@rockerbacon I added the $USER myself.

@Aldahir215
Copy link

I’ll ask affected users to provide logs for installer version 4.6.2. It doesn’t include any fixes per se, but it has additional logs that should help the investigation.

I would like to offer any assistance. I am a novice to linux but I would like to contribute to figuring this out.

@rockerbacon
Copy link
Owner

@Aldahir215 I just need install logs for the latest version of the installer.

@Aldahir215
Copy link

Aldahir215 commented May 8, 2024

@Aldahir215 I just need install logs for the latest version of the installer.

How can I provide the logs? I am unsure how to do that.

UPDATE: I installed winetricks, via "sudo apt install winetricks" and now it seems to work.

At first it wouldn't launch but then I realized that since I use the flatpak version of steam I had to use flatseal and give steam access to the home directory.

@swjzielinski
Copy link
Contributor

Just checked the script, it's only checking for protontricks and assumes that their dependencies are met. Apparently it's possible to install protontricks without its dependencies, thus giving the illusion of everything being present when it's not. Maybe the script could also check for winetricks?

@rockerbacon
Copy link
Owner

Just checked the script, it's only checking for protontricks and assumes that their dependencies are met. Apparently it's possible to install protontricks without its dependencies, thus giving the illusion of everything being present when it's not. Maybe the script could also check for winetricks?

It doesn't check Winetricks because it downloads it from source. That also can't be the issue because the user is using Flatpak, meaning no external dependencies.

@rockerbacon
Copy link
Owner

How can I provide the logs? I am unsure how to do that.

The terminal prints out all the logs, just copy the text and send it here.

@Aldahir215
Copy link

Aldahir215 commented May 9, 2024

How can I provide the logs? I am unsure how to do that.

The terminal prints out all the logs, just copy the text and send it here.

Here are the logs without winetricks:
INFO: all dependencies met
INFO: selected game 'newvegas'
INFO: steam not found in ''
INFO: found Steam in '/home/altair/.var/app/com.valvesoftware.Steam/.local/share/Steam'
INFO: game found in '/home/altair/.var/app/com.valvesoftware.Steam/.local/share/Steam'
INFO: user confirmed prefix setup
ERROR: no prefix found

This is when I reinstalled winetricks
INFO: all dependencies met
INFO: selected game 'newvegas'
INFO: steam not found in ''
INFO: found Steam in '/home/altair/.var/app/com.valvesoftware.Steam/.local/share/Steam'
INFO: game found in '/home/altair/.var/app/com.valvesoftware.Steam/.local/share/Steam'
INFO: user confirmed prefix setup

I was able to continue...

I already had it setup so I hope these logs are enough. I also launched the game when instructed from the window, meaning I launched the game in both conditions.

@BlindingBird
Copy link

Just my two cents. I had this issue where it could not find the prefix. I solved it by deleting the prefix and validating files through steam to create a clean prefix. After that the MO2 installer was able to find the prefix

@frenchtooch
Copy link

I can verify that find-library-for-appid.sh is not fetching the correct prefix id. For New Vegas its close but it's incorrect. 22490 as opposed to 22380. This is from fresh steam new vegas install and following directions explicitly. Im on ubuntu 24.04 and using flatpak protontricks. I even explicitly defined the prefix in script within appid variable using the correct id and it still failed.

@swjzielinski
Copy link
Contributor

swjzielinski commented Jun 16, 2024

22490 as opposed to 22380

According to the files in the gameinfo folder, 22380 is for the global FNV release and 22490 is for the "en,pl,cz,ru" version. Are you sure you have and select the correct game?

@frenchtooch
Copy link

22490 as opposed to 22380

According to the files in the gameinfo folder, 22380 is for the global FNV release and 22490 is for the "en,pl,cz,ru" version. Are you sure you have and select the correct game?

22380 is what I have FNV En user. I checked. All of my folders reference 22380.

@swjzielinski
Copy link
Contributor

Can you check what ID does protontricks detect it as?
try running the command

flatpak run 'com.github.Matoking.protontricks' -c 'echo $WINEPREFIX' 22380

If it says the directory, where the game is located, then it is detected correctly.

@frenchtooch
Copy link

frenchtooch commented Jun 21, 2024

Can you check what ID does protontricks detect it as? try running the command

flatpak run 'com.github.Matoking.protontricks' -c 'echo $WINEPREFIX' 22380

If it says the directory, where the game is located, then it is detected correctly.

home/REDACTED/.local/share/Steam/steamapps/compatdata/22380/pfx

If I use the installer the terminal is definitely detecting the wrong prefix when it reaches the prefix fetching script. I'm not sure why that would be.

@swjzielinski
Copy link
Contributor

Can you post logs from the installer?

@westbelow
Copy link

I've been having a similar issue and am unable to complete the installer. Tested on both Fallout New Vegas and Starfield. Here's what happens when I attempt to run the latter (this is from the flatpak version, but similar results occured with the latest protontricks-git from the AUR. )

INFO: all dependencies met
INFO: selected game 'starfield'
INFO: found Steam in '/home/Hawke/.local/share/Steam'
INFO: game found in '/home/Hawke/.local/share/Steam'
INFO: steam not found in '/home/Hawke/.var/app/com.valvesoftware.Steam/.local/share/Steam'
F: X11 socket /tmp/.X11-unix/X0 does not exist in filesystem, trying to use abstract socket instead.
F: X11 socket /tmp/.X11-unix/X0 does not exist in filesystem, trying to use abstract socket instead.
ERROR: Protontricks did not find a valid prefix directory.  Stdout was:\nOnly one action can be performed at a time.
usage: protontricks [-h] [--verbose] [--no-term] [-s SEARCH [SEARCH ...]] [-l]
                    [-c COMMAND] [--gui] [--no-runtime] [--no-bwrap]
                    [--background-wineserver] [--no-background-wineserver]
                    [-V]
                    [appid] ...

Wrapper for running Winetricks commands for Steam Play/Proton games.

Usage:

And then it lists the protontricks help blurb from a generic call.

@maximinus
Copy link

Here's my 2c that might solve some issues. mod2 will fail to install if you try to run in on Fallout 4 since the game folder it is looking for will not be correct until character creation is finished. This is on leaving the vault, which is about 10/15 minutes into the game. Once you have a save outside the vault, then protontricks will find the prefix and mod2 will install correctly.

@VoidNull01
Copy link

VoidNull01 commented Jan 6, 2025

I am having the same problem. Mod Organizer was working fine before.

I decided to run an experiment to see how many vanilla textures a mod used. Problem is, only the base Skyrim has a textures.bsa. The textures for the dlc are located in a single bsa with the meshes and all the other data. I stupidly decided to hide those too, and for some reason it caused my game to crash when the main menu tried to come up. I unhid everything, but the issue persisted. I verified the integrity of the game files. This made the game run, but it loaded the launcher rather then mod organizer.

The instructions just said I needed to 're-link it'. As best as I can tell, that means re-installing it. Doing so however gives me this exact error. I've deleted the folder with the prefix in it, and launched the game to generate a new one, but the issue persists no matter how many times I did this. I even restarted steam and my computer. I also re-verified the game files again, including deleting the prefix folder again, and it makes no difference.

Keep in mind, it was working fine before. All I did was verify the game files, and now it refuses to install. I can't figure out for the life of me what's wrong. Why does it not work now when it did before? The mod organizer files are still installed, along with skse. I have no way to launch any of them though.

edit: I completely uninstalled the game to try and make a 'clean prefix'. This did not work either. Again, I did not have these issues when I first did this around a year ago. Could the launcher update have caused this problem? Its the only thing that changed.

I've also verified that protontricks, wine, and winetricks are all up to date. Protontricks can detect Skyrim, but it refuses to open it, instead throwing this error message:

SyntaxError: Invalid file magic number. The appinfo.vdf version might not be supported by the current version of Protontricks - please check for updates.

This error is what made me check for updates.

POSSIBLE SOLUTION:

While messing around with protontricks, I managed to get it to throw another error message about a 'invalid magic number'. I found this post which explains it..

From my understanding, it claims its due to a steam update that merges two files protontricks used. Version 1.12 addresses this, and I was running 1.11. It took a while to figure out how to update it. In my case, using sudo apt install did not. I had to use pipx upgrade to do so. I believe the command you have to enter depends on how you originally installed it. Either way, after doing this, mod organizer installed fine and is now working as it did before I did all this. Teach me to mess with the bsas.

So long story short, UPDATE PROTONTRICKS TO 1.12.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests