Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to "Add Drive" in Settings -> Storage on Fedora 39 + Gnome 45.1 #10268

Open
aghArdeshir opened this issue Dec 1, 2023 · 22 comments
Open

Comments

@aghArdeshir
Copy link

aghArdeshir commented Dec 1, 2023

Your system information

  • Steam client version (build number or date): 1701289036
  • Distribution (e.g. Ubuntu): Fedora 39
  • Opted into Steam client beta?: [Yes/No] Yes (the same issue happens in both main and beta interface)
  • Have you checked for system updates?: [Yes/No] Yes
  • Steam Logs: [generate by running this command in a terminal tar -zcvf ~/Desktop/steam-logs.tar.gz ~/.steam/steam/logs]
    steam-logs.tar.gz and here are the Steam Runtime Diagnostics: https://gist.github.com/aghArdeshir/01af488d2f6a808de1669c5a64b27780
  • GPU: Nvidia/Intel/AMD Nvidia

Please describe your issue in as much detail as possible:

Hi. I have a Fedora 39 + Gnome 45.1.
I can't select another storage option for my Steam.
Generally the "Add Drive" button does not work properly. It opens the file explorer sometimes (nautilus), but nautilus throws an error. And when I press "Select" nothing happens. Nautilus closes, but my selection is not considered.
And when I select my drive, it has no effect.

I tried restarting OS and re-installing steam client.
I have no interfering software (anti-virus, VPN, etc...)

Steps for reproducing this issue:

  1. Install Latest Fedora (Fedora 39) including the latest Gnome 45.1
  2. Install Steam (either through sudo dnf install steam or from "Software" app)
  3. Go to Steam -> Settings -> Storage
  4. Try to Add Drive, won't work
@kisak-valve
Copy link
Member

Hello @aghArdeshir, please copy the contents of Steam Runtime Diagnostics from Steam (Steam -> Help -> Steam Runtime Diagnostics) and put it in a gist, then include a link to the gist in this issue report.

@ReShout876
Copy link

Hello. Having the same issue with my fresh Linux install (Bunsenlabs Linux (Debian 11))

@Greifent
Copy link

Greifent commented Dec 2, 2023

Hello, I'm having the same issue, here is the gist
When trying to add a library nautilus opens up with the following error:
Screenshot from 2023-12-02 12-09-22

@aghArdeshir
Copy link
Author

aghArdeshir commented Dec 2, 2023

@kisak-valve thanks ❤️

Here are the Steam Runtime Diagnostics, and I added it to the original report too 👍

https://gist.github.com/aghArdeshir/01af488d2f6a808de1669c5a64b27780

@aghArdeshir
Copy link
Author

While I also get the error on Nautilus as @Greifent, but apparently that error is not the source of the problem. Because, for instance, if I try to upload a profile picture, the same error is shown, but I can successfully upload a profile picture (the file is selected and uploaded with no problem ✔️

image

@TTimo
Copy link
Collaborator

TTimo commented Dec 4, 2023

@aghArdeshir can you run steam from a terminal and check the output, see if it reports something along the lines of Couldn't write /opt/d/.steam_exec_test.sh: Permission denied ? (I have a drive mounted at /opt/d here).

If that's the case you can probably work around this by creating a folder where you have suitable write and exec permissions, then pointing to that when using 'Add Drive' (the UI is rather Windows centric and the 'Add Drive' wording is incorrect).

@aghArdeshir
Copy link
Author

That's next-level headshot @TTimo 😅 Yes exactly there was a line about my mounted drive. And I found out my permissions are problematic ✔️. I'll find out what is wrong. Thank you very much for helping me ❤️.

Just there is this other error I don't understand:

Couldn't write /boot/efi/.steam_exec_test.sh: Permission denied

Is that important?

Apart from that, my problem is resolved. Should I close the ticket?

@Greifent
Copy link

Greifent commented Dec 4, 2023

@TTimo if it can help, I have this lines:

Couldn't write /.steam_exec_test.sh: Permission denied
Couldn't write /boot/.steam_exec_test.sh: Permission denied
Couldn't write /boot/efi/.steam_exec_test.sh: Permission denied

All the drives with the games are mounted in /mnt

@Greifent
Copy link

Greifent commented Dec 4, 2023

@aghArdeshir Just to double check mine, what permissions did you give to the folders?

@Greifent
Copy link

Greifent commented Dec 4, 2023

Well, tried giving 775 to drives in mnt, restarted steam and it added them, still giving the lines above and the error in nautilus, but its working now

@TTimo
Copy link
Collaborator

TTimo commented Dec 4, 2023

Is that important?

Apart from that, my problem is resolved. Should I close the ticket?

Please leave this open for now, if anything it might help other people with a similar problem.

The Steam client enumerates local drives during startup and checks if it has write and execute permission on them, as that's a requirement for putting a Steam Library there. That's why you see it try paths like /boot/ and /boot/efi/. The client could be a little smarter and skip checking a few well known paths and filesystem types that couldn't possibly be suitable for a Steam Library, but generally this approach works well enough.

The issue here is really UX - the Steam client may need to change the wording as it's really asking for a folder to put the library under, and that folder needs to have adequate permissions (we may need to add an error message to communicate this also).

@aghArdeshir
Copy link
Author

aghArdeshir commented Dec 5, 2023

@Greifent what helped me was this: https://superuser.com/a/1720231/373358

I had to go to my disk/partition app and change the mount options. I removed nosuid and added uid=1000,gid=1000 options. This is how it looks like now:

image

And this is the folder permissions and owners after a reboot:

image

It is no longer owned by root 😃

I don't understand what those options of mount mean really, but they worked for me 😅. chown did not help me and I did not like the chmod approach.

@aghArdeshir
Copy link
Author

The issue here is really UX - the Steam client may need to change the wording as it's really asking for a folder to put the library under, and that folder needs to have adequate permissions (we may need to add an error message to communicate this also).

Yes I agree t that. 👍 Initially I thought there is a problem with Steam client not being able to communicate with file system or maybe with Nautilus somehow. But making sure the Steam understands what I tried to choose and give that to me in an error message, helps a lot so I know the problem is rooting from some place else (permissions in this case)

@Ces-Sanchez
Copy link

Hi, fresh install in debian and nothing happens when I click the + in Settings -> Storage -> /home * to add another folder where install my games. It doesn't happen anything when I click on Browse Folder.

Apparently no related errors during startup from console, and I even installed nautilus.

Here's the gist : https://gist.github.com/Ces-Sanchez/12f9c73b7ce6b27cfb6741d844675aeb

@aghArdeshir
Copy link
Author

aghArdeshir commented Dec 13, 2023

@Ces-Sanchez try pressing it multiple times. 😅

For me it always works after 4 or 5 times trying/clicking.

@Ces-Sanchez
Copy link

@aghArdeshir tried, but nothing happens

@h1z1
Copy link

h1z1 commented Dec 18, 2023

Hi, fresh install in debian and nothing happens when I click the + in Settings -> Storage -> /home * to add another folder where install my games. It doesn't happen anything when I click on Browse Folder.

Apparently no related errors during startup from console, and I even installed nautilus.

I get the same, but with permission errors on the console and do see some in the logs. Clicking on add drive does nothing.

In my case most mount points are zfs which steam does not see (no permission errors on console). I made a symlink for now.

==> webhelper.txt <==
[2023-12-18 04:55:34] contextmenu_2-'Steam Root': WasHidden 0: (0, 0) 2x1
[2023-12-18 04:55:36] contextmenu_2-'Steam Root': WasHidden 1: (0, 0) 2x1
[2023-12-18 04:55:36] SP Shared JS Context-'SharedJSCo': CreatingPopup name:Steam Settings browser:65536 pid:104123 type:4 flags:114: (711.00, 546.00) 850.00x722.00: url:about:blank?createflags=18&minwidth=850&minheight=722&centerOnBrowserID=3
[2023-12-18 04:55:36] CreateOutputWindow: Creating browser window at: 711,546 size: 850x722
[2023-12-18 04:55:36] Steam Settings: Created window: size: 850,722 pos: 711,546 mode: System window: 0x3a0006c
[2023-12-18 04:55:36] Steam Settings: AfterCreated handle:2752526 type:4: (0, 0) 850x722
[2023-12-18 04:55:36] Steam Settings-'Steam Sett': WasHidden 0: (0, 0) 850x722
[2023-12-18 04:56:21] SP Shared JS Context-'SharedJSCo': ERROR: https://steamloopback.host/libraries/libraries~00299a408.js:2: Uncaught (in promise) #<Object>
[2023-12-18 04:59:14] SP Shared JS Context-'SharedJSCo': ERROR: https://steamloopback.host/libraries/libraries~00299a408.js:2: Uncaught (in promise) #<Object>
[2023-12-18 05:01:59] SP Shared JS Context-'SharedJSCo': ERROR: https://steamloopback.host/libraries/libraries~00299a408.js:2: Uncaught (in promise) #<Object>

...

==> steamui_system.txt <==
[2023-12-18 05:04:40] Error: operator(): failed to retrieve file open dialog results

==> steamwebhelper.log <==
[1218/050440.973915:INFO:CONSOLE(2)] "Uncaught (in promise) #<Object>", source: https://steamloopback.host/libraries/libraries~00299a408.js (2)

==> webhelper.txt <==
[2023-12-18 05:04:40] SP Shared JS Context-'SharedJSCo': ERROR: https://steamloopback.host/libraries/libraries~00299a408.js:2: Uncaught (in promise) #<Object>

==> cef_log.txt <==
[1218/050440.973915:INFO:CONSOLE(2)] "Uncaught (in promise) #<Object>", source: https://steamloopback.host/libraries/libraries~00299a408.js (2)

@buncis
Copy link

buncis commented Mar 25, 2024

have you tried to do this ?

 Steam > Settings > Interface
and tick "Enable context menu focus compatibility mode" 

It solves the problem for me

@tasuki
Copy link

tasuki commented Apr 5, 2024

 Steam > Settings > Interface
and tick "Enable context menu focus compatibility mode" 

This helped me! How did you find it, why was this the problem? And why isn't it on by default when it being off breaks things?

@Ces-Sanchez
Copy link

Ehmmm .... I tried the symlink workaround a few months before, and it hanged. Today I'm checking, not changing anything, and I could play.

I'm testing this "Enable context menu focus compatibility mode" and it also fixes the issue with the directories.

I tried to install another game, and it worked out also.

So, much much appreciated for all the help. It's been tough and long, but it's working.

Thanx a lot !!!

@buncis
Copy link

buncis commented Apr 7, 2024

 Steam > Settings > Interface
and tick "Enable context menu focus compatibility mode" 

This helped me! How did you find it, why was this the problem? And why isn't it on by default when it being off breaks things?

I found it form internet I just keep searching and forgot the source,

@icrashthestockmarket
Copy link

icrashthestockmarket commented Apr 14, 2024

I found an actual semi-elegant solution for the Problem and decided to share.
First of all, fstab needs to include "exec" in the mount options in order for steam to be able to add the drives properly. That fixed it for me once, and then I had to fresh install my OS for unrelated reasons, and then it seemingly wasn't enough anymore.
I also got this error in the terminal:

Couldn't write /opt/d/.steam_exec_test.sh: Permission denied

Enable context menu focus compatibility mode didn't work for me although I did turn it on before getting it to work, so maybe it did do something.

What I did this time was fiddle with ownership of the mount points. Changing ownership of the drives didn't work, as others in this thread have already found out, but then I tried to change ownership of the mnt directory itself using.

sudo chown -R $USER:$USER /mnt   # Don't run this command unless you know what you're doing

although I think doing it to all containing folders with -R is probably a bad move and also not necessary. From what I understand it's enough if mnt, the drive folders within mnt, and the respective Steam folders, as well as all of the Steam contents are owned by the user.
Doing these commands would probably look something like this for you:

sudo chown -v $USER:$USER /mnt
sudo chown -v $USER:$USER /mnt/drive1
sudo chown -v $USER:$USER /mnt/drive2

# (...) and so on for all your other drives

sudo chown -R -v $USER:$USER /mnt/drive1/Steam

# (...) and then do the same for your steam folders in all the other drives.

Obviously you need to make sure that you've mounted in /mnt, and you need to change drive1, drive2 accordingly. This probably also works if you're not mounting in /mnt .
You can leave out -v, as it just tells you whether or not anything has been changed, and if you have a lot of content in your Steam folder it will give more output than you will know what to do with for the last command. I like to have it on to see if I'm actually doing anything.

I'm a Linux noob so there might be a more elegant way of doing this, but I prefer this to putting my mount points in my home directory. Let me know if there is a better way to do any of this :)

In case it is relevant, I am using Debian 12.5 with KDE Plasma.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants