FS#41045 - [linux] opengl programs crash after/while suspend to ram with 3.16 kernel
Attached to Project:
Arch Linux
Opened by Matthias Krüger (matthiaskrgr) - Tuesday, 01 July 2014, 12:18 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 07 October 2014, 16:53 GMT
Opened by Matthias Krüger (matthiaskrgr) - Tuesday, 01 July 2014, 12:18 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 07 October 2014, 16:53 GMT
|
Details
When I run a opengl app and the suspend to ram, it will
crash.
Also after suspending to ram, I cannot run any opengl apps. reproducing the problem in gdb: (gdb) exec-file /usr/bin/glxgears (gdb) run Starting program: /usr/bin/glxgears warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff468c1ef in ?? () from /usr/lib/xorg/modules/dri/i965_dri.so (gdb) |
This task depends upon
please also have a look at https://bbs.archlinux.org/viewtopic.php?id=183359
Downgrading kernel to lts version or to 3.15.8-1 fixes the bug.
intel_do_flush_locked failed: argument invalide (invalid argument) is found twice in a log I generated with journalctl -b on my laptop with linux 3.16 kernel and trying to launch gnome shell :
août 07 15:41:44 fredo-arch-laptop gnome-session[353]: intel_do_flush_locked failed: Argument invalide
août 07 15:41:44 fredo-arch-laptop polkitd[260]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.24, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8) (disconnected from bus)
août 07 15:41:44 fredo-arch-laptop gnome-session[353]: gnome-session[353]: WARNING: Child process 424 was already dead.
août 07 15:41:44 fredo-arch-laptop gnome-session[353]: WARNING: Child process 424 was already dead.
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: The XKEYBOARD keymap compiler (xkbcomp) reports:
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: > Warning: Compat map for group 2 redefined
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: > Using new definition
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: > Warning: Compat map for group 3 redefined
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: > Using new definition
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: > Warning: Compat map for group 4 redefined
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: > Using new definition
août 07 15:41:45 fredo-arch-laptop gdm-Xorg-:0[253]: Errors from xkbcomp are not fatal to the X server
août 07 15:41:46 fredo-arch-laptop polkitd[260]: Registered Authentication Agent for unix-session:c1 (system bus name :1.31 [gnome-shell --mode=gdm], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8)
août 07 15:41:46 fredo-arch-laptop gnome-session[353]: Gjs-Message: JS LOG: No permission to trigger offline updates: Polkit.Error: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Action org.freedesktop.packagekit.trigger-offline-update is not registered
août 07 15:41:46 fredo-arch-laptop gnome-session[353]: Gjs-Message: JS LOG: GNOME Shell started at Thu Aug 07 2014 15:41:46 GMT+0200 (CEST)
août 07 15:41:46 fredo-arch-laptop dbus[234]: [system] Activating via systemd: service name='org.freedesktop.GeoClue2' unit='geoclue.service'
août 07 15:41:46 fredo-arch-laptop systemd[1]: Starting Location Lookup Service...
août 07 15:41:46 fredo-arch-laptop dbus[234]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
août 07 15:41:46 fredo-arch-laptop systemd[1]: Started Location Lookup Service.
août 07 15:41:46 fredo-arch-laptop gnome-session[353]: intel_do_flush_locked failed: Argument invalide
août 07 15:41:46 fredo-arch-laptop gnome-session[353]: WARNING: App 'gnome-shell.desktop' respawning too quickly
août 07 15:41:46 fredo-arch-laptop polkitd[260]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.31, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale fr_FR.UTF-8) (disconnected from bus)
août 07 15:41:46 fredo-arch-laptop gnome-session[353]: gnome-session[353]: WARNING: App 'gnome-shell.desktop' respawning too quickly
août 07 15:41:46 fredo-arch-laptop gnome-session[353]: Unrecoverable failure in required component gnome-shell.desktop
août 07 15:41:47 fredo-arch-laptop gnome-session[353]: (gnome-settings-daemon:375): GLib-GIO-CRITICAL **: g_dbus_proxy_call_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed
août 07 15:42:04 fredo-arch-laptop gdm-Xorg-:0[253]: (II) AIGLX: Suspending AIGLX clients for VT switch
It started with the linux 3.15.x. Could not run opengl applications after resume from suspend.
Since 3.16, I even can not run opengl right after boot.
if I put the laptop to sleep and resume it, I get
intel_do_flush_locked failed: Invalid argument
when running opengl apps, mpv, flash player keep crashing too.
I have to reboot to keep going.
Running kernel 3.15.8 x86_64 Here.
It happens even after system restart i.e. without suspend/resume
I am using KDE - kwin crashes with intel_do_flush_locked failed: invalid argument.
Since kwin crashes, effectively I can not use desktop at all because:
You can not see window title - window buttons (close-minimize)
You can not use alt-tab to switch between multiple windows
etc.
Currently I fixed this by disabling Desktop effects and OpenGL.
My lscpi :
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller])
Subsystem: Toshiba America Info Systems Device ff67
Flags: bus master, fast devsel, latency 0, IRQ 46
Memory at d0000000 (64-bit, non-prefetchable) [size=4M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 5110 [size=8]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: i915
Kernel modules: i915
Same problem happens here on a Lenovo X200, lspci follows.
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device 20e4
Flags: bus master, fast devsel, latency 0, IRQ 48
Memory at f2000000 (64-bit, non-prefetchable) [size=4M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 1800 [size=8]
Expansion ROM at <unassigned> [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 3
Kernel driver in use: i915
Kernel modules: i915
Trilby also posted a potential solution (switching to uxa): https://bbs.archlinux.org/viewtopic.php?pid=1446267#p1446267
I haven't tried this yet but it might be worth a try.
Will try uxa trick... With a little luck :)
Thanks for the forum thread.
Your "trick" is working. Looks like sna is far from betting ready for prime time.
x86_64-system here, lenovo t400
OpenGL is broken, Xv is also broken.
I get this in my dmesg:
[ 12.993393] [drm:i915_gem_init] *ERROR* Failed to initialize GPU, declaring it wedged
glxgears and other OpenGL apps return this: intel_do_flush_locked failed: Invalid argument
Arch Linux (x86_64)
I have x86_64.
Thanks.
I have x86_64.
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 23
Model name: Intel(R) Celeron(R) CPU 743 @ 1.30GHz
Stepping: 10
CPU MHz: 1296.740
BogoMIPS: 2594.54
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
NUMA node0 CPU(s): 0
Certainly seems like this bug is specific to the x4500 IGPs.
after that openGL-apps will run very slow instead of crashing.
I have a IGP of the x4500 family, too.
https://bugzilla.kernel.org/show_bug.cgi?id=82481
The upstream report is for a similar/the same bug occurring immediately on boot, which does seem to occur only in 3.16. It doesn't mention failure after suspend.
https://bugs.freedesktop.org/show_bug.cgi?id=76554
Have you guys tried it?
https://bugzilla.kernel.org/show_bug.cgi?id=82481
https://bugs.freedesktop.org/show_bug.cgi?id=76554#c104
I have done a few suspendToRam/resume cycles.
As mentioned by Jiri Kosina in https://bugs.freedesktop.org/show_bug.cgi?id=76554#c84, the error can still appear, but not that often.
So we will see, what the next resumes will bring :-)
Upstream report: https://bugs.freedesktop.org/show_bug.cgi?id=76554
Upstream patch: https://bugs.freedesktop.org/attachment.cgi?id=104224
1. https://bbs.archlinux.org/viewtopic.php?id=185650
2. https://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git/tree/queue-3.16
3. https://bugs.freedesktop.org/show_bug.cgi?id=76554#c103
Additional info:
* package version(s) 3.16.1-1
* the error is reported in dmesg:
[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 (valid? 1) head 00000298 tail 00000000 start 001d8000 [expected 001d8000]
[drm:i915_gem_init] *ERROR* Failed to initialize GPU, declaring it wedged
Steps to reproduce:
1. Run the affected hardware and boot the machine.
I can confirm the issue on my X200T with an Intel X4500 and a x86_64 system. Switching to UXA mode does not help. The crash on start of xinitrc and resume from suspend remains:
[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 (valid? 1) head 00000298 tail 00000000 start 001d8000 [expected 001d8000]
[drm:i915_gem_init] *ERROR* Failed to initialize GPU, declaring it wedged
[drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 (valid? 1) head 0000c020 tail 00000000 start 00042000 [expected 00042000]
[drm:i915_gem_init] *ERROR* Failed to initialize GPU, declaring it wedged
Kernel boot continues after a long pause, and console works fine. However when running Xorg and starting certain graphics applications, the program immediately crashes. One such application is firefox with flash (viewing streaming video's etc).
This has been solved by switching from SNA mode to UXA mode using Xorg config file below. Streaming videos now working fine. Kernel boot error message obviously still persists though.
More info at -> https://wiki.archlinux.org/index.php/Intel_graphics#SNA_issues
----/etc/X11/xorg.conf.d/20-intel.conf--------
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
#Option "AccelMethod" "sna"
Option "AccelMethod" "uxa"
#Option "AccelMethod" "glamor"
EndSection
----End of file----
Running on x200 Intel X4500(GMA45).
I am also running an X200. Mind sharing your PKGBUILD that you used to recompile the kernel?
Thanks ahead!
https://www.bloodycloud.net/public.php?service=files&t=c0e89912c0b070fa73518df1703d8e5c
Thank you a lot! I successfully recompiled the kernel and the error is resolved!
The last error log:
[ 8733.710] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[ 8733.710] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[ 8733.710] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300
[ 8733.710] (++) using VT number 1
[ 8733.710] (--) controlling tty is VT number 1, auto-enabling KeepTty
[ 8733.710] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[ 8733.711] (EE) No devices detected.
[ 8733.711] (EE)
Fatal server error:
[ 8733.711] (EE) no screens found(EE)
[ 8733.711] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 8733.711] (EE) Please also check the log file at "/home/orschiro/.local/share/xorg/Xorg.0.log" for additional information.
[ 8733.711] (EE)
Looks like this is queued for 3.16.4.