OpenGL and Kwin crash

Hi,

There is something making my KDE crash. Every time I try to re-enable OpenGL and change any configuration on compositor (see image below) or any desktop effect or animation, it resets (after closing system settings or rebooting. I have even tried to snapper my machine to a time point before the problem appears but it still remains).

This is my production machine, and using Virtual desktops is paramount for me. Unfortunately, because of this problem every time I reboot the machine my virtual desktops disappear :frowning:
Not to mention windows effects that are a deal breaker like darkening inactive windows…

So, it seems that all features/effects that are implied by the compositor OpenGL are not functioning or reset to a non functioning state after every reboot (because of the compositor bug).

I appreciate all help

http://imgur.com/a/UeNVo

Well, there seems to be a problem with OpenGL.
Please install the package Mesa-demo-x and run:

glxinfo | grep render

Does this happen on a fresh user account too?

This is my production machine, and using Virtual desktops is paramount for me. Unfortunately, because of this problem every time I reboot the machine my virtual desktops disappear :frowning:

OpenGL compositing is by no means necessary for virtual desktops.

If they “disappear”, I suppose it’s likely that kwin’s config file (~/.config/kwinrc) gets corrupted or reset.
Maybe it helps if you edit it manually?
Something like: (modify the existing lines appropriately)

[Desktops]
Number=4
Rows=2

Best to do that while not inside a Plasma session though, so choose e.g. IceWM on the login screen.

Not to mention windows effects that are a deal breaker like darkening inactive windows…

Not all windows effects require OpenGL either, some do though.

Thanks :slight_smile:

direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_packed_depth_stencil, 
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_NV_blend_square, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 

Yes, the configurations in ~/.config/kwinrc are set as they was previously, with all virtual desktop’s names etc.

[Compositing]
AnimationSpeed=3
Backend=OpenGL
Enabled=true
GLColorCorrection=false
GLCore=false
GLPlatformInterface=glx
GLPreferBufferSwap=a
GLTextureFilter=2
HiddenPreviews=5
OpenGLIsUnsafe=false
WindowsBlockCompositing=true
XRenderSmoothScale=false

[Desktops]
Name_1=Stuff
Name_2=File managing
Name_3=Paper Production
Name_4=Learning and Reading
Name_5=Personal Accounts
Name_6=System administration
Name_7=General Research
Name_8=Sheets and Charts
Name_9=Bibliography
Number=9
Rows=2

[Effect-Cube]
BorderActivate=9
BorderActivateCylinder=9
BorderActivateSphere=9

[Effect-CubeSlide]
DontSlidePanels=false
RotationDuration=300

[Effect-DesktopGrid]
BorderActivate=9

[Effect-Magnifier]
InitialZoom=1

[Effect-PresentWindows]
BorderActivate=9
BorderActivateAll=9
BorderActivateClass=9

[Effect-Zoom]
InitialZoom=1

[ElectricBorders]
Bottom=None
BottomLeft=None
BottomRight=ShowDesktop
Left=None
Right=None
Top=None
TopLeft=None
TopRight=None

[MouseBindings]
CommandActiveTitlebar1=Raise
CommandActiveTitlebar2=Start window tab drag
CommandActiveTitlebar3=Operations menu
CommandAll1=Move
CommandAll2=Toggle raise and lower
CommandAll3=Resize
CommandAllKey=Alt
CommandAllWheel=Nothing
CommandInactiveTitlebar1=Activate and raise
CommandInactiveTitlebar2=Start window tab drag
CommandInactiveTitlebar3=Operations menu
CommandTitlebarWheel=Switch to Window Tab to the Left/Right
CommandWindow1=Activate, raise and pass click
CommandWindow2=Activate and pass click
CommandWindow3=Activate and pass click
CommandWindowWheel=Scroll

[Plugins]
cubeEnabled=true
cubeslideEnabled=true
desktopchangeosdEnabled=true
enforcedecoEnabled=true
flipswitchEnabled=true
glideEnabled=true
kwin4_effect_eyeonscreenEnabled=true
kwin4_effect_fadedesktopEnabled=false
kwin4_effect_scaleinEnabled=true
lookingglassEnabled=true
magiclampEnabled=true
minimizeallEnabled=true
minimizeanimationEnabled=false
resizeEnabled=true
sheetEnabled=true
slideEnabled=false
slidebackEnabled=true
synchronizeskipswitcherEnabled=false
videowallEnabled=false
wobblywindowsEnabled=true
zoomEnabled=false

[Script-desktopchangeosd]
PopupHideDelay=250
TextOnly=false

[SubSession: b3388795-2e84-44c8-b4dd-542863b42e98]
active=-1
count=0

[TabBox]
BorderActivate=9
BorderAlternativeActivate=9
DesktopLayout=org.kde.breeze.desktop
DesktopListLayout=org.kde.breeze.desktop
LayoutName=org.kde.breeze.desktop

[Windows]
ActiveMouseScreen=true
AutoRaise=false
AutoRaiseInterval=750
AutogroupInForeground=true
AutogroupSimilarWindows=false
BorderSnapZone=10
CenterSnapZone=0
ClickRaise=true
DelayFocusInterval=300
ElectricBorderCooldown=350
ElectricBorderCornerRatio=0.25
ElectricBorderDelay=150
ElectricBorderMaximize=true
ElectricBorderTiling=true
ElectricBorders=1
FocusPolicy=ClickToFocus
FocusStealingPreventionLevel=1
GeometryTip=true
HideUtilityWindowsForInactive=true
InactiveTabsSkipTaskbar=false
MaximizeButtonLeftClickCommand=Maximize
MaximizeButtonMiddleClickCommand=Maximize (vertical only)
MaximizeButtonRightClickCommand=Maximize (horizontal only)
NextFocusPrefersMouse=true
Placement=Smart
RollOverDesktops=true
SeparateScreenFocus=false
ShadeHover=false
ShadeHoverInterval=250
SnapOnlyWhenOverlapping=false
TitlebarDoubleClickCommand=Maximize
WindowSnapZone=10

[org.kde.kdecoration2]
BorderSize=Normal
ButtonsOnLeft=MS
ButtonsOnRight=HIAX
CloseOnDoubleClickOnMenu=false
library=org.kde.breeze


And I did some modifications (get rid of a virtual desktop for example) and it did no effect. It seems that kwin is not reading it at all.

Did it get corrupted then?
How do I restore it?

So, in the case ~/.config/kwinrc got corrupted how do I manually set it to work with XRender in order to test for example if it is a problem with OpenGL?
Would just


...
[Compositing]
AnimationSpeed=3
Backend=XRender
Enabled=true
GLColorCorrection=false
GLCore=false
GLPlatformInterface=glx
GLPreferBufferSwap=a
GLTextureFilter=2
HiddenPreviews=5
OpenGLIsUnsafe=false
WindowsBlockCompositing=true
XRenderSmoothScale=false
...

work?

[QUOTE=ghostharley;2830399]

direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 

Ok, OpenGL seems to work in general.
But the intel driver is known to be buggy and cause problems, on some systems at least. (there hasn’t been a stable release since years)

It may help to disable SNA and switch to the older UXA acceleration:
https://en.opensuse.org/SDB:Switch_xf86-video-intel_to_UXA

Or try to use the “modesetting” driver instead, e.g. by uninstalling xf86-video-intel. (will still use 2D and 3D hardware acceleration, and is even reported to have better performance for some users)

Yes, the configurations in ~/.config/kwinrc are set as they was previously, with all virtual desktop’s names etc.

Ok, that kwinrc looks fine and should give you your virtual desktops.

But just for clarification: if kwin crashes, you won’t be able to switch virtual desktops either.
But if it crashes, there won’t be any window decorations, so you won’t be able to move/resize windows.
Is this the case?

You can restart it via “kwin_x11 --replace” (as user).
Does that help?
(but if it really crashes in the first place, it may just as well crash again)

So, in the case ~/.config/kwinrc got corrupted how do I manually set it to work with XRender in order to test for example if it is a problem with OpenGL?
Would just


[Compositing]
AnimationSpeed=3
Backend=XRender
Enabled=true
GLColorCorrection=false
GLCore=false
GLPlatformInterface=glx
GLPreferBufferSwap=a
GLTextureFilter=2
HiddenPreviews=5
OpenGLIsUnsafe=false
WindowsBlockCompositing=true
XRenderSmoothScale=false

work?

Yes, that would switch from OpenGL to XRender.
Or set Enabled=false to disable compositing completely (but that would really disable all desktop effects).

[quote="“wolfi323,post:4,topic:126675”]

I did test it uninstalling xf86-video-intel. But didn’t work.
My laptop has a dedicated Radeon GPU also besides i5’s internal GPU. Should I uninstall xf86-video-ati too?

I see. So in that respect kwin is probably working, since windows are working perfectly (move/resize/tile/title bar…)

Manually changing kwinrc didn’t do any effect. I’m afraid any change I do in kwinrc won’t do any effect :confused:
And any change I do through Plasma’s system setting doesn’t do any effect on kwinrc too.

In the case problem is with kwinrc or with whichever KDE’s process reading it, how would I restore them?

Meaning there was no change?

My laptop has a dedicated Radeon GPU also besides i5’s internal GPU. Should I uninstall xf86-video-ati too?

According to the glxinfo output, you are using the intel GPU, so uninstalling xf86-video-ati won’t change anything.

/var/log/Xorg.0.log should tell for sure though.

Manually changing kwinrc didn’t do any effect. I’m afraid any change I do in kwinrc won’t do any effect :confused:
And any change I do through Plasma’s system setting doesn’t do any effect on kwinrc too.

That’s strange.
Do you have write permissions to kwinrc?
Are you actually using systemsettings5, not KDE4’s systemsettings?
Have you tried running “kwin_x11 --replace”?

You are using Plasma5 as desktop, right? Not e.g. KDE4?

In the case problem is with kwinrc or with whichever KDE’s process reading it, how would I restore them?

You could try to delete it, that would reset the settings to the defaults.

I just have noticed that kwinrc has not a file type associated to it.

The file kwinrulesrc (in the same folder) is associated to “plain text document” (as most config files in the system).
Could it have something to do?

Yes. I’m using KDE5. And changing it in superuser mode.

The system was working perfect. After a reboot was that the problem started appearing.

Should I delete kwinrc in icqWM too?

PS: just to be sure that you actually run kwin5 and not kwin(4) for some reason (which stores its settings in ~/.kde4/share/config/), please post the output of:

ps ux|grep kwin

No.

Why?
You likely changed root’s kwinrc then. That would of course explain why the changes have no effect.

kwinrc is a user config file. Edit it as user, the same user that has the problem.

Should I delete kwinrc in icqWM too?

Only if modifying it doesn’t help.

Maybe better to just try to create a fresh user account first, and login as that.


felipe+  2679  2.5  1.6 3205496 96852 ?       Sl   14:30   0:02 kwin_x11
felipe+  3336  0.0  0.0  10544  1616 pts/1    S+   14:32   0:00 grep --color=auto kwin

Solved it!

\o/

Thank you very much! :slight_smile:
The problem was with permissions. The User’s kwinrc was not having enough permission to read and write.
Probably this is the reason why plasma was not able to read and write on it. So that I think KDE was working after each reboot like the file kwinrc was not there (and using a default like I have deleted it).