Advertisement
Guest User

NixOS fix for Steam with Primus for Optimus laptop

a guest
Jan 6th, 2018
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.84 KB | None | 0 0
  1. <bpa> hi, sorry to desturb
  2. <srhb> Hi :)
  3. <bpa> i have set in configuration.nix the following
  4. <bpa> nixpkgs.overlays = [ (self: super: { mySteam = super.steamPackages.steam-chrootenv.override { withPrimus = true; }; } ) ];
  5. <bpa> environment.systemPackages = with pkgs; [ mySteam ];
  6. <srhb> Looks good.
  7. <bpa> but still does not launch the game
  8. <srhb> What's the launch command for the game?
  9. <bpa> primusrun %command%
  10. <srhb> How did you previously install steam?
  11. <bpa> previusly i installed like environment.systemPackages = with pkgs; [ steam ];
  12. <srhb> Okay, and you did a nixos-rebuild switch and restarted steam?
  13. <bpa> rebuild switch + reboot OS
  14. <bpa> then opened steam
  15. <srhb> Does this work correctly? nix-shell -p primus glxinfo --command glxinfo
  16. <bpa> error: Package ‘nvidia-x11-387.34-4.9.71’ in /nix/store/48lr1wm3bvl61a9q3ffvps9ya233khal-nixos-18.03pre123588.ade98dc442e/nixos/pkgs/os-specific/linux/nvidia-x11/generic.nix:79 has an unfree license (‘unfreeRedistributable’), refusing to evaluate.
  17. <bpa> a) For `nixos-rebuild` you can set
  18. <bpa> { nixpkgs.config.allowUnfree = true; }
  19. <bpa> in configuration.nix to override this.
  20. <bpa> b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  21. <bpa> { allowUnfree = true; }
  22. <bpa> to ~/.config/nixpkgs/config.nix.
  23. <bpa> (use ‘--show-trace’ to show detailed location information)
  24. <srhb> Add that to your ~/.config/nixpkgs.config.nix then
  25. <srhb> Er
  26. <srhb> ~/.config/nixpkgs/config.nix
  27. <srhb> Did you actually enable bumblebee in your nixos config?
  28. <bpa> yes i have enabled bumblebee in configuration.nix
  29. <srhb> OK, just making sure :)
  30. <bpa> also in configuration.nix i have
  31. <bpa> nixpkgs.config = {
  32. <bpa> allowUnfree = true;
  33. <bpa> # firefox = { enableAdobeFlash = true; };
  34. <bpa> # chromium = { enablePepperFlash = true; };
  35. <bpa> };
  36. <srhb> Right.
  37. <bpa> do i still need to put it allowUnfree in ~/.config/nixpkgs/config.nix ?
  38. <srhb> Yes, in order to run the test command
  39. <srhb> nixpkgs options in configuration.nix don't affect your user commands.
  40. <bpa> ok i will do it
  41. <srhb> And after that command, try again with...
  42. <srhb> nix-shell -p primus glxinfo --command "primusrun glxinfo"
  43. <srhb> You should see server glx vendor string: NVIDIA Corporation then
  44. <bpa> i don't have the directory ~/.config/nixpkgs i need to create it ?
  45. <srhb> Yeah
  46. <srhb> So, working?
  47. <bpa> saddly the game will still not launch
  48. <bpa> nix-shell -p primus glxinfo --command "primusrun glxinfo" | grep NVIDIA
  49. <bpa> server glx vendor string: NVIDIA Corporation
  50. <bpa> OpenGL vendor string: NVIDIA Corporation
  51. <bpa> OpenGL core profile version string: 4.5.0 NVIDIA 387.34
  52. <bpa> OpenGL core profile shading language version string: 4.50 NVIDIA
  53. <bpa> OpenGL version string: 4.6.0 NVIDIA 387.34
  54. <bpa> OpenGL shading language version string: 4.60 NVIDIA
  55. <srhb> OK, so that works.
  56. <srhb> What does nix-shell -p glxinfo --command glxinfo | grep NVIDIA say?
  57. <srhb> (I'm not trying to make the game work yet, just trying to figure out what's wrong)
  58. <bpa> it does not show anything
  59. <srhb> OK, good. Hmm.
  60. <srhb> I would now try to run steam from a terminal so we can see its output when it tries to run the game
  61. <bpa> nix-shell -p glxinfo --command glxinfo
  62. <bpa> name of display: :0
  63. <bpa> display: :0 screen: 0
  64. <bpa> direct rendering: Yes
  65. <bpa> server glx vendor string: SGI
  66. <bpa> server glx version string: 1.4
  67. <bpa> server glx extensions:
  68. <srhb> Looks good.
  69. <srhb> I was just checking if your xserver was accidentally using nvidia drivers
  70. <srhb> try running steam from a terminal now
  71. <srhb> So we can see what it outputs when you launch the game
  72. <bpa> here is whe i launch just steam
  73. <bpa> $ steam
  74. <bpa> cp: cannot create regular file '/home/master/.local/share/Steam/bootstrap.tar.xz': Permission denied
  75. <bpa> Running Steam on nixos 18.03pre123588.ade98dc442e 64-bit
  76. <bpa> STEAM_RUNTIME has been set by the user to: /steamrt
  77. <bpa> Pins potentially out-of-date, rebuilding...
  78. <bpa> mkdir: cannot create directory ‘/nix/store/a2j625s4l6q585wz33l6wx7fgyxhrdn7-steam-fhs/steamrt/pinned_libs_32’: Read-only file system
  79. <bpa> mkdir: cannot create directory ‘/nix/store/a2j625s4l6q585wz33l6wx7fgyxhrdn7-steam-fhs/steamrt/pinned_libs_64’: Read-only file system
  80. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  81. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  82. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  83. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  84. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  85. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  86. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  87. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  88. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  89. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  90. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  91. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  92. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  93. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  94. <bpa> PulseAudio connect failed (used only for Mic Volume Control) with error: Access denied
  95. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  96. <bpa> ** (steam:2998): WARNING **: Unknown device type 14
  97. <bpa> ** (steam:2998): WARNING **: Could not create object for /org/freedesktop/NetworkManager/Devices/1: unknown object type
  98. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  99. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'autoconnect-priority'
  100. <bpa> ** (steam:2998): WARNING **: Unknown setting 'proxy'
  101. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'route-data'
  102. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'address-data'
  103. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'route-data'
  104. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'address-data'
  105. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'autoconnect-priority'
  106. <bpa> ** (steam:2998): WARNING **: Unknown setting 'proxy'
  107. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'route-data'
  108. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'address-data'
  109. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'route-data'
  110. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'address-data'
  111. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'autoconnect-priority'
  112. <bpa> ** (steam:2998): WARNING **: Unknown setting 'proxy'
  113. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'route-data'
  114. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'address-data'
  115. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'route-data'
  116. <bpa> ** (steam:2998): WARNING **: Ignoring invalid property 'address-data'
  117. <bpa> Generating new string page texture 2: 48x256, total string texture memory is 49.15 KB
  118. <bpa> Generating new string page texture 3: 256x256, total string texture memory is 311.30 KB
  119. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  120. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  121. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  122. <bpa> (steam:2998): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
  123. <bpa> WARNING: Haswell Vulkan support is incomplete
  124. <bpa> [0106/132524.894683:ERROR:web_plugin_impl.cc(38)] Widevine registration is not supported after context initialization
  125. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  126. <bpa> [0106/132525.895732:ERROR:web_plugin_impl.cc(38)] Widevine registration is not supported after context initialization
  127. <bpa> roaming config store loaded successfully - 1438 bytes.
  128. <bpa> migrating temporary roaming config store
  129. <bpa> Failed to init SteamVR because it isn't installed
  130. <bpa> process 2998: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2656.
  131. <bpa> This is normally a bug in some application using the D-Bus library.
  132. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  133. <bpa> This is normally a bug in some application using the D-Bus library.
  134. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  135. <bpa> This is normally a bug in some application using the D-Bus library.
  136. <bpa> process 2998: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2656.
  137. <bpa> This is normally a bug in some application using the D-Bus library.
  138. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  139. <bpa> This is normally a bug in some application using the D-Bus library.
  140. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  141. <bpa> This is normally a bug in some application using the D-Bus library.
  142. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  143. <bpa> This is normally a bug in some application using the D-Bus library.
  144. <bpa> process 2998: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2656.
  145. <bpa> This is normally a bug in some application using the D-Bus library.
  146. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  147. <bpa> This is normally a bug in some application using the D-Bus library.
  148. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  149. <bpa> This is normally a bug in some application using the D-Bus library.
  150. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  151. <bpa> This is normally a bug in some application using the D-Bus library.
  152. <bpa> process 2998: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2656.
  153. <bpa> This is normally a bug in some application using the D-Bus library.
  154. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  155. <bpa> This is normally a bug in some application using the D-Bus library.
  156. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  157. <bpa> This is normally a bug in some application using the D-Bus library.
  158. <bpa> process 2998: arguments to dbus_connection_unref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file ../../dbus/dbus-connection.c line 2794.
  159. <bpa> This is normally a bug in some application using the D-Bus library.
  160. <bpa> ExecCommandLine: "'/home/master/.local/share/Steam/ubuntu12_32/steam'"
  161. <bpa> System startup time: 4.02 seconds
  162. <bpa> Generating new string page texture 75: 1024x256, total string texture memory is 1.36 MB
  163. <bpa> Generating new string page texture 76: 128x256, total string texture memory is 131.07 KB
  164. <bpa> Generating new string page texture 77: 128x256, total string texture memory is 1.49 MB
  165. <bpa> Generating new string page texture 78: 64x256, total string texture memory is 1.56 MB
  166. <bpa> Generating new string page texture 79: 32x256, total string texture memory is 1.59 MB
  167. <bpa> Generating new string page texture 86: 128x256, total string texture memory is 1.72 MB
  168. <bpa> Generating new string page texture 87: 384x256, total string texture memory is 2.11 MB
  169. <bpa> Generating new string page texture 89: 128x256, total string texture memory is 2.24 MB
  170. <bpa> Generating new string page texture 90: 512x256, total string texture memory is 2.77 MB
  171. <bpa> Generating new string page texture 91: 256x256, total string texture memory is 3.03 MB
  172. <bpa> Generating new string page texture 93: 8x256, total string texture memory is 3.04 MB
  173. <bpa> [0106/132526.897456:ERROR:web_plugin_impl.cc(38)] Widevine registration is not supported after context initialization
  174. <bpa> [0106/132527.897935:ERROR:web_plugin_impl.cc(38)] Widevine registration is not supported after context initialization
  175. <bpa> Setting breakpad minidump AppID = 769
  176. <bpa> Steam_SetMinidumpSteamID: Caching Steam ID: 76561197994818733 [API loaded no]
  177. <bpa> [0106/132528.899694:ERROR:web_plugin_impl.cc(38)] Widevine registration is not supported after context initialization
  178. <bpa> Installing breakpad exception handler for appid(steam)/version(1513371133)
  179. <srhb> That's OK.
  180. <srhb> We just want the output from when you press launch on the game
  181. <srhb> Please use a pastebin next time :P
  182. <srhb> Done? :P
  183. <srhb> Looks like it.
  184. <srhb> Now, please try to launch the game and only paste the output from that.
  185. <srhb> If it's more than a few lines, please use a pastebin.
  186. <bpa> the game launched by starting steam with terminal
  187. <srhb> That implies that the steam you're launching through your WM is not the right one.
  188. <srhb> Find the path of the steam in your terminal and the path of the steam in your wm
  189. <bpa> in steam.desktop the path is : Exec=/nix/store/ck115l2dqhlzlq9pml4l7bhx967z54l9-steam/bin/steam %U
  190. <bpa> i don't know yet how to find the path for the steam launched from terminal
  191. <srhb> which steam
  192. <srhb> run that :)
  193. <bpa> $ which steam
  194. <bpa> .. /run/current-system/sw/bin/steam
  195. <bpa> without ..
  196. <srhb> Yeah, that's the path that environment.systemPackages builds
  197. <srhb> Try making that your desktop link too
  198. <bpa> i will make it so
  199. <srhb> Let me know if it works :)
  200. <bpa> it woooooooorked
  201. <srhb> :) Yay
  202. <bpa> ty so much for your help
  203. <srhb> You're welcome.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement