jchnkl / x-choyce

A light-weight, Exposé-like window switcher for X (feat. OpenGL)
BSD 3-Clause "New" or "Revised" License
37 stars 8 forks source link

x:choyce won't run on my netbook with intel graphics #2

Closed FedeDP closed 10 years ago

FedeDP commented 10 years ago

Hi! Taken from aur: glxinfo: http://pastie.org/8542166 . Ram : 140mb/2gb. Only thunar and a xfce4-terminal (to test) opened. Xfwm has compositing enabled, don't know about which backend it is using (how can I know that?) lspci -v -s: http://pastie.org/8542175

Fails with: "X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 53 (X_CreatePixmap) Serial number of failed request: 312 Current serial number in output stream: 313" Arch64 with testing repo enabled, xfwm4.11 on a "Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller (rev 02)"

On my other laptop (always archlinux64) with an ati hd5650, opengl3.0, it works indeed in a openbox session, while in the default gnome-session it won't (but probably because gnome uses SUPER to trigger its events). Then i tried again on my netbook, running openbox instead of xfwm, without compositing, and it returned me again that BadAlloc problem. May be it is opengl 2.1 related, as you said.

Thanks for your time ;)

jchnkl commented 10 years ago

Hi, thanks for opening the issue.

The OpenGL API underwent a huge change between 2.1 and 3.0. I'm not sure if I can figure this out, given my lack of experience with OpenGL. I didn't stick to a specific API and just took what I needed. From your lspci output it looks like you're stuck with 2.1.

About xfwm. As long as it does not use glx for compositing it's ok. For testing you could disable compositing altogether (I don't know xfce in depth, but I think there's an option somewhere in the preferences menu).

For the gnome-session you could try to use a different modifier key (e.g. mod1 through mod5, or control). There's a section in the readme about configuring these things.

I've created two branches where I removed features which could cause the problem. If could give them a try, that would be nice. :)

https://github.com/jrk-/x-choyce/tree/issue_2_1 https://github.com/jrk-/x-choyce/tree/issue_2_2

[Edit] One more idea: Check out Mesa's environment variables for debugging. Particularly interesting is LIBGL_ALWAYS_SOFTWARE=1 to disable hardware acceleration (works for me, without shaders though). Please also set MESA_XSYNC! GLX is based on Xlib, and without synchronization it can produce totally unrelated errors (ever searched for a segfault in a total different location because of this? I did.. :/)

FedeDP commented 10 years ago

I tried disabling compositing in xfwm, and it returns again the same error. Uhm sorry for the stupid/newbie question, but i never used git before... how can I clone a specific branch? Btw tried also to export LIBGL_ALWAYS_SOFTWARE=1, but again same error as before.

EDIT: tried with debug=verbose and here is output: "LIBGL_DEBUG=verbose x:choyce libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so libGL: Can't open configuration file /home/federico/.drirc: No such file or directory. libGL: Can't open configuration file /home/federico/.drirc: No such file or directory. libGL: Can't open configuration file /home/federico/.drirc: No such file or directory. libGL: Can't open configuration file /home/federico/.drirc: No such file or directory. X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 53 (X_CreatePixmap) Serial number of failed request: 302 Current serial number in output stream: 303 "

jchnkl commented 10 years ago

You can checkout a branch with git checkout -t issue_2_1 (make sure to pull first: git pull). Then go to the src directory, run make clean; make and try it out. When testing different version please always run make clean beforehand.

FedeDP commented 10 years ago

Is "git clone -b issue_2_1 git://github.com/jrk-/x-choyce.git" the same as above? By the way, sorry for the delay. I tried with MESA_XSYNC=1 and same error as before. Tried again building from the two new branches, but again error. I tried also to change acceleration method of my intel graphic card, from sna (default) to uxa...always same error. I guess it can really be opengl 2.1 related, at this point.

jchnkl commented 10 years ago

Yep, does the same.

Don't worry about the delay, as long as you come back at all. ;)

I've replaced glXCreateNewContext with glXCreateContextAttribs. Main benefit is, that I can specify the major and minor GL version for the context I'm creating. So I tried it out with 2.1 and bad news for you, it didn't work. I've played a bit with the flags and other versions (this is a GL 3.0 machine, damn, I'm lucky..) but no luck.

So for the moment I've just fixed the version to a minimum of 3.0. Maybe I should place a remark about this in the README.

Anyway, thanks for your testing! If you don't object, then I'll close with "Won't fix". If you feel like rewriting this for GL 2.1, then go ahead, I'm happy to see pull requests. ;)

FedeDP commented 10 years ago

Close it :) I'm sure i'm not able to fix this, sadly... Thanks for your time! ;)

jchnkl commented 10 years ago

You're welcome. I'm really sorry that I cannot help you here, but that would go over my head as well. At least you can use it on your other computer if you want to. :) If you are still looking for a window switcher, I can recommend you this. It's text only and really lightweight. That was actually my inspiration for this, too.