envi 4.3在ubuntu edgy下启动错误的解决

Posted on 十二月 7th, 2006 in Linux | 1 Comment »

在我的笔记本上安装了ENVI 4.3后一直无法执行,但IDL没有问题。经检查,应该是I915的驱动所导致的问题,不过可以在XGL环境下执行,非常奇怪。

不过现在终于找到了解决办法:

LIBGL_ALWAYS_INDIRECT=1 /usr/local/bin/envi

最终是在ITT的forum上找到了答案

Hi there. We came across Tech Tip "OpenGL Direct Hardware Rendering on Linux. Article ID: 3524" that showed a workaround.
Disabling (OpenGL) direct rendering made the trick (at the expense of speed):
debian10$ export LIBGL_ALWAYS_INDIRECT=1
I still wonder why other software work fine.

Cheers,
Juan P.

同时,他还给出了一种解释:

Hi there,

After talking to Xorg/DRI/Debian developers, it seems that direct rendering is working ok on my system but a conflict exists between system libGL and IDL's own copy of Mesa.
They suggest that the system libGL and IDL's own copy of Mesa shouldn't be used at the same time, or that IDL should at least make sure their symbols don't interfere with each other. They suggested a possible workaround (to start the program with LD_PRELAD=/usr/local/rsi/idl_6.3/bin/bin.linux.x86/libMesaGL6_2.so.1 or some variation thereof), which unfortunately didn't work for me.

Cheers,
J.P. Rigol

不过这种hack方法在我的机器也不能工作。
这个地方给出了更多的说明:

Troubleshooting
RSI cannot control driver quality, so you may have trouble with some drivers that might be buggy. Besides obtaining a driver update from the vendor, there are several things you can do to make IDL usable again in the presence of a buggy driver:

* Read the documentation that came along with your driver software carefully. There may be a number of diagnostic tools or environment variables that you can set to provide some relief.
* When using an X server based on XFree86, modifying the XFree86 configuration file may solve any problems. Consult the XFree86 documentation for details. Also, the XFree86 server startup log, usually found in /var/log, can provide many clues about the problem.
* Set the LIBGL_ALWAYS_INDIRECT environment variable. This causes OpenGL to ignore IDL's request to use direct rendering and would then avoid any bugs that may exist in the direct path.
* Configure your IDL session to use software rendering when required or code your IDL application to use software rendering. These details are covered in IDL documentation.
* As a last resort, remove/rename the gl_driver shared library from your IDL installation (in the binary directory). This will keep IDL from attempting to use direct or indirect hardware rendering. IDL will instead perform all rendering itself and send the results to the X server with "2D" commands.
* One expert IDL programmer reported in March 2004 on the IDL Newsgroup this promising workaround on a host running Fedora Linux:
"If you're a user of a recent Linux (like Fedora), and you've experienced IDL crashes that post the following fatal error:

Floating exception

when attempting to use any of IDL's OpenGL 3D stuff (like the Demo->Itools, for example), you might try the following:
setenv MESA_NO_ASM 1

This disables some specific ASM code in the Mesa library which was causing these types of crashes for me. I use an ATI Radeon 7500 plus XFree86 4.3.0's Radeon drivers. With this environment variable set, IDL's 3D hardware rendering seems stable, and definitely executes much faster than the alternative software rendering option."

现在就能解释为何在XGL环境下可以使用ENVI了:现在的XGL环境不支持OPENGL直接调用!

在XGL环境下使用google earth

Posted on 十二月 7th, 2006 in Linux | No Comments »

ubuntu edgy, i915gm
我记得原来不能在xgl环境下使用google earth,随着google earth 4的几次升级,现在可以在xgl环境下使用google earth了,不过还是有问题,速度比正常情况下要慢!
beryl-project.org的FAQ上发现了这个问题的解决办法:

DISPLAY=:0 ./googleearth

My favourite hardware-accelerated application (google earth for example) doesn't play well with Beryl. What can I do?

Try adding DISPLAY=:0 in front of the command:

$ DISPLAY=:0 googleearth

还是有一点小问题,不过总算不影响使用了。(menubar会丢失)

XGL:非常酷

Posted on 八月 30th, 2006 in Linux | 4 Comments »

安装好显卡驱动后,现在就来体验一下酷酷的XGL:
首先添加源:

deb http://www.beerorkid.com/compiz edgy main-edgy
deb http://media.blutkind.org/xgl/ edgy main-edgy
deb http://ubuntu.compiz.net/ edgy main-edgy

获取签名:

wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -
wget http://media.blutkind.org/xgl/quinn.key.asc -O - | sudo apt-key add -
wget http://ubuntu.compiz.net/quinn.key.asc -O - | sudo apt-key add -

更新源,安装XGL

sudo aptitude update
sudo aptitude install xserver-xgl compiz-gnome cgwd cgwd-themes cgwd-themes-extra gnome-compiz-manager

创建/usr/bin/startxgl:

sudo nano /usr/bin/startxgl

ATI显卡

#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
exec gnome-session

NVIDA显卡

#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:fbo -accel glx:pbuffer &
DISPLAY=:1
exec gnome-session

修改权限,创建会话文件

sudo chmod +x /usr/bin/startxgl
sudo nano /usr/share/xsessions/xgl.desktop

会话文件:

[Desktop Entry]
Encoding=UTF-8
Name=Xgl
Comment=Start an Xgl Session
Exec=/usr/bin/startxgl
Icon=
Type=Application

注销,选择XGL会话。
登录进来后运行,这一步好像以后可以忽略。

cgwd --replace && compiz --replace gconf

然后其他的设置都可以通过工具栏上的小立方体来进行操作。

参考:
1 http://xgl.compiz.info/
2 http://www.ubuntuforums.org/showthread.php?t=232662&highlight=xgl