Bug 89017 - XCOM: enemy unknown doesn't start (steam)
Summary: XCOM: enemy unknown doesn't start (steam)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-06 20:25 UTC by ziktofel
Modified: 2015-02-20 07:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description ziktofel 2015-02-06 20:25:37 UTC
The game doesn't start on Ubuntu 14.04 when oibaf PPA is enabled when using bumblebee (using primus bridge) and nvidia driver (346.35). The same works, when the oibaf PPA is purged (no need to restart X) (stock drivers for intel GPU and nvidia 346.35 for nvidia GPU).
Affected HW:
intel HD 4000+GT630M
intel HD 4600+GTX860M
Comment 1 Ian Romanick 2015-02-11 22:19:18 UTC
Are you trying to run on NVIDIA graphics or Intel graphics?
Comment 2 ziktofel 2015-02-12 11:53:56 UTC
always on nvidia graphics using optirun -b primus ... (it's a nvidia optimus laptop)
Comment 3 Eero Tamminen 2015-02-13 13:53:36 UTC
According to this:
  https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

14.10 is recommended version for oibaf PPA and you're using 14.04.

I don't have 14.04 Ubuntu install nor optimus device, but I have Ubuntu 14.10 on HSW GT3e, which should be close enough for HD 4600 (=HSW GT2).

Oibaf PPA seems to offer today's Mesa:
  https://launchpad.net/~oibaf/+ppa-packages

So I just built Mesa from git.  "XCOM: EU" works fine with that, as it does with Mesa from few wekes ago and Ubuntu 14.10 default Mesa v10.3.2, using Intel driver.


As you're using the Nvidia driver, when the game refuses to run, it's Nvidia bug (Intel driver gets involved only when Nvidia output should get to display).  I.e. you should complain to Nvidia about their proprietary blob not working in your setup. 

-> NOTOURBUG


You should try the game also with Mesa open source Nvidia driver.  If even that doesn't work, file a bug against Mesa Nvidia driver.  With that you should do the following:

Run steam from command line with:
  LIBGL_DEBUG=verbose MESA_DEBUG=1 steam

And check the output of that and following files for issues:
  ~/.steam/error.log
  /var/log/Xorg.0.log

(Output of dmesg could also have something useful.)
Comment 4 ziktofel 2015-02-13 16:44:59 UTC
the problem is that the nvidia blob remains the same but the mesa version changes
Comment 5 Eero Tamminen 2015-02-13 17:07:00 UTC
(In reply to ziktofel from comment #4)
> the problem is that the nvidia blob remains the same but the mesa version
> changes

It's inconclusive proof that issue is in Mesa.  Does the issue happen with Mesa Nvidia driver?  And if yes, what errors you see in console (see comment 3 for instructions)?
Comment 6 ziktofel 2015-02-13 17:23:42 UTC
using only the intel GPU works but...

Ubuntu 14.04 stock, using "optirun -b primus": works
Ubuntu 14.04 + oibaf, running on intel GPU: works
Ubuntu 14.04 + oibaf, using "optirun -b primus": fails
Ubuntu 14.04 + oibaf, using "optirun -b virtualgl": fails
The only thing changed between the "optirun -b primus" tests were the things in oibaf's ppa (the nvidia blob remained the same) thus thinking that looks like mesa's bug

Another game (Civ5 BNW) on Ubuntu 14.04 + oibaf, using "optirun -b primus": works

all the tests were done using Linux 3.19 kernel

the terminal output using "optirun -b primus"

Game update: AppID 200510 "XCOM: Enemy Unknown", ProcID 14043, IP 0.0.0.0:0
ERROR: ld.so: object '/hdd/home/venca/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/hdd/home/venca/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/hdd/home/venca/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
libGL: screen 0 does not appear to be DRI3 capable
libGL: pci id for fd 15: 8086:0416, driver i965
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so

malloc: unknown:0: assertion botched
free: called with unallocated block argument
last command: (null)
Aborting...Game removed: AppID 200510 "XCOM: Enemy Unknown", ProcID 14043 

related dmesg output:
[31628.134880] bbswitch: enabling discrete graphics
[31628.196911] [drm] Initialized nvidia-drm 0.0.0 20130102 for 0000:01:00.0 on minor 1
[31628.196920] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  346.35  Sat Jan 10 21:27:15 PST 2015
[31628.209356] vgaarb: this pci device is not a vga device
[31628.211776] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211813] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211827] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211850] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211865] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211883] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211916] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.211930] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.234634] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31628.395638] vgaarb: this pci device is not a vga device
[31629.094894] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31629.100486] [drm] Module unloaded
[31629.120478] bbswitch: disabling discrete graphics
[31629.120490] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
[31629.135430] pci 0000:01:00.0: Refused to change power state, currently in D0

~/.steam/error.log does not exist
/var/log/Xorg.0.log shows only these messages:
[ 31590.927] (II) config/udev: Adding drm device (/dev/dri/card1) card1 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
[ 31590.927] (II) config/udev: Ignoring already known drm device (/dev/dri/card1)
[ 31591.829] removing GPU device /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 /dev/dri/card1
[ 31591.829] xf86: remove device 0 /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
Comment 7 ziktofel 2015-02-13 17:26:05 UTC
(In reply to Eero Tamminen from comment #5)
> (In reply to ziktofel from comment #4)
> > the problem is that the nvidia blob remains the same but the mesa version
> > changes
> 
> It's inconclusive proof that issue is in Mesa.  Does the issue happen with
> Mesa Nvidia driver?  And if yes, what errors you see in console (see comment
> 3 for instructions)?

the nvidia's binary driver was used in that case with bumblebee but the bug is triggered by changing mesa's version from ubuntu 14.04's to oibaf's
Comment 8 ziktofel 2015-02-17 17:00:56 UTC
Also affected games:
DOTA 2
Team Fortress 2
Left 4 Dead 2
Comment 9 ziktofel 2015-02-17 18:25:43 UTC
FIXED by applying this patch: http://pastebin.com/fJTtpHGU to ubuntu's primus package
Comment 11 Eero Tamminen 2015-02-19 09:38:21 UTC
> the nvidia's binary driver was used in that case with bumblebee but the bug is triggered by changing mesa's version from ubuntu 14.04's to oibaf's

Oibaf repo contains other things besides Mesa.  Did you test that it was really Mesa that triggered the issue and not the other packages you got from Oibaf?


Looking at the patch you linked...

It removes the check for number of configurations set into "ncfg":
  glXChooseFBConfig(ddpy, 0, attrs, &ncfg)

And just blindly uses the first config in the returned list.

I.e. issue apparently was that function giving zero as number of configurations which support double buffering, but still having non-NULL config list.

I don't see how that could happen with Mesa implementation of glXChooseFBConfig (it always sets configs pointer to NULL when number of items is zero) so I still think the issue was with your Nvidia driver (i.e. resolution should be NOTOURBUG).
Comment 12 ziktofel 2015-02-19 15:36:35 UTC
But:
Ubuntu's 14.04 stock mesa + nvidia 346.35 works
Oibaf + nvidia 346.35 fails

No other package changes between tests, and it affects only several games (known are the three Valve's + XCOM). Many games are unaffected by this bug.

I really can't imagine that the bug could be in nvidia's driver as it worked under 14.04 (and remained same under all the tests!) but got broken after mesa's upgrade (dist-upgrade after adding PPA). Tried even upgrading PPA + related packages to utopic/vivid (used apt-pinning so only upgraded the related packages like Xorg) but this didn't have any impact on this bug. So from my observation the bug must be somewhere between mesa and primus as patch to primus solved the issue.

Are you really sure that the bug is in the nvidia driver that never changed across all the tests (both successes and fails)?
Comment 13 Eero Tamminen 2015-02-19 16:41:47 UTC
(In reply to ziktofel from comment #12)
> Are you really sure that the bug is in the nvidia driver that never changed
> across all the tests (both successes and fails)?

Something triggering a bug, doesn't necessarily mean it's the cause of it. Only changes in that area of code in Mesa after v10.1 (March 2014) were removals of redundant casts and such things and those didn't even touch glXChooseFBConfig functions.

(In reply to ziktofel from comment #7)
> the nvidia's binary driver was used in that case with bumblebee but the bug
> is triggered by changing mesa's version from ubuntu 14.04's to oibaf's

Did you make sure that you had no other new packages [1] from Oibaf installed besides Mesa?  E.g. new X driver?

[1] https://launchpad.net/~oibaf/+ppa-packages
Comment 14 ziktofel 2015-02-19 23:30:01 UTC
> (In reply to ziktofel from comment #7)
> > the nvidia's binary driver was used in that case with bumblebee but the bug
> > is triggered by changing mesa's version from ubuntu 14.04's to oibaf's
> 
> Did you make sure that you had no other new packages [1] from Oibaf
> installed besides Mesa?  E.g. new X driver?
> 
> [1] https://launchpad.net/~oibaf/+ppa-packages

The PPA was installed as bulk, do you think that the bug might be in xserver-xorg-video-intel instead?
Comment 15 Eero Tamminen 2015-02-20 07:53:20 UTC
(In reply to ziktofel from comment #14)
> The PPA was installed as bulk, do you think that the bug might be in
> xserver-xorg-video-intel instead?

Well, based on the patch you linked and from my look at the code and changes in Mesa in the related area, it doesn't seem to be Mesa change (or one in its intel backend where you've filed this) that triggers your issue.

As to where the bug is, you're still some way from finding that, properly isolating the component that triggers it will just be the first step.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.