ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.22k stars 174 forks source link

Cannot add new storage #9640

Open QRouland opened 1 year ago

QRouland commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

Expected : In steam settings > storage , clicking on '+' should open a window to add a new storage.

Happen: In steam settings > storage , clicking on '+' do nothing

image

Steps for reproducing this issue:

  1. Open settings
  2. Select Storage page
  3. Click on the "+"
  4. Nothing happen
kisak-valve commented 1 year ago

Hello @QRouland, 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.

QRouland commented 1 year ago

Hello @QRouland, 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.

https://gist.github.com/QRouland/35457fe5fa3ea564756467217dbc6654

kisak-valve commented 1 year ago

Thanks, https://gist.github.com/QRouland/35457fe5fa3ea564756467217dbc6654#file-steamruntimediagnostics-txt-L2861-L2864 is the details to focus on. The Steam client now uses xdg-desktop-portal for this and it looks like xdg-desktop-portal does not have a working configuration for some reason. Some other Arch users mentioned that reinstalling xdg-desktop-portal-gtk had a positive effect, but it's not clear why that is the case.

9584 is also relevant to this scenario.

QRouland commented 1 year ago

Thanks, https://gist.github.com/QRouland/35457fe5fa3ea564756467217dbc6654#file-steamruntimediagnostics-txt-L2861-L2864 is the details to focus on. The Steam client now uses xdg-desktop-portal for this and it looks like xdg-desktop-portal does not have a working configuration for some reason. Some other Arch users mentioned that reinstalling xdg-desktop-portal-gtk had a positive effect, but it's not clear why that is the case.

Reinstalling xdg-desktop-portal-gtk had no effect on my side.

CaffeinatedOpe commented 1 year ago

I am having the same issue on gentoo. I ran steam via the console, and got an error when clicking that button. it was "Couldn't write /boot/.steam_exec_test.sh: Permission denied". I'm slightly concerned as to why steam is trying to write to my boot directory, but i'm gonna hope it's a bug.

ArktinenSieni commented 1 year ago

I encountered identical behaviour. I'm running EndeavourOS with Xfce if it helps.

My runtime-diagnostics: https://gist.github.com/ArktinenSieni/688203874e6bcfafcfa23db50b4f3be4

Is there a way to add the path to a storage by hand while the issue persists?

ArktinenSieni commented 1 year ago

I am having the same issue on gentoo. I ran steam via the console, and got an error when clicking that button. it was "Couldn't write /boot/.steam_exec_test.sh: Permission denied". I'm slightly concerned as to why steam is trying to write to my boot directory, but i'm gonna hope it's a bug.

Noticed the same thing.

kisak-valve commented 1 year ago

Hello @ArktinenSieni, "Failed to connect to 'org.freedesktop.portal.Desktop'" at https://gist.github.com/ArktinenSieni/688203874e6bcfafcfa23db50b4f3be4#file-runtime-diagnostics-endeavouros-L2837 is the detail to focus on for your system. Steam isn't able to talk to xdg-desktop-portal for some reason.

ArktinenSieni commented 1 year ago

Installing the package xdg-desktop-portal seemed to have resolved my issue. Thankyou :star_struck:

z0rti commented 1 year ago

Same here with Ubuntu 20.04.6 LTS, xdg-desktop-portal installed

  "xdg-portals" : {
    "issues" : [
      "unknown"
    ],
    "messages" : [
      "Unable to get the session bus: Failed to execute child process ?dbus-launch? (No such file or directory)"
    ]                                                                                                                                                                                                                                           

I'm running steam as a different user 'sudo -i -u steam'

hitchhooker commented 1 year ago

image only lets adding folders inside current SteamLibrary and change directory to /tank/steam/user is not possible

ruinning arch linux + bspwm

EDIT: installing xdg-desktop-portal leads to described behaviour where nothing happens EDIT2: removign 540 🕸 sudo pacman -R xdg-desktop-portal-gnome and 540 🕸 sudo pacman -R xdg-desktop-portal and leaving gtk solved issue

ayan-iiitd commented 1 year ago

Can confirm, happens in a fresh install on Fedora 38 KDE both Wayland and X11. The dialog box to select a folder comes up, but selecting a new directory or drive doesn't work. Getting the following error when running from the terminal.

ExecuteSteamURL: "steam://open/steam://settings/"
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
sh: line 1: /home/ayan/mounts/storage/.steam_exec_test.sh: Permission denied
Failed system("/home/ayan/mounts/storage/.steam_exec_test.sh") in execute test: 32256
sh: line 1: /home/ayan/mounts/data/.steam_exec_test.sh: Permission denied
Failed system("/home/ayan/mounts/data/.steam_exec_test.sh") in execute test: 32256
ExecuteSteamURL: "steam://open/steam://exit/"
ex5 commented 1 year ago

Encountered similar issue that wasn't present just a day ago: a directory from a separate volume that used to be working as Steam Library folder suddenly disappeared from Steam Library UI, and adding it back doesn't work because the folder selection UI is broken.

The most worrying thing is that in the Steam output there are lines that seem to indicate Steam is expecting / and root of another volume (/media in this case) to be writable for it, which is complete nonsense:

Couldn't write /.steam_exec_test.sh: Permission denied
Couldn't write /media/.steam_exec_test.sh: Permission denied
tiritto commented 1 year ago

Having the same issue on Nobara Linux, despite the destination directory being set up with chmod 777. This issue exists on both public and beta release.

MeetMaratha commented 1 year ago

Having the same issue on Nobara Linux, despite the destination directory being set up with chmod 777. This issue exists on both public and beta release.

One temporary solution I found for this issue which works for me on Arch Linux is auto-mounting the drive in the home folder of the user so that it is mounted on boot. Then when I need to play the games, I need to unmount and remount and the drive. This makes steam detect the drive and run games. This is just a temporary solution for now.

This does not solve the base problem but gives a temporary solution.

Brensom commented 1 year ago

I have the same problem on Archlinux. Installing any of "xdg-desktop-portal" doesn't solve anything. What should I do? screenshot_2023 08 22_08 29 06_001

MeetMaratha commented 1 year ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1687462729

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1685599812

This is a temporary solution that you can use to play your games on another drive.

Also I saw a youtuber facing the same issue in a video recently and his problem was solved by using the flatpak version of Steam and a program called flatseal. Here is the time stamp of the video I am talking about : https://www.youtube.com/watch?v=QYlf30rf6_0&t=1948s

You can try it too.

LurkerBeDammed commented 1 year ago

Hi, have the same problem. I think I did a reasonable workaround so that I wont have to mess with mounting and unmounting or installing the xdg-desktop stuff (which for some reason broke my grub? I think or something else, had to reinstall).

So what I did was on my 2nd hard drive I created a link to my old linux games folder (after right clicking and checking show hidden and allow links) and renamed it to "steamapps" and replaced the one that steam storage opens. Then I used steam to link to a new Games folder that I created in Home/yourusername. That seems to work just fine after restarting. Please correct me if that is dangerous to the system or something else you think I should know. Thanks

Running Ubuntu 22.04 on a Dell G7 7588

aburke161 commented 1 year ago

Just jumping in to say I'm also having this issue. Changing mount options on the drive does nothing, and actually I can't even select a folder under the drive that my games are already installed on. The dialog box is blank, as seen in Brensom's comment. I'm also seeing the behavior where steam is trying to write to volumes that it has no business writing to: Couldn't write /.steam_exec_test.sh: Permission denied Couldn't write /boot/.steam_exec_test.sh: Permission denied

Edit: Reporting back with a fix. After some searching around, I've found that after installing the packages "xdg-desktop-portal" and "xdg-desktop-portal-kde", the directory selection dialog is working properly for me now. I'm using KDE on Arch linux, so instead of "kde" at the end of the second package, install the version appropriate for your desktop environment. Also, names of these packages may vary depending on distribution.

I don't think this was needed in the past, though. So I'm not sure what the deal is.

AgostinoA commented 1 year ago

It is not possible!!!! which in 2023 doesn't even create a FileChooser properly. The launcher already sucks, it's very buggy every 2 by 2. But do you want to work well???

henriquebecker91 commented 1 year ago

I am also afflicted by this issue. I am using Arch Linux and the default steam package (from multilib) and xmonad as the window manager. I do not have a desktop environment (like kde, gtk, etc...) nor do I want to have one (and I do not understand why steam requires one just for this specific detail). I never had a problem with the steam file picker before but now it simply does not appear. How do I solve the problem?

aburke161 commented 1 year ago

@henriquebecker91 did you try only installing "xdg-desktop-portal" without any of the desktop env specific companion packages? Or will that pull in a bunch of crap you don't want?

henriquebecker91 commented 1 year ago

I did install the xdg-desktop-portal-kde even if I preferred to not do so, just to see if it would at least solve the problem and it had not effect.

Em sáb., 16 de set. de 2023 às 11:44, Drew @.***> escreveu:

@henriquebecker91 https://github.com/henriquebecker91 did you try only installing "xdg-desktop-portal" without any of the companion packages? Or will that pull in a bunch of crap you don't want?

— Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1722244959, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLVVG4G2TPHODVVLF7WRDDX2W3LRANCNFSM6AAAAAAZJXDVKM . You are receiving this because you were mentioned.Message ID: @.***>

aburke161 commented 1 year ago

@henriquebecker91 yes, I'm saying specifically not the "xdg-desktop-portal-kde" package, because you don't use kde and that won't do anything for you. Try "xdg-desktop-portal" as well as the "xdg-desktop-portal-gtk" backend. https://wiki.archlinux.org/title/XDG_Desktop_Portal

henriquebecker91 commented 1 year ago

It seems like xdg-desktop-portal was a red herring in my case. The problem was related to the (kinda absurd) test that generates the:

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

The problem here is that my second nvme (which I wanted to use for steam games) was being mounted in /media/games_partition/ but with root permissions (and like /boot and / it failed the script test because of that). The reason for this setup was that I wanted to have a /media/games_partition/henrique folder that was mine and possibly allow other users to have each their folder. But as steam looks if the user has permissions at the root of the partition and not inside any of its folders, then it failed to recognize my /media/games_partition/ (/dev/nvme1n1p1) as a drive that could be selected for steam use and found none. Now that I changed /media/games_partition to have my user permissions, steam detected it correctly and allowed to use it for steam games without even needing to select a specific folder inside it.

AgostinoA commented 1 year ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1722255456

Same problem, Steam we want to make things more generic and done right. Create yourself an OS independent filechooser and other!!!

jmahmood commented 1 year ago

This is an issue for me too; I'm running vanilla Ubuntu, 22.04.

I tried the xdg-desktop-portal install, but it is already installed on ubuntu.

xdg-desktop-portal is already the newest version (1.14.4-1ubuntu2~22.04.1).

I tried running from the CLI, but it didn't output any meaningful error messages.

aburke161 commented 1 year ago

@jmahmood you need the xdg backend appropriate for your desktop environment installed, as well. Which desktop env? Edit: assuming you're using GNOME, you'd need "xdg-desktop-portal-gnome" installed too.

jmahmood commented 1 year ago

image Thanks for the hint @aburke161; I tried it but sadly the issue isn't resolved.

(When I click on the plus button here, it just disappears without any menu popping up)

I cleared some space by removing games I am not playing lately, but I would like to setup one of my other HDs to store this data.

The rename library / repair library / browse items in the hamburger menu don't seem to work either.

henriquebecker91 commented 1 year ago

The other drive is mounted with user permissions?

Did you see lines like Couldn't write /.steam_exec_test.sh: Permission denied in the steam output?

AgostinoA commented 1 year ago
  1. go to /home/{user}/.steam/steam/steamapps
  2. add this line

"1" { "path" "/media/DATA/Games" "label" "" } "Path of your Library of Steam"

  1. Open Steam Launcher

If anyone has time to invest, since Steam is not capable. Kindly make an apps to write the file and open a Filechooser like Zenity with Appimage please with low GLIBC, so it goes for everyone and a solution that then Steam I hope you see it and show how it's done!

itsdeadguy commented 1 year ago

Pretty sure this is distro independent, but it's happening on glibc Void Linux too if that matters. Both the blank selection dialog and the "permission denied" errors.

I haven't tried xdg-desktop-portal yet, but will soon enough. However, i'd like to point out that my two existing game libraries are on drives that show up under /mnt/ so the only thing in my home directory is the general steam config directory (which contains little aside a bunch of symlinks pointing back to /mnt/my_drive/my_game_library), so location of previous libraries doesn't seem to matter much.

If xdg-desktop-portal is a new dependency should the steam for linux team make a note of this somewhere packagers will read or will it be up to the users to start filing issues with their distros?

Also, as pointed out by @Wolf220 why is steam trying to get into my bootloader directories? i just hope this doesn't lead to messed up GRUB down the line.

Edit to add: I needed both xdg-desktop-portal and xdg-desktop-portal-kde (since i'm on the kde desktop, ymmv). And having xdg-user-dirs helps too, but i'm guessing most people probably have this already

Zi-SH commented 11 months ago

I have three xdg-desktop-portal utilities installed and am not able to get the browser to work correctly. They do implement the correct interfaces, though the debug seems to suggest Steam doesn't see them. Other apps seem to be able to call the FileChooser fine.

COFFEEBOX :: / » sudo pacman -Ss xdg-desktop-portal | grep installed
extra/xdg-desktop-portal 1.18.0-2 [installed]
extra/xdg-desktop-portal-gnome 45.0-1 (gnome) [installed]
extra/xdg-desktop-portal-gtk 1.14.1-3 [installed]
extra/xdg-desktop-portal-kde 5.27.8-4 (plasma) [installed]
COFFEEBOX :: / »

Here's a gist with my debug log. https://gist.github.com/Zi-SH/90a1cfdd773c05711ca1b3ec3df524d0

This is quite frustrating because I have several drives, all with different games on them, and now I have to symlink the default folder Steam suggests as I can't use the file picker. Editing libraryfolders.vdf also ends up ephemeral, be it cache or some other validation, so I can't even change it on the back end.

kisak-valve commented 11 months ago

Hello @Zi-SH, the comment at https://github.com/ValveSoftware/steam-for-linux/issues/10120#issuecomment-1752188912 is looks relevant to your system.

AgostinoA commented 11 months ago

@kisak-valve Hi, sorry, are you part of the Steam team?

Zi-SH commented 11 months ago

Hello @Zi-SH, the comment at #10120 (comment) is looks relevant to your system.

Hi Kisak, my apologies! I've contributed to the linked issue, the comment on which was indeed relevant to my system. Thank you!

MadMartian commented 10 months ago

Suitable Work-Around

  1. go to /home/{user}/.steam/steam/steamapps

    1. add this line

"1" { "path" "/media/DATA/Games" "label" "" } "Path of your Library of Steam" 3. Open Steam Launcher

If anyone has time to invest, since Steam is not capable. Kindly make an apps to write the file and open a Filechooser like Zenity with Appimage please with low GLIBC, so it goes for everyone and a solution that then Steam I hope you see it and show how it's done!

This work around is suitable, although it should be the file /home/<user>/.steam/steam/steamapps/libraryfolders.vdf, then here's the nicely formatted insert:

        "1"
        {
                "path"          "/usr/local/games/steam"
                "label"         ""
        }

Replace /usr/local/games/steam with the folder of your choice. Steam will then populate the other attributes automatically after starting the launcher.

File Chooser

On my system the file chooser opens, but after I decide which folder to choose I click the "Open" button but nothing happens and the file chooser dialog remains open.

thorstenhirsch commented 10 months ago

Same problem here (the open dialog opens, but it's empty, there's nothing to select). Neither installing xdg-desktop-portal-gtk nor xdg-desktop-portal-gnome made a difference.

But at least the workaround works.

fidodido48 commented 9 months ago

Same here. Arch linux, xdg-desktop-portal installed. Only workaround works.

mr-sihc commented 9 months ago

WHY WONT STEAM JUST CHMOD +X THE DAMN SCRIPT ITS SO EASY (OR NOT system("/x/.steam_exec_test.sh") BUT system("/bin/bash /x/.steam_exec_test.sh"))

Mek101 commented 8 months ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1825064739

Steams seems to ignore the folder added by this workaround

z0rti commented 8 months ago

This workaround works here around: Open with steam steam://open/console Then type in library_folder_add <path>

Pshock13 commented 8 months ago

IDK if this is the solution for everyone here as I'm seeing issues with xdg and such but, for me when I tried hitting the drop down and then 'add drive' it would bring up the explorer and I could select the mounted drive (and LVM of 2 drives in my case) and hit [SELECT]. The window would disappear and the drive would not be added.

I went ahead and changed the permissions on the mount folder sudo chmod 777 /mnt/steamlibrary

After that, when I hit 'add drive' a steam window popped up (instead of my explorer) and it had my drive in it that I wanted to use. Hope this is able to help someone else.

fermulator commented 8 months ago
 gedit ~/.steam/steam/steamapps/libraryfolders.vdf

to "expand", simply add another item (increment ID), and ONLY keep the path label

  1. close steam
  2. edit the file & save
  3. re-open steam

EXAMPLE, say you had items up to "2", add "3" like this, to the new path

    "3"
    {
        "path"      "/mnt/storage/games/Steam"
        "label"     ""
        }

you will notice it will then auto-populate the other fields by detection

Glebelg2 commented 8 months ago

I had exactly the same problem (the Couldn't write /WATHEVER/.steam_exec_test.sh: Permission denied.).

To solve that, just make sure that the drive is mounted with the "exec" option.

After that, everything should work fine.

buncis commented 6 months ago

have you tried to do this ?

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

It solves the problem for me

weberkai commented 2 months ago

Hi! I'm using Slackware 15.0 and installed steam inside a chroot multilib. I was having this same problem. For steam to work I had to install these packages: zenity, bubblewrap, kservice, xdg-desktop-portal, xdg-desktop-portal-gtk, xdg-user-dirs, steamclient . I had to mount /run and /var/run inside chroot, to copy /etc/resolv.conf and /var/lib/dbus/machine-id , to authorize xhost +local: , and to suid bwrap. The trick was to install kservice: This pkg creates /etc/profile.d/kde.sh, which creates this env var: XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdg:/etc/xdg. The only thing strange: When the file dialog opens, it shows the files from 'outside' chroot. lol. You will have to look for corresponding pkgs in your distro. hth

adamant-pwn commented 2 months ago

Hi all! I had the same issue, but adding the new folder manually as described in https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1738915766 seems to have helped!

RoxyBoxxy commented 2 months ago

have you tried to do this ?

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

It solves the problem for me

Arch Linux with openbox here this worked for me

johnisaway285 commented 1 month ago

Replying to https://github.com/ValveSoftware/steam-for-linux/issues/9640#issuecomment-1903037131

I second this! Sometimes you just have to whip your editor to do the magic.