mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Graphics glitches with compiz 0.8

Open pwanchope opened this issue 8 years ago • 12 comments
trafficstars

Raspberry Pi B with 512MB running raspbian fully up to date. The only custom packages are compiz-reloaded that I built myself. X, mesa and kernel are from the raspbian repo (sorry I haven't got any numbers, but I'm not on the Pi at the moment).

Compiz works and is sort of usable. The cube works well, as does the scale plugin, switcher and things like that. What doesn't work so well is moving windows (you can sort of see the window being drawn down the screen). It works, it's just not as smooth as with compton glx.

The biggest problem is that sometimes windows do not update or are rendered black. This is most noticeable on menus. I've seen this on compton too, but the problem seems worse with compiz.

Sometimes compiz closes for seemingly no reason, or I get kicked out of X, or the machine freezes. Again, sorry about the lack of logs.

I'd be interested to hear from anyone with a raspberry pi 2 or 3 about their own experiences with compiz. On a faster machine I'd hope it would be improved.

I suggested back in the summer to the compiz-reloaded guys that they could target machines like the raspberry pi. The original c implementation is the fastest glx compositor that I know of. I thought the plugins would appeal to the young users of the Pi and creating new plugins is not unachievable for a newish coder.

I can compile the latest mesa, X and kernel if it helps. I can also share the compiz packages if people would like them to try.

pwanchope avatar Jan 06 '17 19:01 pwanchope

I've since had a quick go with compiz 0.9 using GLES. The internet had led me to believe that this wouldn't work. In fact it works better than compiz 0.8 using open gl.

Window moving is better. Animations such as wobbly and the switchers are smoother if somehow slowed down. The black rendering is hugely reduced.

I can't believe nobody has posted a YouTube video with compiz/pi!

pwanchope avatar Jan 10 '17 10:01 pwanchope

Compiz 0.9 compiled with open gl (GLES turned off) works even better. The black rendering of menus is completely gone.

Still being thrown out of X or locking up fairly regularly though......

pwanchope avatar Jan 14 '17 09:01 pwanchope

Yeah, it's not uncommon for GLES renderers to be broken compared to GL renderers for Linux applications.

I'm guessing that for the lockups / X exiting, you've got complaints in dmesg about memory allocations failing?

anholt avatar Feb 02 '17 23:02 anholt

I have seen memory allocation messages before, but testing 0.8 today I had the desktop lock up twice without them.

I'm hoping to get a rpi 3 to do further testing, the pi1 is too painful to use. My aim is to find out why 0.9 is working better than 0.8. My guess is http://bazaar.launchpad.net/~compiz-team/compiz/0.9.13/revision/3320 .

Compiz 0.8 packages can be found at https://launchpad.net/~adamsmith/+archive/ubuntu/compiz-reloaded if anybody wants to test too.

pwanchope avatar Feb 03 '17 18:02 pwanchope

Booting with cma=128M@128M (no idea what this really means)

Compiz 0.8 exited unexpectedly (fallback to other window manager). dmesg output:

[ 733.274087] vc4-drm soc:gpu: failed to allocate buffer with size 1056768 [ 733.663145] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.664885] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.665138] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.665306] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.665586] [drm:vc4_bo_create [vc4]] ERROR Failed to allocate from CMA: [ 733.665879] [drm] num bos allocated: 189 [ 733.665898] [drm] size bos allocated: 123252kb [ 733.665912] [drm] num bos used: 187 [ 733.665923] [drm] size bos used: 103796kb [ 733.665935] [drm] num bos cached: 2 [ 733.665945] [drm] size bos cached: 19456kb [ 733.680469] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.682602] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.682906] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.683082] vc4-drm soc:gpu: failed to allocate buffer with size 9961472 [ 733.683361] [drm:vc4_bo_create [vc4]] ERROR Failed to allocate from CMA: [ 733.683500] [drm] num bos allocated: 186 [ 733.683520] [drm] size bos allocated: 119636kb [ 733.683534] [drm] num bos used: 184 [ 733.683546] [drm] size bos used: 100180kb [ 733.683559] [drm] num bos cached: 2 [ 733.683570] [drm] size bos cached: 19456kb [ 733.684669] vc4-drm soc:gpu: failed to allocate buffer with size 2490368 [ 733.684936] vc4-drm soc:gpu: failed to allocate buffer with size 2490368 [ 733.685160] vc4-drm soc:gpu: failed to allocate buffer with size 2490368 [ 733.685323] vc4-drm soc:gpu: failed to allocate buffer with size 2490368 [ 733.685602] [drm:vc4_bo_create [vc4]] ERROR Failed to allocate from CMA: [ 733.685896] [drm] num bos allocated: 186 [ 733.685914] [drm] size bos allocated: 105044kb [ 733.685926] [drm] num bos used: 184 [ 733.685938] [drm] size bos used: 100180kb [ 733.685952] [drm] num bos cached: 2 [ 733.686007] [drm] size bos cached: 4864kb [ 734.389751] vc4-drm soc:gpu: failed to allocate buffer with size 1056768

pwanchope avatar Feb 05 '17 21:02 pwanchope

I've just tried compiz 0.8 in raspbian stretch. Wow! What an improvement! Window moving and all round speed is much improved. It's running really well on a pi 3.

I've posted some debs here https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=192010

There is still the occasional black rectangle, but things are definitely better.

adamjsmith avatar Aug 29 '17 17:08 adamjsmith

[ 733.685602] [drm:vc4_bo_create [vc4]] ERROR Failed to allocate from CMA:
[ 733.685896] [drm] num bos allocated: 186
[ 733.685914] [drm] size bos allocated: 105044kb
[ 733.685926] [drm] num bos used: 184
[ 733.685938] [drm] size bos used: 100180kb
[ 733.685952] [drm] num bos cached: 2
[ 733.686007] [drm] size bos cached: 4864kb

OK, this is weird. We should have purged the cache before deciding that we'd failed. I guess someone could potentially race to free something in that time. This seems worth looking into.

anholt avatar Nov 09 '17 19:11 anholt

@adamjsmith

I'm having opposite effect of your experience on a pi3 with latest OS updates & your compiz binaries.

CPU usage of compiz is anywhere between 50% to. 75% for any window related activities with all effects except window decoration turned off.

Are you still using compiz as composite manager or is there any better alternative for a smooth experience on a raspbian?

P.S I'm using a FHD+ monitor, it could be a variable.

indiandragon avatar Oct 14 '18 06:10 indiandragon

@indiandragon sounds to me like the vc4 driver is not being used. Have you got the necessary bits in config.txt? Or maybe the system is still trying to use xserver-xorg-video-fbturbo (check the Xorg.0.log or the presence of a file such as /usr/share/X11/xorg.conf.d/99-fbturbo.conf)? Compiz 0.8 should still work well with fkms. I don't use raspbian, its got pretty ancient software now. Compton is a basic (with or without OpenGL) composite manager you can try. The xfce window manager works without OpenGL. At the moment I'm using kwin with my pi3. Works even in Wayland.

pwanchope avatar Oct 14 '18 08:10 pwanchope

@pwanchope Thanks for being very detailed. Unfortunately with kms enabled; compiz behaves the same & with fkms my monitor doesn't get output (probably has to do with HMDI config).

I'm eager to try out your setup some day, what is your base distribution; is it arch with KDE?

indiandragon avatar Oct 22 '18 08:10 indiandragon

compiz 0.8 definitely works better at lower resolutions. At high resolutions window movement is not smooth although cpu usage is very low for me. Whereas compiz 0.9 and kwin are fine at 1080p. They all have the occasional black rectangle (0.8 by far the worst), mostly still seen on application menus.

I use Ubuntu. kwin is from the KDE neon repo, but the version I'm using should now be in 18.10. Pretty easy to install and try. KDE generally works well on the pi. It has a slow startup which can be frustrating. There is something about the system-settings app that crashes with vc4 (freezes the whole system). Dolphin is slow to load compared to other file managers, but once loaded is fine to use.

Lubuntu 18.10 with LXQT and kwin as the window manager should be a good fit for the pi, but I haven't tried it yet.

pwanchope avatar Oct 23 '18 08:10 pwanchope

@pwanchope As you mentioned, resolution could be the issue at my end. The 2560x1080 monitor had issues even on intel hd 630 with MATE(macro), arch until I replaced it with compiz 0.9 & it has been silky smooth.

Though obviously I don't expect such performance on pi, all I'm looking for was decent window management experience. I will explore further options at leisure & update if anything interesting turns out.

Thanks again for your suggestions.

indiandragon avatar Oct 23 '18 11:10 indiandragon