Official Soldat Forums

Soldat Talk => Need Help? Report Bugs! => Topic started by: CCalp on February 18, 2016, 08:01:23 pm

Title: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 18, 2016, 08:01:23 pm
I have bought a new laptop with the following graphical configuration:

Card-1: Intel Broadwell-U Integrated Graphics HD 5500
Card-2: NVIDIA GM108M [GeForce 940M]

I have installed Manjaro 15.12 64 bit (based on Arch Linux) and the proprietary drivers for nvidia gpu (video-hybrid-intel-nvidia-bumblebee).

By running a program with "primusrun [name]" I can use my dedicated gpu. I can confirm that it's working by using tests like glxgears or the benchmark tool Unigine Heaven. The rendering gets displayed and the gpu is recognized properly.
Code: [Select]
primusrun glxgears -info
GL_RENDERER   = GeForce 940M/PCIe/SSE2
GL_VERSION    = 4.5.0 NVIDIA 352.79

However, if I run playonlinx with primusrun and want to start a game in Soldat / join a server I only get a sandy-coloured screen (super useful screenshot attached).

Here is the logs.txt from Soldat:
Code: [Select]
16-02-19 01:57:11    Log Started
16-02-19 01:57:11 Opened C:\Soldat\soldat.ini
16-02-19 01:57:11 [GFX] Window size: 1920x1080
16-02-19 01:57:11 [GFX] Target resolution: 1920x1080
16-02-19 01:57:11 [GFX] Internal resolution: 1920x1080
16-02-19 01:57:11 [GFX] Loading game graphics
16-02-19 01:57:11 [GFX] OpenGL version: 4.5.0 NVIDIA 352.79
16-02-19 01:57:12 [GFX] Loading font (C:\Soldat\play-regular.ttf)
16-02-19 01:57:12 [GFX] Loading font (C:\Soldat\play-regular.ttf)
16-02-19 01:57:12 Game captions loaded from C:\Soldat\txt\default.Txt
16-02-19 01:57:12 Initializing Sound Library.
16-02-19 01:57:12 Loading sound effects
16-02-19 01:57:12 Loading weather sound effects
16-02-19 01:57:12 Loading music
16-02-19 01:57:12 Creating network interface.
16-02-19 01:57:12 Loading Animations.
16-02-19 01:57:12 Creating Weapons.
16-02-19 01:57:12 Loading Taunts From C:\Soldat\taunts.txt
16-02-19 01:57:12 Loading Weapon Names from C:\Soldat\txt\weaponnames.txt
16-02-19 01:57:12 Loading Map List
16-02-19 01:57:12 Loading Music List
16-02-19 01:57:12 Loading Lobby Servers List
16-02-19 01:57:12 Loading Favourite Servers List
16-02-19 01:57:12 [GFX] Loaded main spritesheet (4096x4096)
16-02-19 01:57:12 [GFX] Loaded interface spritesheet (2048x2048)
16-02-19 01:57:13 Config ticks 20014
16-02-19 01:57:13 Loading Map.
16-02-19 01:57:13 [GFX] Loaded map spritesheet (2048x1024)
16-02-19 01:57:13 Loading Weapon Names from C:\Soldat\txt\weaponnames.txt
16-02-19 01:57:13 Starting Game Server.
16-02-19 01:57:13 Network interface opened.
16-02-19 01:57:13 TCP/IP File Server started 23083
16-02-19 01:57:13  0
16-02-19 01:57:15 Network interface close.
16-02-19 01:57:15 [GFX] OpenGL version: 4.5.0 NVIDIA 352.79
16-02-19 01:57:16 [GFX] Loading font (C:\Soldat\play-regular.ttf)
16-02-19 01:57:16 [GFX] Loading font (C:\Soldat\play-regular.ttf)
16-02-19 01:57:16 Network interface close.
16-02-19 01:57:16 [GFX] Loaded main spritesheet (4096x4096)
16-02-19 01:57:16 [GFX] Loaded interface spritesheet (2048x2048)
16-02-19 01:57:17 Saving Options.
16-02-19 01:57:17 Saving soldat.ini.
16-02-19 01:57:17 Saving mapslist.
16-02-19 01:57:17 Freeing sprites.
16-02-19 01:57:17 UDP closing.
16-02-19 01:57:17 Fileserver closing.
16-02-19 01:57:17 FileServer closed.
16-02-19 01:57:17 Cipher closing.
16-02-19 01:57:17 Cipher destroyed.
16-02-19 01:57:17 Sound closing.
16-02-19 01:57:17 Opening link?
16-02-19 01:57:17    End of Log.


Any ideas on how to fix that?

Let me know if you need any additional information.

Thanks in advance!
Title: Re: Can't run game with dedicated nvidia gpu
Post by: jrgp on February 19, 2016, 01:48:55 am
What if rather than using playonlinux, you remove that layer of abstraction, and just run primusrun wine Soldat.exe?
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 19, 2016, 09:52:56 am
What if rather than using playonlinux, you remove that layer of abstraction, and just run primusrun wine Soldat.exe?

Thanks for the hint. This procedure, however, leads to the same result unfortunately.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: Falcon` on February 19, 2016, 11:02:59 am
can you also paste console output? Maybe wine said something interesting.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: darDar on February 19, 2016, 12:12:12 pm
maybe try to disable one of your cards completely and also try use other drivers (there are usually open source drivers available , which often work better than the official ones).
Title: Re: Can't run game with dedicated nvidia gpu
Post by: jrgp on February 19, 2016, 01:22:53 pm
maybe try to disable one of your cards completely and also try use other drivers (there are usually open source drivers available , which often work better than the official ones).

Yeah maybe try to turn off the intel video card in the bios.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 19, 2016, 02:03:21 pm
can you also paste console output? Maybe wine said something interesting.
Ye, sorry that I forgot that. Here you:
Code: [Select]
$ primusrun wine Soldat.exe
err:module:load_builtin_dll failed to load .so lib for builtin L"winemp3.acm": libmpg123.so.0: cannot open shared object file: No such file or directory
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 4d004 (device=4 access=3 func=401 method=0)
fixme:wbemprox:wbem_locator_ConnectServer authentication not supported
fixme:wbemprox:wbem_locator_ConnectServer specific locale not supported
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0)
(same output as without primusrun)


maybe try to disable one of your cards completely and also try use other drivers (there are usually open source drivers available , which often work better than the official ones).

When setting up my system, I encountered several issues and even made the system unbootable twice. That's why I'm afraid of playing around with the drivers again - especially since gpu isn't properly supported by nouveau drivers  (https://wiki.freedesktop.org/nouveau/FeatureMatrix/) (NV110) yet... I also don't want to risk anything by disabling the internal card software-wise. I wouldn't even know how to do that. >:(


Yeah maybe try to turn off the intel video card in the bios.
There is no option for that in the BIOS. (not even for disabling the discrete gpu)
Title: Re: Can't run game with dedicated nvidia gpu
Post by: nouefexe on February 19, 2016, 03:18:58 pm
try this -> https://www.archlinux.org/packages/multilib/x86_64/lib32-mpg123/
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 19, 2016, 06:43:08 pm
try this -> https://www.archlinux.org/packages/multilib/x86_64/lib32-mpg123/

As expected, that did not fix the issue, but at least the error message is gone now:
Code: [Select]
$ wine Soldat.exe
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 4d004 (device=4 access=3 func=401 method=0)
fixme:wbemprox:wbem_locator_ConnectServer authentication not supported
fixme:wbemprox:wbem_locator_ConnectServer specific locale not supported
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0)
$ optirun wine Soldat.exe
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 4d004 (device=4 access=3 func=401 method=0)
fixme:wbemprox:wbem_locator_ConnectServer authentication not supported
fixme:wbemprox:wbem_locator_ConnectServer specific locale not supported
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0)
Title: Re: Can't run game with dedicated nvidia gpu
Post by: nouefexe on February 21, 2016, 06:39:49 am
try this -> install winetricks and on terminal -> winetricks alldlls=builtin
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 21, 2016, 08:26:45 am
try this -> install winetricks and on terminal -> winetricks alldlls=builtin

Thanks for the hint! It did not fix the issue unfortunately, though. :(
Title: Re: Can't run game with dedicated nvidia gpu
Post by: deguix on February 22, 2016, 02:07:57 am
Did you try just using intel gfx? I use arch linux with wine 1.9.4, skylake + nvidia gt 220 and the sandy screen appears but it's less than a second. I also use optirun + primus. I don't use primus by itself because it's slower than you think.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 22, 2016, 09:04:36 am
I think I made some kind of progress... Having updated to linux44 kernel and ran a complete system upgrade (including nvidia driver), the situation is as follows:

optirun wine Soldat.exe
-> "System Error. Code: 127." at main screen of Soldat -> OK
-> "Access violaten at address 00564C0F in module 'Soldat.exe'. Read of address 00000000." when I click "Start Game" or try to close Soldat
And that's the error message I get in console:
Code: [Select]
err:wgl:has_opengl glAccum not found in libGL, disabling OpenGL.
If I use primusrun wine Soldat.exe, however, the issue is just as before: sandy screen.

So at least, there is some error message now. Does that help? :3

BTW: optirun glxspheres64 or optirun glxgears still work flawlessly.

Did you try just using intel gfx?
You mean running wine via intel gpu? Yep, that works without any issues. Have ~130 FPS in Soldat then.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: nouefexe on February 22, 2016, 11:19:55 am
use primusrun instead ... did you installed the 32bits nvidia drivers ( lib32-nvidia-libgl ) ? and also... check the bumblebee.conf and see if all the .so paths are correct
Title: Re: Can't run game with dedicated nvidia gpu
Post by: deguix on February 22, 2016, 02:43:44 pm
When I run soldat I use:

optirun -b primus wine soldat.exe

if I do just primusrun or optirun it will run slow for me...

Now for the sandy screen, it's probably what nouefexe said.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 22, 2016, 03:07:52 pm
use primusrun instead ... did you installed the 32bits nvidia drivers ( lib32-nvidia-libgl ) ?
Yes.

and also... check the bumblebee.conf and see if all the .so paths are correct
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus. Both folders do exist but only contain "libGL.so.1" each.
XorgModulePath=/usr/lib/nvidia/xorg/,/usr/lib/xorg/modules. "nvidia_drv.so" is in /usr/lib/xorg/modules/drivers  -> Do I have to add that specific path (or put the file into /usr/lib/nvidia/) or will it look in the subfolders as well?

Feels like we're getting closer to it...
Title: Re: Can't run game with dedicated nvidia gpu
Post by: nouefexe on February 22, 2016, 03:58:37 pm
https://bugs.archlinux.org/task/48109 check the last entry
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 22, 2016, 05:53:37 pm
https://bugs.archlinux.org/task/48109 check the last entry

Code: [Select]
$ optirun wine soldat.exe
ERROR: ld.so: object 'librrfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object 'librrfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
/usr/bin/wine: symbol lookup error: /usr/bin/../lib32/libdlfaker.so: undefined symbol: _vgl_dlopen
-> not starting

Code: [Select]
$ primusrun wine soldat.exe
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 4d004 (device=4 access=3 func=401 method=0)
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 4d004 (device=4 access=3 func=401 method=0)
err:winediag:schan_imp_init Failed to load libgnutls, secure connections will not be available.
fixme:wbemprox:wbem_locator_ConnectServer authentication not supported
fixme:wbemprox:wbem_locator_ConnectServer specific locale not supported
fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0)
-> sand
Title: Re: Can't run game with dedicated nvidia gpu
Post by: nouefexe on February 22, 2016, 07:50:30 pm
from arch wiki -> https://wiki.archlinux.org/index.php/bumblebee#Installation

ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded: ignored
You probably want to start a 32-bit application with bumblebee on a 64-bit system. See the "For 32-bit..." section in #Installation. If the problem persists or if it is a 64-bit application, try using the primus bridge.

or install debian.. everything works :)
Title: Re: Can't run game with dedicated nvidia gpu
Post by: jrgp on February 23, 2016, 12:48:01 am
or install debian.. everything works :)

I didn't want to say this as my first reply to the thread since people hate switching distros, but.... yeah. Works perfectly for me on Debian 8 / GTX 750. Will I'm sure work perfectly on ubuntu too.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: deguix on February 23, 2016, 10:55:43 am
Quote
err:winediag:schan_imp_init Failed to load libgnutls, secure connections will not be available.
Another dependency is missing here. Get lib32-gnutls.

If you use optirun by itself, then you need lib32-virtualgl (because it uses virtualgl bridge), it's usually slower than using optirun -b primus...

---

I used to use ubuntu it until it started bugging from just updating. It crashed more than Windows. Then I went Manjaro, and it was working fine but there were some very hard problems that couldn't be solved without having to read on arch linux itself (which broke the Manjaro's scripts if you weren't very careful), and also it doesn't get updated as often. So I just went to arch linux. The installation/setup was very frustrating and time-consuming, but once you get it working, then it becomes amazing.
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on February 24, 2016, 09:13:18 pm
from arch wiki -> https://wiki.archlinux.org/index.php/bumblebee#Installation

ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded: ignored
You probably want to start a 32-bit application with bumblebee on a 64-bit system. See the "For 32-bit..." section in #Installation. If the problem persists or if it is a 64-bit application, try using the primus bridge.

I already tried that.
I guess I'll give up (for now). In the end it's not really important, since I still get ~120 FPS with my internal gpu. Just would have been cool to get that working :p

Switching the distro is not really an option for me - except for Arch. I was both on Ubuntu and Mint for about a year each, and despite I actually liked the user experience they gave me, I want to avoid Ubuntu and its derivates for privacy and personal reasons. I tried out Debian, but I didn't like it as much as Arch / Manjaro. I would have gone to Arch, but that seemed to be too complicated for me still. I'm sure I'll go there one day, enjoying Manjaro as a good step towards Arch. :-)

Anyway guys, thank you for your help. I really appreciate it.
If someone has any other idea (sometime) I will be happy to tried it out!

Cheers
Title: Re: Can't run game with dedicated nvidia gpu
Post by: Rattle.Head on September 25, 2018, 07:43:55 pm
did you solve this? want to go back and can't fix it. My internal gpu shows black screen too
Title: Re: Can't run game with dedicated nvidia gpu
Post by: Rattle.Head on October 26, 2018, 07:10:03 pm
I mannage to run it
Title: Re: Can't run game with dedicated nvidia gpu
Post by: CCalp on October 29, 2018, 07:06:03 am
I mannage to run it

Nice! Do you mind sharing your solution for other players, too?