Hi,
The actual manjaro’s support of nvidia optimus is a little bit weird
I’ve the following GPUs:
$ lspci | grep -e '3D\|VGA'
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev ff)
Manjaro has installed the following nonfree driver:
$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-418xx-bumblebee 2020.10.04 false PCI
Warning: No installed USB configs!
Only after adding the BusID “PCI:1:0:0” string to the Device section of /etc/bumblebee/xorg.conf.nvidia file I can run ‘optirun/primusrun’ without errors:
$ primusrun glxinfo | grep "OpenGL vendor"
OpenGL vendor string: NVIDIA Corporation
$ optirun glxinfo | grep "OpenGL vendor"
OpenGL vendor string: NVIDIA Corporation
$ glxinfo | grep "OpenGL vendor"
OpenGL vendor string: Intel Open Source Technology Center
And the most strange part of this story is FPS, they are exactly the same within Intel and Nvidia:
301 frames in 5.0 seconds = 60.005 FPS
Is it okay?
BTW i’ve tried to remove bumblee and install only nvidia (418, 440, 450) drivers and got the black screen.
brg,
Serhiy.
Yours is a very old card and unfortunately I think the latest driver that supports it is 418 so probably why 440 and 450 gives you black screen.
Could be, but under pop!_os it works with 440.
Okay, adding vblank_mode=0 in head of primusrun/optirun makes a job: FPS ~ 550
1 Like
linux, 3d, glx
Sample
glxgears
usage:
env vblank_mode=0 __GL_SYNC_TO_VBLANK=0 glxgears
does job (for Mesa and NVIDIA driver).
Thanks, good options.
But for some reason civ6 under steam sees only Intel GPU, that’s annoying.
steam?
You have to edit custom command line for game launcher in steam self.
SEE: Optimus and Steam for Linux - Linux Issues - Knowledge Base - Steam Support
primusrun %command%
should work, For no Vsync use enviroment variable set.
export __GL_SYNC_TO_VBLANK=0
to /etc/environment
file.
Reboot for applying.
It’s crushed, something is missing for primusrun+steam cooperation, because I can run ‘optirun steam’ but ‘primusrun steam’. Suppose the root cause somewhere in 32libs.
Nevermind, you are cause previous commands works.
See this thread VSync and small input lag when using nVidia card (prime-run)
I updated my previous reply.
FadeMind:
steam?
yes, steam
I’ve already tried to launch civ6 with the following SET LAUNCH OPTIONS
env vblank_mode=0 __GL_SYNC_TO_VBLANK=0 LD_PRELOAD=/usr/lib/libfreetype.so.6 primusrun %command%
without success.
As I mentioned I can run:
$ optirun steam
but
$ primusrun steam
ends with Failed to load steamui.so
Seems I’ve missed some libs, anyway I’ll try your glue with /etc/environment.
primusrun steam and optirun steam WILL NOT WORK AT ALL.
After adding to /etc/environment file:
export __GL_SYNC_TO_VBLANK=0
export vblank_mode=0
glxgears shows ~8000 FPS
optirun glxgears shows ~2600 FPS
primusrun glxgears shows ~2600 FPS
optirun steam starts successfully.
primusrun steam fails with:
Failed to load steamui.so - dlerror(): /usr/lib32/primus/libGL.so.1: undefined symbol: _ZNSt7__cxx1112basic_stringIc
St11char_traitsIcESaIcEE10_M_replaceEjjPKcj, version GLIBCXX_3.4.21
Civ6 with the following SET LAUNCH OPTIONS
LD_PRELOAD=/usr/lib/libfreetype.so.6 primusrun %command%
LD_PRELOAD=/usr/lib/libfreetype.so.6 optirun %command%
failed to start:
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
/home/xxx/.local/share/Steam/steamapps/common/Sid Meier's Civilization VI/./Civ6: line 2: 4869 Aborted (core dumped) ./GameGuide/Civ6
Game removed: AppID 289070 "", ProcID 4853
Uploaded AppInterfaceStats to Steam
I’ll try to find out how to launch civ6 from the console with appid to debug output.
So
$ optirun steam -applaunch 289070
starts but civ6 still see only Intel GPU.
$ primusrun steam -applaunch 289070
terminated.
I believe it’s enough for me for now
thanx, I want to play with civ6 and have a reasonable FPS with it, I don’t want to play with Specifying OpenGL Environment Variable Settings
But maybe I’ll try a little bit later
TIP: ask steam community about it, maybe I missed something if THIS: Optimus and Steam for Linux - Linux Issues - Knowledge Base - Steam Support did not work.