ValveSoftware / portal2

Issues for the Linux port of Portal 2
145 stars 11 forks source link

Segmentation fault (gentoo amd64, glibc 2.19, nvidia-drivers 337.19, bumblebee) #219

Closed dimgel closed 10 years ago

dimgel commented 10 years ago

Hi. Not actually only portal2 but all games (including non-Valve Witcher2) so perhaps nVidia driver should be blamed (BTW it works without optirun on Intel card with media-libs/libtxc_dxtn installed - although extremely slow; but on the other hand, optirun glxspheres and optirun / wine32 / steam / skyrim work.)

This started 2-3 months ago, perhaps after I upgraded nvidia-drivers to 337.19 because earlier versions didn't compile with kernel 3.14.* which I upgdaded to because earlier kernel had a bug preventing it from being loaded by my HP Envy UEFI BIOS. I didn't report the bug hoping it would solve itself someday but it didn't. Only tried updating glibc 2.18 to 2.19, without effect. Maybe you can help somehow with current version of nvidia-drivers.

I'll add a part of portal2 console log and system info below in comments.

dimgel commented 10 years ago

$ optirun steam then start portal2 get this console log:

... This system supports the OpenGL extension GL_EXT_texture_compression_dxt1. This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt3. This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt5. This system DOES NOT support the OpenGL extension GLX_EXT_swap_control_tear. Did not detect any valid joysticks. CSoundEmitterSystemBase::BaseInit: Manifest 'scripts/game_sounds_manifest.txt' with bogus file type 'new_sound_scripts_must_go_below_here', expecting 'declare_file' or 'precache_file' Convar r_flashlightscissor has conflicting FCVAR_CHEAT flags (child: no FCVAR_CHEAT, parent: has FCVAR_CHEAT, parent wins)

swap interval = 1 swap limit = 1

X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 15 (X_QueryTree) Resource id in failed request: 0x40000a Serial number of failed request: 130 Current serial number in output stream: 130 Missing shutdown function for DevShotGenerator_Init() : DevShotGenerator_Shutdown()

Missing shutdown function for MapReslistGenerator_Init() : MapReslistGenerator_Shutdown()

Missing shutdown function for COM_InitFilesystem( m_StartupInfo.m_pInitialMod ) : COM_ShutdownFileSystem()

Missing shutdown function for Steam3Client().Activate() : Steam3Client().Shutdown()

/home/me/.local/share/Steam/SteamApps/common/Portal 2/portal2.sh: line 46: 7003 Segmentation fault ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@" Game removed: AppID 620 "Portal 2 (Beta)", ProcID 7003 Generating new string page texture 111: 128x256, total string texture memory is 2.26 MB

(steam:6733): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent.

(steam:6733): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent. ...

dimgel commented 10 years ago

Processor Information: Vendor: GenuineIntel CPU Family: 0x6 CPU Model: 0x3a CPU Stepping: 0x9 CPU Type: 0x0 Speed: 2401 Mhz 8 logical processors 4 physical processors HyperThreading: Supported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Unsupported SSE41: Supported SSE42: Supported

Network Information: Network Speed:

Operating System Version: "Gentoo Base System release 2.2" (64 bit) Kernel Name: Linux Kernel Version: 3.14.4-gentoo X Server Vendor: The X.Org Foundation X Server Release: 11500000 X Window Manager: KWin Steam Runtime Version: steam-runtime-release_2014-04-15

Video Card: Driver: NVIDIA Corporation GeForce GT 650M/PCIe/SSE2

Driver Version:  4.4.0 NVIDIA 337.19
OpenGL Version: 4.4
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 60 Hz
VendorID Not Detected
DeviceID Not Detected
Number of Monitors:  2
Number of Video Cards Not Detected
Primary Display Resolution:  1920 x 1080
Desktop Resolution: 1920 x 1080
Primary Display Size: 15.00" x 8.43"  (17.17" diag)
                                        38.1cm x 21.4cm  (43.6cm diag)
Primary VRAM: 2048 MB

Sound card: Audio device: Intel PantherPoint HDMI

Memory: RAM: 15938 Mb

Miscellaneous: UI Language: English LANG: en_US.UTF-8 Microphone: Not set Total Hard Disk Space Available: 450041 Mb Largest Free Hard Disk Block: 54150 Mb

Installed software:

Recent Failure Reports:

dimgel commented 10 years ago

HL2 log:

... This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt3. This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt5. This system DOES NOT support the OpenGL extension GLX_EXT_swap_control_tear. GL_NV_bindless_texture: DISABLED GL_AMD_pinned_memory: DISABLED GL_EXT_texture_sRGB_decode: AVAILABLE GL_NVX_gpu_memory_info: AVAILABLE GL_ATI_meminfo: UNAVAILABLE GL_NVX_gpu_memory_info: Total Dedicated: 2097152, Total Avail: 2097152, Current Avail: 2055508 GL_MAX_SAMPLES_EXT: 32 CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 2401 MHz, Processor: GenuineIntel GlobalMemoryStatus: 4294967295 CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 2401 MHz, Processor: GenuineIntel GlobalMemoryStatus: 4294967295 IDirect3DDevice9::Create: BackBufWidth: 1920, BackBufHeight: 1080, D3DFMT: 3, BackBufCount: 1, MultisampleType: 4, MultisampleQuality: 0 GL sampler object usage: ENABLED GL prefer MapBufferRange: NO

swap interval = 0 swap limit = 1

The program 'hl2_linux' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 131 error_code 3 request_code 15 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Missing shutdown function for DevShotGenerator_Init() : DevShotGenerator_Shutdown() Missing shutdown function for MapReslistGenerator_Init() : MapReslistGenerator_Shutdown() Missing shutdown function for COM_InitFilesystem( m_StartupInfo.m_pInitialMod ) : COM_ShutdownFileSystem() Missing shutdown function for Steam3Client().Activate() : Steam3Client().Shutdown() /home/me/.local/share/Steam/SteamApps/common/Half-Life 2/hl2.sh: line 67: 16284 Segmentation fault ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@" Game removed: AppID 220 "Half-Life 2", ProcID 16284

dimgel commented 10 years ago

L4D2 log:

... Game update: AppID 550 "Left 4 Dead 2", ProcID 16503, IP 0.0.0.0:0 ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ... ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. SDL video target is 'x11' ... (steam:16156): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent. Using breakpad crash handler Setting breakpad minidump AppID = 550 Forcing breakpad minidump interfaces to load Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Looking up breakpad interfaces from steamclient Calling BreakpadMiniDumpSystemInit Steam_SetMinidumpSteamID: Caching Steam ID: 76561197982870345 [API loaded yes] Steam_SetMinidumpSteamID: Setting Steam ID: 76561197982870345 [0602/005505:ERROR:resource_bundle.cc(411)] Failed to load /home/me/.local/share/Steam/SteamApps/common/Left 4 Dead 2/cef_gtk.pak Some features may not be available. [0602/005505:ERROR:object_proxy.cc(239)] Failed to call method: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1 [0602/005506:WARNING:proxy_service.cc(646)] PAC support disabled because there is no system implementation The program 'hl2_linux' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 139 error_code 3 request_code 15 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) SDL video target is 'x11' SDL failed to create GL compatibility profile (whichProfile=0! This system supports the OpenGL extension GL_EXT_framebuffer_object. ... This system DOES NOT support the OpenGL extension GLX_EXT_swap_control_tear. GL_NV_bindless_texture: DISABLED GL_AMD_pinned_memory: DISABLED GL_EXT_texture_sRGB_decode: AVAILABLE GL_NVX_gpu_memory_info: AVAILABLE GL_ATI_meminfo: UNAVAILABLE GL_NVX_gpu_memory_info: Total Dedicated: 2097152, Total Avail: 2097152, Current Avail: 2055500 GL_MAX_SAMPLES_EXT: 32 Did not detect any valid joysticks. VerifyDefaultVideoConfig: The default video config for the machine has changed, updating the current config to match. Querying for subscribed files IDirect3DDevice9::Create: BackBufWidth: 1600, BackBufHeight: 900, D3DFMT: 3, BackBufCount: 2, MultisampleType: 2, MultisampleQuality: 0 GL sampler object usage: ENABLED GL prefer MapBufferRange: NO BinkOpen( /home/me/.local/share/Steam/SteamApps/common/Left 4 Dead 2/left4dead2/media/valve.bik ) ConVarRef volume doesn't point to an existing ConVar /home/me/.local/share/Steam/SteamApps/common/Left 4 Dead 2/./hl2.sh: line 67: 16507 Segmentation fault ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@" Game removed: AppID 550 "Left 4 Dead 2", ProcID 16507

dimgel commented 10 years ago

Witcher2 log (looks like they kept assert()s in production and thus prevented segfaults):

ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. * Message: window size should be 487x713 ERROR: ld.so: object '/home/me/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Setting breakpad minidump AppID = 20920 Steam_SetMinidumpSteamID: Caching Steam ID: 76561197982870345 [API loaded no] X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 15 (X_QueryTree) Resource id in failed request: 0x40000e Serial number of failed request: 508 Current serial number in output stream: 508 witcher2: /home/jc/Development/Projects/eon2-witcher2/src/dlls/win32/kernel32/synchronisationPrimitives.cpp:700: void SignalObject(eON_HandleData, DWORD): Assertion `twi->WaitResult == (HRESULT)(((DWORD)0xFFFFFFFF)-1)' failed. Game removed: AppID 20920 "The Witcher 2: Assassins of Kings Enhanced Edition", ProcID 15011 ...

dimgel commented 10 years ago

Upgrading to nvidia-drivers 337.25 (just arrived in ~amd64 repo) didn't help.

dimgel commented 10 years ago

Maybe I bother you for nothing, sorry. Have just read in gentoo steam wiki:

If you have problems on 64 bit, it's because emul-linux-x86-* are typically very out of date. You can try using a 32-bit chroot.

They are currently refactoring these emul-linux-x86-* packages by adding ABI_X86="32" to all relevant libs (true multilib compilation) and thus making emul-packages themselves empty. No idea how long it will take: currently all this work is hard-masked, attempted to unmask but portage could not correctly resolve dependencies.

Anyway please keep this ticket open until it solves itself one way or other. I'll close it myself when it does.

dimgel commented 10 years ago

I finally found how to install Primus on Gentoo (exactly - how unmask "missing" live ebuild), maybe someone will find this useful:

layman -a bumblebee echo "=x11-misc/primus-9999 **" >> /etc/portage/package.keywords echo "x11-misc/primus abi_x86_32" >> /etc/portage/package.use emerge primus vi /etc/bumblebee/bumblebee.conf [optirun] Bridge=primus

Now everything works. So the problem was only under VirtualGL bridge (weird, the very same version used to work few months ago).