Cannot play most steam games

I can play games such as Zombie Defense, but most games like Alien Isolation or Dying Light are now failing (I've played them a lot just weeks ago).

The computer is a Dell Laptop: DELL XPS L502X.

$ sudo inxi --cpu --memory
[sudo] password for baltasarq: 
Memory:    RAM: total: 15.56 GiB used: 2.69 GiB (17.3%) 
           Array-1: capacity: 16 GiB note: est. slots: 2 EC: None 
           Device-1: ChannelA-DIMM0 size: 8 GiB speed: 1333 MT/s 
           Device-2: ChannelB-DIMM0 size: 8 GiB speed: 1333 MT/s 
CPU:       Topology: Dual Core model: Intel Core i5-2410M bits: 64 type: MT MCP L2 cache: 3072 KiB 
           Speed: 2596 MHz min/max: 800/2900 MHz Core speeds (MHz): 1: 2694 2: 2694 3: 2862 4: 2716

They just not launch when playing from Steam. They seem they are going to do something, but won't.

$ inxi --graphics
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF108M [GeForce GT 540M] driver: nvidia v: 390.87 
           Display: x11 server: X.Org 1.20.1 driver: intel resolution: 1366x768~60Hz 
           OpenGL: renderer: Mesa DRI Intel Sandybridge Mobile v: 3.3 Mesa 18.2.1

$ pacman -Ss nvidia | grep instalado
core/mhwd-nvidia 1:396.54-1 [instalado]
core/mhwd-nvidia-340xx 340.107-1 [instalado]
core/mhwd-nvidia-390xx 390.87-1 [instalado]
extra/libvdpau 1.1.1+3+ga21bf7a-1 [instalado]
extra/linux414-nvidia-390xx 390.87-4 (linux414-extramodules) [instalado]
extra/linux418-nvidia-390xx 390.87-5 (linux418-extramodules) [instalado]
extra/nvidia-390xx-utils 390.87-1 [instalado]
community/bumblebee 3.2.1-20 [instalado]
multilib/lib32-libvdpau 1.1.1-3 [instalado]
multilib/lib32-nvidia-390xx-utils 390.87-1 [instalado]
multilib/lib32-opencl-nvidia 1:396.54-1 [instalado]

I can run "optirun gxlgears' without any glitch.

$ optirun -v --no-failsafe glxgears
[343689.152745] [INFO]Configured driver: nvidia
[343689.907389] [INFO]Response: Yes. X is active.

[343689.907453] [INFO]Running application using virtualgl.
7190 frames in 5.0 seconds = 1437.827 FPS
7752 frames in 5.0 seconds = 1550.327 FPS
7901 frames in 5.0 seconds = 1580.189 FPS
7884 frames in 5.0 seconds = 1576.658 FPS
^C[343713.979762] [WARN]Received Interrupt signal

$ optirun -v glxspheres64
[345044.765925] [INFO]Configured driver: nvidia
[345045.519301] [INFO]Response: Yes. X is active.

[345045.519323] [INFO]Running application using virtualgl.
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
172.383072 frames/sec - 157.964952 Mpixels/sec
173.926934 frames/sec - 159.379686 Mpixels/sec
175.632555 frames/sec - 160.942648 Mpixels/sec
177.486586 frames/sec - 162.641608 Mpixels/sec

However most games won't work.
primusrun is much worse, BTW.

$ primusrun glxgears
292 frames in 5.0 seconds = 58.315 FPS
300 frames in 5.0 seconds = 59.801 FPS
300 frames in 5.0 seconds = 59.815 FPS

... even failing on windows close.

$ primusrun glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xc1
Context is Direct
OpenGL Renderer: GeForce GT 540M/PCIe/SSE2
61.638711 frames/sec - 56.483249 Mpixels/sec
59.797681 frames/sec - 54.796203 Mpixels/sec
59.825493 frames/sec - 54.821689 Mpixels/sec
59.812262 frames/sec - 54.809565 Mpixels/sec
59.829788 frames/sec - 54.825625 Mpixels/sec
59.821646 frames/sec - 54.818164 Mpixels/sec
59.769383 frames/sec - 54.770272 Mpixels/sec
59.853944 frames/sec - 54.847760 Mpixels/sec
59.819919 frames/sec - 54.816581 Mpixels/sec
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  155 (DRI2)
  Minor opcode of failed request:  7 (DRI2GetBuffersWithFormat  )
  Resource id in failed request:  0x4e00002
  Serial number of failed request:  3622
  Current serial number in output stream:  3622
primus: warning: dropping a frame to avoid deadlock
primus: warning: timeout waiting for display worker
terminate called without an active exception
Abortado (`core' generado)

Follows the journal for the session above.

sep 28 20:21:39 baltasar-pc bumblebeed[557]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
sep 28 20:21:39 baltasar-pc bumblebeed[557]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
sep 28 20:21:39 baltasar-pc bumblebeed[557]: [XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
sep 28 20:21:39 baltasar-pc bumblebeed[557]: [XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
sep 28 20:21:39 baltasar-pc bumblebeed[557]: [XORG] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
sep 28 20:21:48 baltasar-pc audit[3248]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=3248 comm="glxspheres64" exe="/usr/bin/glxspheres64" sig=6 res=1
sep 28 20:21:48 baltasar-pc kernel: audit: type=1701 audit(1538158908.987:8): auid=1000 uid=1000 gid=1000 ses=2 pid=3248 comm="glxspheres64" exe="/usr/bin/glxspheres64" sig=6 res=1
sep 28 20:21:49 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia_modeset' (ref count: 1).
sep 28 20:21:49 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia' (ref count: 12).

Follows the generated journal for Dying Light:

$ journalctl --system --follow       
-- Logs begin at Mon 2018-09-24 20:29:44 CEST. --
sep 28 19:58:02 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia_modeset' (ref count: 1).
sep 28 19:58:02 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia' (ref count: 12).
sep 28 20:01:01 baltasar-pc CROND[2794]: (root) CMD (run-parts /etc/cron.hourly)
sep 28 20:03:20 baltasar-pc bumblebeed[557]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
sep 28 20:03:20 baltasar-pc bumblebeed[557]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
sep 28 20:03:20 baltasar-pc bumblebeed[557]: [XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
sep 28 20:03:20 baltasar-pc bumblebeed[557]: [XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
sep 28 20:03:20 baltasar-pc bumblebeed[557]: [XORG] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
sep 28 20:03:22 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia_modeset' (ref count: 1).
sep 28 20:03:22 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia' (ref count: 12).
sep 28 20:04:16 baltasar-pc bumblebeed[557]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
sep 28 20:04:16 baltasar-pc bumblebeed[557]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
sep 28 20:04:16 baltasar-pc bumblebeed[557]: [XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
sep 28 20:04:16 baltasar-pc bumblebeed[557]: [XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
sep 28 20:04:16 baltasar-pc bumblebeed[557]: [XORG] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
sep 28 20:04:18 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia_modeset' (ref count: 1).
sep 28 20:04:18 baltasar-pc bumblebeed[557]: Failed to unload module 'nvidia' (ref count: 12).

It seems that the problem seems to be that bumblebee cannot unload the kernel's nvidia module, though I don't see the logic here, it should load it, shouldn't it?

I've found a forum in which people talks about this problem c. 2015... it cannot be possible it remains to be solved, since I've been successfully using this computer, playing that games, at about that time...

Any hint?

Maybe this could help?

From the link:

I've followed the link, and disabled the nvidia-persistenced service:

$ sudo systemctl disable nvidia-persistenced
disabled
$ systemctl is-active nvidia-persistenced
inactive

I also realized that for some reason, the package mhwd-nvidia-340xx was still installed. I uninstalled it. Of course there was not easy way todo this, mhwd claiming it was not installed. I used yaourt and did some cleaning in /var when mhwd complained about invalid scripts.

$ yaourt -Rss mhwd-nvidia-340xx

... and rebooted. The service nvidia-persistenced is inactive, and everything looks fine. Unfortunately, games still do not work... and now there is no obvious error to look into. optirun still works flawlessly, as before. Primusrun still crashes on window close with both glxgears and glxspheres64. The logs are all the same, no matter you trying to launch a game, running optirun or primusrun.

sep 29 10:22:43 baltasar-pc kernel: bbswitch: enabling discrete graphics
sep 29 10:22:44 baltasar-pc kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 238
sep 29 10:22:44 baltasar-pc kernel: nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
sep 29 10:22:44 baltasar-pc kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.87  Tue Aug 21 12:33:05 PDT 2018 (using threaded interrupts)
sep 29 10:22:44 baltasar-pc kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.87  Tue Aug 21 16:16:14 PDT 2018
sep 29 10:22:45 baltasar-pc bumblebeed[542]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
sep 29 10:22:45 baltasar-pc bumblebeed[542]: [XORG] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
sep 29 10:22:45 baltasar-pc bumblebeed[542]: [XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
sep 29 10:22:45 baltasar-pc bumblebeed[542]: [XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
sep 29 10:22:45 baltasar-pc bumblebeed[542]: [XORG] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
sep 29 10:22:46 baltasar-pc kernel: nvidia-modeset: Unloading
sep 29 10:22:46 baltasar-pc kernel: nvidia-nvlink: Unregistered the Nvlink Core, major device number 238
sep 29 10:22:46 baltasar-pc kernel: bbswitch: disabling discrete graphics
sep 29 10:22:46 baltasar-pc kernel: pci 0000:01:00.0: Refused to change power state, currently in D0

Though I'm not an expert... everything looks fine, except that error about the... keyboard? Can that be relevant? I don't have keyboard problems... at all. My system is Spanish, and everything works fine in that sense.

$ setxkbmap -print -verbose 10     
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     es
options:    terminate:ctrl_alt_bksp
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+es+inet(evdev)+terminate(ctrl_alt_bksp)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+es+inet(evdev)+terminate(ctrl_alt_bksp)"    };
        xkb_geometry  { include "pc(pc105)"     };
};

So now I'm supposed to be closer, but still very lost. Any idea?

Looks like this bug: https://github.com/Bumblebee-Project/Bumblebee/issues/883

It would be helpful if you could include the crash report of a game in question. Crash reports for Dying Light, for example, are stored under steamapps/common/Dying Light/DW/out/logs

Do other applications also crash? Like firefox? (if so, what is their output when run from terminal?)

FYI: That was an mhwd definition/profile package. It was not the actual driver package. It merely contained information about the driver package. It is completely normal to have these definition packages on a system even if it does not actually need those drivers.

image

Additionally:

It looks like primusrun is being capped at your monitor's refresh rate. This is normal when you have vsync enabled. You can verify this is the case by comparing the FPS to your monitor's refresh rate in your display settings (they should be quite similar).

There are no recent logs there. Dying Light used to crash in my computer randomly while playing, and I guess those are the logs you can find there. But when I launch the game, no new log is created. I guess that the game actually does not have time to run at all. Maybe.

Nope. But I don't run them with optirun... Okay, I've tried it and it does not crash.

$ journalctl --system --follow
-- Logs begin at Tue 2018-09-25 09:39:24 CEST. --
sep 29 22:38:56 baltasar-pc bumblebeed[542]: [XORG] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
sep 29 22:38:56 baltasar-pc audit[5141]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=5141 comm="firefox" exe="/usr/lib/firefox/firefox" sig=11 res=1
sep 29 22:38:56 baltasar-pc kernel: firefox[5141]: segfault at 0 ip 00007fd70cb7225f sp 00007ffdda8f7898 error 6 in libxul.so[7fd70cb21000+4afe000]
sep 29 22:38:56 baltasar-pc kernel: Code: 04 25 00 00 00 00 00 00 00 00 0f 0b 00 e8 a1 fe ff ff 48 8b 05 f2 1f e3 04 48 8d 15 23 d0 be 03 c6 05 3e ad ec 04 01 48 89 10 <c7> 04 25 00 00 00 00 00 00 00 00 0f 0b 48 8b 05 cd 1f e3 04 48 8d 
sep 29 22:38:56 baltasar-pc kernel: audit: type=1701 audit(1538253536.767:10): auid=1000 uid=1000 gid=1000 ses=2 pid=5141 comm="firefox" exe="/usr/lib/firefox/firefox" sig=11 res=1
sep 29 22:38:56 baltasar-pc kernel: nvidia-modeset: Unloading
sep 29 22:38:56 baltasar-pc kernel: nvidia-nvlink: Unregistered the Nvlink Core, major device number 238
sep 29 22:38:56 baltasar-pc kernel: bbswitch: disabling discrete graphics
sep 29 22:38:56 baltasar-pc kernel: pci 0000:01:00.0: Refused to change power state, currently in D0

Interesting, I did not know.
Thanks for your help!

But in that bug they talk about a thing called vulkan I don't know at all. I don't have it installed, either. Okay, I installed vulkan-tools and it shown the following output:

$ optirun -v vulkaninfo
[46295.878080] [INFO]Configured driver: nvidia
[46297.821270] [INFO]Response: Yes. X is active.

[46297.821294] [INFO]Running application using virtualgl.
==========
VULKANINFO
==========

Vulkan Instance Version: 1.1.82

Xlib:  extension "NV-GLX" missing on display ":0".
/build/vulkan-tools/src/Vulkan-Tools/vulkaninfo/vulkaninfo.c:3339: failed with VK_ERROR_INITIALIZATION_FAILED

But I don't know which path to follow now...

AFAIK, Vulkan (a relatively new cross-platform graphics API that provides a (superior) alternative to OpenGL and DirectX) does not work with bumblebee out of the box. There is a tutorial for setting it up.

If you're attempting to run games that use Vulkan, that tutorial might help with those. However, Dying Light doesn't use Vulkan; it uses OpenGL. With that being the case, I doubt that would solve the issue you're having with that particular game.

Can you post the contents of your custom launch options for Dying Light?

No, I was just trying to do whatever it was possible to solve the issue without knowing exactly what Vulkan was.

Sure:

optirun %command%

I've just realized that those games that work are not using optirun, i.e., there are no custom launch options.
Unfortunately, not all games work that way, since that means that they are using the Intel graphics card. For example Zombie Defense and Quadrant work.

optirun uses the older VirtualGL backend, which may have issues. It is advised to use Primus (its replacement) using primusrun where possible.

Are you using the built-in Steam, or steam-native? If you don't have steam-native installed, try that (you do not need to remove anything to install and use it; the same Steam shortcut will use the native libraries when it is installed).

If that doesn't work, can you run steam from terminal and post output from that when the game fails to load?

Vulkan is unrelated, this is just an issue that the commenter from 20th April was experiencing. But the actual issue which has been reported in the initial bug report is the one with the keyboard and it looks like there is no solution yet. So you could drop in a "me too" at this bug report and also ask if this keyboard issue is what is actually the cause of the games not starting or not. In latter case we should neglect the keyboard error and search for the actual cause of the problem.

Ok, I actually managed to run all games needing NVidia with primusrun, to my surprise (I thought it was broken, because of its low FPS, not I know better, thank you).

Yep, I'm using steam-native.

In fact, Alien Isolation was not working at all, despite of the change to primusrun. Inspecting the logs, I discovered it was related to not being able to locate libpcre, a library related to regular expressions in Perl (go figure). Specifically, it was libpcre.so.3 the file that was missing. I sym-linked the libpcre.so file as libpcre.so.3 and it worked. Now I can finish Alien Isolation!!

Thanks both for your help, I think this settles the issue.

1 Like

Forum kindly sponsored by