Skip to content

Getting nVidia card to work

Edit: Solved here!

Hello!

I have Lenovo Z50 70 laptop, with integrated i7 gpu, and deicated nVidia geforce 840M gpu. I have installed nvidia package, and bumblebee.

optirun glxspheres64 works, nvidia-smi gpu stat shows a process, with 84% gpu usage. If I start some game with wine (optirun wine path), it starts, and works. nvidia-smi shows a new process, and systemctl status bumblebeed shows a new group, optirun --status shows that "1 applications using bumblebeed". But the game (Terraria in this case) is really laggy. Its not preformance heavy, so it really shouldn't lag. Gpu usage during game : 0%. Memory used by the game : 4MiB. Same with Unreal Tournament 2004.

Other game tried was Starcraft II. Once started, after a while (3-4 sec) the nvidia-smi and optirun --status won't show anything running on nVidia gpu. Maybe becouse a launcher starts the game, and exits, and the child process is not started on the nVidia gpu. Also, game tells me, its is being ran on the intel gpu.

Also, I haven't ran nvidia-xconfig yet. Well, I did, but I get blackscreen after booting. In the /etc/X11 folder, xorg.conf is empty, like xorg.conf.d. There is nothing like nvida-xconfig. I tried to put some stuff like nvidia device bus ID in it, but I always got a black screen.

  • nvid-xconfig : Package xorg-server was not found in the pkg-config search path. Perhaps you should add the directory containing `xorg-server.pc' No package 'xorg-server' found. Edit: but writes the the config, and blackscreens on boot.

  • pacman -Q | grep xorg-server : xorg-server, xorg-server-common

  • lspci -k|grep -iA2 vga : VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller. Kernel driver in use: i915

  • lspci -k|grep -iA2 3d : 3D controller: NVIDIA Corporation GM108M [GeForce 840M]. Kernel driver in use: nvidia

Also, I have tried anything logical from the Arch wiki, but nothing helped, thats why I here. I hope, someone already solved this problem, and knows the solution. I got everything else working on Arch, and I don't play that much, but It would be very frustrating if I couldn't make this work.

Thank you

Edited 18 Mar 2018. We only hold this version.

10 points22 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
10 · 100% up
Kind
Text
ID
84dadg

Author

43
posts
81
comments
24
media
View profile

22 comments

just use primusrun instead optirun

5 points

With primusrun I get the same results :( Some games won't even show in nvidia-smi

2 points

You can see the difference by running games for Linux without wine. when you use wine, you need to understand that this can involves a bunch of bugs that depend on wine, so you should look for a solution not only in the bumblebee but in the configuration of wine. You can search answers in tests of other on winehq, if you use wine 3+, try to roll back to 2.2 or other version, try install wine-staging. Also, do not forget about magic, when something is not shown but it seems everything works well.

2 points

Try optirun -b primus XYZ.

The VirtualGL bridge (aka the old one) sometimes really sucks because of how it works. In virtually all circumstances the Primus bridge is better.

Edit /etc/bumblebee/bumblebee.conf and set Bridge=primus to leave primus as the default for optirun.

Like u/imgquest said, you can also just use primusrun, but its missing all the CLI options for optirun.

2 points

I forgot to mention, that I tried it. optirun -b primus wine, optirun -b primus -c yuv wine and vblank_mode=0 primusrun wine. None of them gives expected results, or anything near it. Thats why I tought I have some problems with my config files.

2 points

I assume you also ran it without the -b primus - Wine has known issues with primus (At least it used to.)

2 points

You should try primus as stated by other answers.

Plus be sure to check wine pages for each game, since sometimes extra configuration steps are required. I play some Blizzard games (mostly HotS and WoW) and disabling glsl greatly improves performance.

2 points

I have tried, but sadly did not work :(

Checked out glsl, when disabling it Starcraft won't start, becouse "PC doesnt meet min sys requiements". Also checked WineHQ, and sadly did not find any tricks there :(

1 points

Strange, I also have a i7 4th gen + geforce 840M, I can play terraria and wine games with the discrete card without problems. Did you check system logs when launching games?

1 points

You could also opt to set up offloading, which will make the nvidia gpu the primary renderer for everything, if you don't mind the obvious implications on battery life.

https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Using_nvidia

1 points

I made the changes, as they were explained in the wiki, but I got a black screen. If I add anything that is suggested in the wiki to the xorg.conf file, I always get a black screen.

1 points

The most important part of that wiki page is not the Xorg.configuration but the ~/.xinitrc and/or display manager adjustments outlined in the article. Without those, these xorg configs won't work.

1 points

Use Lutris and experiment with different runner versions and settings, install game using their installer script..you can set primusrun on the settings for that game

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.