• Register

The group for gamers dedicated to Linux. No matter if game developers or game players all are welcome interested in Linux as a gaming platform.

Forum Thread
  Posts  
Nvidia Optimus, Bumblebee and Desura (Groups : Linux Gamers : Forum : Desura linux client : Nvidia Optimus, Bumblebee and Desura) Locked
Thread Options
Oct 5 2011 Anchor

I'm not sure whether anyone else has this problem, but there might be someone who can tell me what to do about it. I have a laptop with an Nvidia card that uses Optimus (dynamic switching between the i7 integrated graphics card and my GeForce graphics card). Because Optimus is not supported on Linux, basically everything runs on the integrated graphics. The solution is to install an open-source program called Bumblebee (they have a ppa on launchpad, if anyone's interested). Without Bumblebee, the Nvidia card can't be used at all, but with it, I can type the command "optirun" before any other command in order to run the desired program on my Nvidia card.

How do I run Desura games with a custom command? If I launch Desura with optirun, will the games also run on the graphics card? I'm inclined to think not, which is why I haven't tried it. Is there an advance menu that allows you to use custom commands when launching games? Or is there a simpler solution that I'm just not seeing?

Thanks,
--D. Scott Nettleton

[edit]
I found the option myself. Just right-click a game in your list, then select "Properties." Type in "optirun" in the box marked "User Launch Options." Easy as pie. I should have found it sooner.
[/edit]

Edited by: dsnettleton

Oct 7 2011 Anchor

Great tips!
Thankyou

Oct 7 2011 Anchor

Whoops. I should mention that the above does not work.

The User launch options are suffixes that are placed after the command to run the game. Stuff like "-f" for fullscreen, etc.
What I ended up having to do was to go to my desura/common/games/whateverGame folder, open the launch.sh shell script, and change:

	
	# If we're in a terminal run the game, if not run it and log the output
	if [ $IN_TERMINAL -eq 1 ]; then
		optirun $BIN $@
	else
		optirun $BIN $@ 1>>$LOGFILE 2>>$LOGFILE
	fi

To:

	# If we're in a terminal run the game, if not run it and log the output
	if [ $IN_TERMINAL -eq 1 ]; then
		optirun $BIN $@
	else
		optirun $BIN $@ 1>>$LOGFILE 2>>$LOGFILE
	fi

I'm not sure I can really recommend this if you don't know what you're doing, but I've found some games that won't run without it.

poVoq
poVoq Linux gamer
Nov 11 2011 Anchor

Hmm... I changed it like you wrote, but strangely enough it only works if I manually start the launch.sh but not when I click on the game in Desura.

Btw I tried changing the bin line in the beginning on the launch.sh and it works also, just again only when starting the launch.sh manually... not from desura (I am using hammerfight to test btw, but it is the same in all other games I tried) :(
e.g.:
BIN="optirun64 ./Hammerfight-amd64" # Executable file

Edited by: poVoq

--

freegamer.blogspot.com

Nov 12 2011 Anchor

Guys, there's a much easier way to do this. Top-left menu, settings, and in "global game launch binary" put "usr/bin/optirun".

Edited by: Barbariandude

poVoq
poVoq Linux gamer
Nov 12 2011 Anchor

Thanks for the tip, but at least on my computer it doesn't work that way either (and it would be nice if not all games would use ironhide, as some don't need the beefy GPU).

--

freegamer.blogspot.com

Nov 13 2011 Anchor

If it doesnt work, it means that optirun is placed in a different place on your machine, you'll have to grep it.

In terms of selectively using it, easy way to solve it is to just remove the text from the binary pipe before launching a game. Can't think of anything better off the top of my head.

poVoq
poVoq Linux gamer
Nov 13 2011 Anchor

No I checked the location of optirun... it is right where you wrote.

Not an expert on these things, but I assume it somehow messes up the working directoris or such, as starting the modified launch scripts via a terminal from the respective directories works just fine with ironhide.

--

freegamer.blogspot.com

Nov 13 2011 Anchor

Wtf? My optirun global binary stopped working. Must be something in the latest build...

Nov 13 2011 Anchor

might be an issue with permissions

Nov 14 2011 Anchor

Bit of a silly workaround, but this is what i'm using:

<br />#!/bin/bash<br /><br />read -p "Game: " game<br /><br />cd common<br />cd `ls | grep $game`<br /><br />optirun ./desura_launch_Play.sh<br />


In the desura folder, and any game without a "desura_launch_Play.sh" file, I just copied+renamed.

EDIT: Code tag seems to hate me... doesn't like returns. :(

Edited by: Barbariandude

poVoq
poVoq Linux gamer
Nov 15 2011 Anchor

Uhhm, could you explain what that does? Don't really like to try bash commands which I don't understand :p

--

freegamer.blogspot.com

Nov 16 2011 Anchor

It'll prompt you for a variable called game, then itll cd to the common folder. Itll then grep for the variable game in the folder names there, and cd into that. Finally, it'll optirun the "desura_launch_Play.sh" script in that folder.

Edited by: Barbariandude

Jan 26 2012 Anchor

You should not need to change any of the launch scripts. Adding it to the global launch command should give you what you need. This is exactly the kind of thing the global launch command was added as an option.

poVoq
poVoq Linux gamer
Jan 29 2012 Anchor

yes I realized that, but it seems to work only for a very limited number of games... the only one I have found where it seem to work is in fact Red Eclipse 1.2.
However when starting the games manually with optirun all of them work as outlined above.

Edit: I am using Ironhide and not the recently released bumblebee3.0, maybe with that it works better.

Edited by: poVoq

--

freegamer.blogspot.com

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.