ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

sh: lspci: command not found #3306

Open ghost opened 10 years ago

ghost commented 10 years ago

Hi,

I use Slackware 14.1 x86_64 and lspci can only be run as root by default. It's also placed in /sbin which the user doesn't have in their $PATH

 ls -l lspci
-rwxr-xr-x 1 root root 101520 Oct 23  2013 lspci

Why is steam trying to run the lspci command at startup?

gdrewb-valve commented 10 years ago

steam.sh doesn't use lspci, nor does the /usr/bin/steam script. This happens immediately when you're starting Steam?

The Steam client will use lspci in the system info dialog when retrieving video card info, but I don't see another direct use.

ghost commented 10 years ago

Yes this happens immediately when running steam.

Here's the output from the terminal; (about line 37)

steam
Slackware 32-bit: Check the 'deps/<slackwareversion>' directory where you downloaded this package and install/upgrade the packages you find there.
Slackware 64-bit multilib: Install/upgrade the packages in the 'deps/<slackwareversion>/multilib' subdirectory instead.

Running Steam on slackware 14.1 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
[0516/151050:ERROR:object_proxy.cc(239)] Failed to call method: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.NetworkManager was not provided by any .service files
[0516/151050:WARNING:proxy_service.cc(958)] PAC support disabled because there is no system implementation
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)

** (steam:3496): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files

** (steam:3496): WARNING **: _nm_remote_settings_ensure_inited: (NMRemoteSettings) error initializing: The name org.freedesktop.NetworkManager was not provided by any .service files

Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
PulseAudio connect failed (used only for Mic Volume Control) with error: Access denied
Process 3496 created /foo-ValveIPCSharedObjects5
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Generating new string page texture 7: 128x256, total string texture memory is 131.07 KB
Generating new string page texture 8: 64x256, total string texture memory is 196.61 KB
Generating new string page texture 9: 48x256, total string texture memory is 245.76 KB
Generating new string page texture 10: 256x256, total string texture memory is 507.90 KB
Generating new string page texture 11: 384x256, total string texture memory is 901.12 KB
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
Adding licenses for the following package(s): 0, 7, 24, 37, 108, 218, 319, 463, 541, 636, 987, 1438, 1465, 1579, 1675, 1679, 2319, 2487, 2644, 4067, 4109, 4638, 6254, 6346, 6516, 6877, 7587, 7932, 8025, 8185, 8538, 11010, 11157, 11563, 11755, 11802, 11902, 12205, 12361, 13437, 14728, 16714, 16724, 16831, 18947, 26117, 44433, 44442, 44470
roaming config store loaded successfully - 3792 bytes.
migrating temporary roaming config store
Installing breakpad exception handler for appid(steam)/version(1398287272_client)
sh: lspci: command not found 
ExecCommandLine: "/home/foo/.local/share/Steam/ubuntu12_32/steam"
System startup time: 24.21 seconds
Running Steam on slackware 14.1 64-bit
STEAM_RUNTIME has been set by the user to: /home/foo/.local/share/Steam/ubuntu12_32/steam-runtime
Generating new string page texture 78: 128x256, total string texture memory is 131.07 KB
Generating new string page texture 79: 32x256, total string texture memory is 933.89 KB
ExecCommandLine: "/home/foo/.steam/root/ubuntu12_32/steam steam://open/driverhelperready"
ExecSteamURL: "steam://open/driverhelperready"
CAPIJobRequestUserStats - Server response failed 2
[2014-05-16 15:10:49] Startup - updater built Apr 23 2014 13:46:58
[2014-05-16 15:10:49] Verifying installation...
[2014-05-16 15:10:49] Verification complete
[2014-05-16 15:11:20] Shutdown
gdrewb-valve commented 10 years ago

I'm seeing the same thing, this looks like a relatively recent addition. It's gathering video card info for the streaming support.

ghost commented 10 years ago

Well as I mentioned a user doesn't have access to lspci in Slackware...

So not having access to it, what are we missing out here on, and then should I try to see about getting permissions to have access to it?

I wonder how many other distros don't allow the user access, and if something Valve should consider here, with some type of work around?

Tele42 commented 10 years ago

Gentoo linux also generates the line in question.

daemongloom commented 10 years ago

I have the same line on opensuse 13.1.

D-Code commented 10 years ago

Also have this on Funtoo Linux.

Tested around a bit, and putting a symbolic link to lspci in /opt/bin makes it go away.

ghost commented 10 years ago

So can someone PLEASE give us a heads up as to what the deal is with this, why the need for lspci to be run and if it can't be run then what is the end-result problem here if any?

gdrewb-valve commented 10 years ago

As I mentioned earlier, lspci is run by the Steam streaming code to get information about your video cards. If you aren't using streaming I'm not sure there are any ill effects.

D-Code commented 10 years ago

Sounds like there will be issues for those who use streaming. So, will there be problems when Steam cannot call lspci and when using In-Home Streaming?

slouken commented 10 years ago

No, there are no issues for streaming or non-streaming. It's just used to collect hardware information for performance statistics. The data is analysed in aggregate, so if there are a few missing samples it's not an issue.

ghost commented 10 years ago

What's the point in running lspci if the end-user doesn't have the rights to run it?

Hasn't Valve considered this, that not all distros allow the end-user to run it...

So can we please get some type of change to the code so this can be run and work the way it's meant? And at this point in time if it needs to be, and can only be lspic then I have no answer for you, that would have to be up to each end-user/distro to give access to it.

ghost commented 9 years ago

So any thought back on this, I don't know how as an end-user to look at this situation?

I mean I still don't understand the effect of not having this command available to the end-user?

pkulev commented 9 years ago

Yes, this string is still present in the output (Gentoo Linux).

ghost commented 9 years ago

@gdrewb-valve you stated; /// The Steam client will use lspci in the system info dialog when retrieving video card info, but I don't see another direct use. ///

As I mentioned, this is not possible in Slackware, the end-user does not have access/rights to lspci, it can only be run as root.

I'm sure Slackware isn't the only distro that limits this to root, so we need a fix...

Urth commented 9 years ago

@ghost are you sure it cannot be run as a regular user? The file permissions seem to allow it, the only issue is that it is not in PATH for normal users.

Tele42 commented 9 years ago

@Urth the ghost identity means that the original user has deleted their account.

ryao commented 6 years ago

@kisak-valve This is also a problem on Gentoo, but we place our lspci in /usr/sbin/lspci.

moozaad commented 5 years ago

I'm updating steam on opensuse and will sneak in this patch for /usr/bin/steam.

diff --git a/steam b/steam
index 4456d00..8d11766 100755
--- a/steam
+++ b/steam
@@ -1,4 +1,7 @@
 #!/usr/bin/env bash
+
+PATH=$PATH:/sbin
+
 if ! test "$NO_STEAMTRICKS" == 1 && [ -x "$(which steamtricks)" ] ; then
   # does not seem to be a better place to daemon-reload since install time runs
   # as root and does not have user context available

It won't work directly for others as it's after steam-tricks patch is applied. The magic is simply the path append PATH=$PATH:/sbin. It used to solve font and dbus issues too but that's been cleaned up now.

There's probably a thousand ways to skin this cat including this disaster whereis -b lspci | cut -d " " -f2 | awk '{system($0)}' ;) Though at this point, little patches in build systems like the above don't hurt.