Pages

Search This Blog

Loading...

Thursday, August 15, 2013

kwin and catalyst drivers

Today I have upgraded my notebook to 4.11.0. Almost everything worked out of the box, the only exception was kwin's compositing support.

Just for clarify I use the catalyst drivers (AKA fglrx, AKA ATI/AMD's proprietary graphical drivers) because only catalyst can control my notebook's fan. I have tried the opensource driver but my notebook's bios does not provide the gpu profiles required to make the dynamic clock support in the opensource driver to work, so I am stuck with catalyst.

For some reason kwin does not detect that my notebook's setup is direct rendering capable. After some research I have found out that setting those two environment variables make kwin work with direct rendering:

export KWIN_DIRECT_GL=1

export KWIN_COMPOSE=O2

To make changes permanent you can write the lines above to a file script like /etc/profile.d/env.sh. That works for bash, if you use another shell then you need to figure out how to set environment variables for it. Then you can logout and login and kwin should work. If you do not want to logout you can just run those two lines above and then the command below:

kwin --replace &

KWIN_COMPOSE=O2 means to use OpenGL2 according to kwin's wiki page and by the message above kwin was trying to use OpenGL1. Well, for anybody with the same problem that is a workaround for it :-)

@Ivan Čukić, yeah, I read that too. Unfortunately I do not think that will help me. Current radeon power handling requires some profiles that we can see when running dmesg command. My notebook's card shows just one profile (performance). For the dynamic clock implementation in the kernel to work the kernel should detect at least another profile with the correct clocks for the gpu's processor and memory. By what I have found notebook manufecturers sometimes implement those things differently from what the opensource driver expects and then issues like no powermanagement happens. It would be a big surprise to me if kernel 3.11 solves the issue with my notebook's gpu.

I'm pretty sure the new 3.11 kernel PM code stops using the old BIOS power profiles and instead provides PM code much more close to what the fglrx driver does. It's certainly worth a try, at least - although note that it does require new firmware and a custom kernel parameter to enable the new PM code (DPM=1?) so make sure you've got it enabled correctly if you try it out. Or else just wait a few more months and it should become a more out of the box experience.

Yep, new PM code uses special pm-controller found in R600 and later chips intead of bio tables.It's awesome, 'tho i exprienced random system freezes (esp. when display dpms off kicks in).To enable this new pm you need 3.11 kernel and radeon.dpm=1 param at boot.

How can I make those settings permanent? When I put those in to konsole it works as long as I don´t close konsole. I´ve found the same solution here: http://forum.kde.org/viewtopic.php?f=111&t=109973

but putting an executable "desktop_effects" file into ~/.kde/env/ doesn´t do it for me. After a restart it´s still the same. What part am I getting wrong? Thanks for the blogpost. It´s a little reassuring knowing I am not alone.

@ Stan aka Xeno:Thanks, I tried that (.bahsrc). When I restarted it worked fine. Then I opened Konsole and it seems like it repeated the exported env variables, the screen flickered. Then I closed Konsole and again desktop effects gone, window decoration gone.

Thank you for this Blog post. This seems to be the solution for me and I even set up a /etc/profile.d/env.sh script. However the rendering (?) is now super slow. http://pastebin.com/D5eUNUB6

I note too that I have OpenGL 3.0 listed as well as 1.2 & 2.0. All of them have the same effect with slow compositing (rendering?). ie Wobbly Windows and other effects are no longer smooth like they used to be.

I also noticed drawing performance are not ad good as before and there are also some graphical artifacts. However, that is not may area of expertise, you should contact kwin developers about those problems.