This forum has been archived. All content is frozen. Please use KDE Discuss instead.

INTEL :: kwin & OpenGL :: i915_program_error: Exceeded max..

Tags: None
(comma "," separated)
User avatar
octavsly
Registered Member
Posts
7
Karma
0
OS

This post is for "INTEL BASED VIDEO CARDS"

1. kwin stopped using OpenGL
2. Present Windows - All desktops / Taskbar Thumbnail apparent X freeze



kwin used to make use of OpenGL but during the last month it suddenly stopped. Last week I had some time to look into the problem. Below are my findings and solutions. Hopefully I will save somebody's time with this post.

1.
In order to detect why kwin did not activate the OpenGL I have run in a xterm:
Code: Select all
kwin --replace

and the following message appeared:
KWin has detected that your OpenGL library is unsafe to use, falling back to XRender.


I have fixed this by having the following settings in ~/.kde4/share/config/kwinrc
Code: Select all
[Compositing]
CheckIsSafe=true
DisableChecks=true
OpenGLIsUnsafe=false



2. After solving the problem with the OpenGL, I have encountered another one: X would appear to freeze when "Present Windows - All desktops" or "Taskbar Thumbnail" effects were active.

The following message appeared in xterm after few minutes of waiting... :z
i915_program_error: Exceeded max instructions

and then something with the shader.

More at https://bugs.freedesktop.org/show_bug.cgi?id=25292

To fix this I have put the following in ~/.drirc file
Code: Select all
<driconf>
    <device screen="0" driver="i915">
        <application name="Default">
            <option name="force_s3tc_enable" value="false" />
            <option name="no_rast" value="false" />
            <option name="always_flush_cache" value="false" />
            <option name="early_z" value="false" />
            <option name="stub_occlusion_query" value="false" />
            <option name="always_flush_batch" value="false" />
            <option name="bo_reuse" value="1" />
            <option name="texture_tiling" value="true" />
            <option name="vblank_mode" value="3" />
            <option name="allow_large_textures" value="2" />
            <option name="fragment_shader" value="true" />
        </application>
        <application name="Default" executable="kwin">
            <option name="force_s3tc_enable" value="false" />
            <option name="no_rast" value="false" />
            <option name="vblank_mode" value="3" />
            <option name="always_flush_cache" value="false" />
            <option name="stub_occlusion_query" value="false" />
            <option name="always_flush_batch" value="false" />
            <option name="bo_reuse" value="1" />
            <option name="texture_tiling" value="true" />
            <option name="early_z" value="false" />
            <option name="allow_large_textures" value="2" />
            <option name="fragment_shader" value="false" />
        </application>
    </device>
</driconf>


Mind fragment_shader "false" for kwin executable.

The .drirc file was genereated by driconf and setting "No" for "Enable limited ARB_gfragment_shader support on 915/945."

Software used:
* libdrm 2.4.22
* kernel 2.6.35 or 2.6.37-rc3
* intel driver 2.13.0
* xorg 1.9.2.901 or 1.9.2
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
Stickied, this is useful.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
speculatrix
Registered Member
Posts
12
Karma
0
thanks for this posting. I am using a GM45 chipset which exhibits the kwin freeze problem. I have looked in .xession-errors and /var/log/Xorg.0.log to see if the drirc setting is applied but I can't see any evidence of the fix taking place.

Are there any other dri config files I could put this in?

Of course, time will tell, as I haven't had the fix in place long enough to see if the freeze/temporary-lockup problem has gone away.

Paul
User avatar
octavsly
Registered Member
Posts
7
Karma
0
OS
speculatrix wrote:Are there any other dri config files I could put this in?

I have no idea.
speculatrix
Registered Member
Posts
12
Karma
0
unfortunately creating a .drirc file in my home directory didn't help... or if it did, not enough to prevent all freezes.
User avatar
octavsly
Registered Member
Posts
7
Karma
0
OS
speculatrix wrote:unfortunately creating a .drirc file in my home directory didn't help... or if it did, not enough to prevent all freezes.


I presume nothing is left in the Xorg.0.log file nor in the /var/log/messages

Try a kwin --replace in a console, and maybe something appears in that window.

Try also disabling the blur. Which versions of kerenel/libdrm/X/mesa/intel driver are you using?
speculatrix
Registered Member
Posts
12
Karma
0
snips from from xorg.log

Code: Select all
[   214.027] Current Operating System: Linux mycomputer 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64

[   214.029]    X.Org Server Extension : 4.0
[   214.031] (--) PCI:*(0:0:2:0) 8086:2a42:1028:0277 rev 7, Mem @ 0xf6c00000/4194304, 0xe0000000/268435456, I/O @ 0x0000ef98/8
[   214.031] (--) PCI: (0:0:2:1) 8086:2a43:1028:0277 rev 7, Mem @ 0xf6b00000/1048576

[   214.054] (II) LoadModule: "intel"
[   214.055] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[   214.055] (II) Module intel: vendor="X.Org Foundation"
[   214.055]    compiled for 1.9.3, module version = 2.14.0
[   214.055]    Module class: X.Org Video Driver
[   214.055]    ABI class: X.Org Video Driver, version 8.0

[   214.058] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
        i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G,
        E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
        965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
        4 Series, G45/G43, Q45/Q43, G41, B43, B43, Clarkdale, Arrandale,
        Sandybridge, Sandybridge, Sandybridge, Sandybridge, Sandybridge,
        Sandybridge, Sandybridge


so I think it's 2.14.0?

OTOH, maybe I'm in 2.9.1-8.1??
Code: Select all
# rpm -qa  |grep intel
xorg-x11-driver-video-intel-legacy-2.9.1-8.1.x86_64
User avatar
octavsly
Registered Member
Posts
7
Karma
0
OS
I think you are on intel 2.14 driver which should be OK.

What libdrm version do you have? and mesa?

Even if you answer the questions I don't know if I will be able to help. Try first to find a tangible error message.
speculatrix
Registered Member
Posts
12
Karma
0
A colleague running debian squeeze gave me a copy of his intel_drv.so, and that cause xorg to fail to run in dual-screen mode; very strange as I didn't get a working desktop, but that's another story.

I will try and find an error code.

Thanks very much for your time.

Paul
speculatrix
Registered Member
Posts
12
Karma
0
libdrm is libdrm-2.4.23-9.1.x86_64
mesa is DirectFB-Mesa-1.4.5-14.2.x86_64 & Mesa-7.10-3.3.x86_64

I found more version strings and configurations in the .xession-errors file

Code: Select all
OpenGL vendor string:                   Tungsten Graphics, Inc
OpenGL renderer string:                 Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT
OpenGL version string:                  2.1 Mesa 7.10
OpenGL shading language version string: 1.20
Driver:                                 Intel
GPU class:                              i965
OpenGL version:                         2.1
GLSL version:                           1.20
Mesa version:                           7.10
X server version:                       1.9.3
Linux kernel version:                   2.6.37
Direct rendering:                       yes
Requires strict binding:                yes
GLSL shaders:                           yes
Limited GLSL support:                   no
Texture NPOT support:                   yes
Limited NPOT support:                   no
bunjacn
Registered Member
Posts
5
Karma
0
OS
Greetings... i am new on the forum :)

I have Intel GMA945 video card and I turned on KWin window manager instead of Compiz. Every time I boot up the system (Arch) it freezes on the desktop. I did some of the things shown here, and it is more worse now, it doesn't come to the desktop at all. I don't know how to change window decorator within Ctrl-Alt-F1. Thanks in advance. :)
User avatar
google01103
Manager
Posts
6668
Karma
25
from Ctrl-Alt-F1 type with no quotes type "mv ~/.kde/share/config/kwinrc ~/.kde/share/config/kwinrc-old"
this will move all the kwin settings (iirc) and they should be reset to the defaults at startup


OpenSuse Leap 42.1 x64, Plasma 5.x

bunjacn
Registered Member
Posts
5
Karma
0
OS
Thanks, now I got working system. :)

One more thing I want to ask, can I set transparency for taskbar and K-menu? I don't know if even i can get them working because of the card...
User avatar
google01103
Manager
Posts
6668
Karma
25
transparency for taskbar and K-menu is determined by the desktop theme chosen not as a separate option. Try changing composting type to xrender from OpenGL


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS
Terrific, works for me :).

Update, this is my kwin's graphics card information:

Code: Select all
OpenGL vendor string:                   Tungsten Graphics, Inc
OpenGL renderer string:                 Mesa DRI Intel(R) G33 GEM 20100330 DEVELOPMENT
OpenGL version string:                  1.4 Mesa 7.10
Driver:                                 Intel
GPU class:                              i915/i945
OpenGL version:                         1.4
Mesa version:                           7.10
X server version:                       1.9.3
Linux kernel version:                   2.6.37
Direct rendering:                       yes
Requires strict binding:                yes
GLSL shaders:                           no
Texture NPOT support:                   yes

Last edited by Ignacio Serantes on Sat Mar 26, 2011 11:22 pm, edited 1 time in total.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], rockscient, Yahoo [Bot]