Xgl-nvidia

安装 XGL 和一些 Gnome 和 Nvidia 的小技巧

Nvidia 用户你们好。如果你是一个 ATI 用户,那么请使用下列向导:

http://www.ubuntuforums.org/showthread.php?p=739758

AMD64 用户看这个:

http://www.ubuntuforums.org/showthread.php?t=131659

一些注意事项:

你必须编译最新的 glitz 的 CVS 版本来使它能在 Nvidia cards that lack Pixel Shaders (aka anything older than a 5200 FX) 下正常工作。Hopefully this will be updated in the repository soon.

THIS BREAKS XINERAMA AND TWINVIEW so dual head use is more annoying.

Proceed at you own risk. This is new experimental stuff and I hope you are a little command line savy (or can call someone that is) because if something messes up you might be stuck on the command line.此过程中的风险由你自己承担。这是一种新的方法并且我希望你有一些命令行的基础,因为如果有配置搞糟了,你可能会被困在命令行界面的。

不要说我没有警告你。

Also I assume you have installed the newest Nvidia driver from the repos. To get it, this command:

sudo apt-get install nvidia-kernel-common nvidia-glx

现在我们来编辑 xorg.conf 。首要的事情是使用命令打开它:

sudo gedit /etc/X11/xorg.conf

找到 “Module” 部分。标注 “Glcore” 和 “dri “ 部分,并确认 “glx” 部分还在。基本上如同下面显示的:

# Load "GLcore"
# Load "dri"
Load "glx"

现在找到“Devices” 快。

更改所有的行,除了标有 “Identifier” 的那一行,就像我这样:

Section "Device"
Identifier- leave this line alone!
Driver          "nvidia"
BusID           "PCI:1:0:0"
Option          "RenderAccel"           "true"
EndSection

如果以后 compiz 不能在你那里工作 (and complains about composite extension):

添加这个到每个结尾:

Section "Extensions"
Option  "Composite" "Enable"
EndSection

不要添加到别的地方

非常重要:

确认你默认的颜色深度是 24 !

现在保存并关闭文件。

现在到了第二个部分了 - 安装 XGL。

我确定下面的命令会这样做。我是在一个很干净的系统上安装的:

sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome

这是很简单的。下一步是使它在 Gnome 启动的时候也启动。I get this from the ATI guide with modification. 非常感谢 JoWilly !

首先是命令:

sudo gedit /etc/gdm/gdm.conf-custom

确认它 是这样的。删除文件里所有其它的并和我帖的保持一致:

# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration.   If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration.  Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# To hand-edit this file, simply add or modify the key=value combination in
# the appropriate section in the template below.  Refer to the comments in the
# gdm.conf file for information about each option.  Also refer to the reference
# documentation.
#
# If you hand edit a GDM configuration file, you should run the following
# command to get the GDM daemon to notice the change.  Any running GDM GUI
# programs will also be notified to update with the new configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
#
# For example, the "Enable" key in the "[debug]" section would be specified by
# "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings.  You can also restart GDM by sending
# a HUP or USR1 signal to the daemon.  HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category.  You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!
[daemon]
[security]
[xdmcp]
[gui]
[greeter]
[chooser]
[debug]
[servers]# Override display 1 to use Xgl (DISPLAY 1 IMPORTANT FOR ATI FGLRX).
0=Xgl
[server-Xgl]
name=Xgl server
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo
flexible=true

That has a special line that I found works best for Nvidia cards- this might solve acceleration issues some people have!

Time for the last step: make compiz work! This part will work for ATI users as well.

Two ways to do that. Either go by what this post says (thanks g14) or use my small script:

这个:

http://www.ubuntuforums.org/showpost.php?p=760273&postcount=507

或者

首先是命令:

sudo gedit /usr/bin/thefuture

应当会出现一个空白的文件。使用下列文字来填充它:

#!/bin/bash gnome-window-decorator & compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher &

保存这个文件。现在使用命令:

sudo chmod 755 /usr/bin/thefuture

阅读本文的剩余部分然后重启。在登录到 GDM 之后,打开一个终端输入这个(感谢 rjtd ):

xmodmap /usr/share/xmodmap/xmodmap.<language>

替换你的国家语言代码。对于美国英语,我使用这个命令:

xmodmap /usr/share/xmodmap/xmodmap.us

现在把命令放到终端里来运行 compiz :

thefuture

这就应当使 compiz 开始工作了。如果没有,就一直使用这个命令(也许要20次)直到它工作为止。如果你出现了问题,把它贴出来,以便获得帮助。

试验一下。这里有一个基本的键命令:

CTRL + ALT + 左箭头/右箭头。 Switches to the new side of the cube for me.

CTRL + ALT + SHIFT + Left/Right arrow key- Takes the in focused app around cube.

CTRL + ALT + Left Click on Desktop - allows you to use the mouse to rotate cube.

F12 - uses the Expose like trick

Alt- Tab - Vista 模式的切换

Now is to solve some general issues. One is the fact that the wobble seems off to many people with Nvidia cards. There is an easy fix thanks to roberTO:

Run the command:

gconf-editor

现在到

apps>compiz>general>screen0>option

然后关闭 "detect_refresh_rate" 选项。

然后设定 "refresh_rate" 为 60

It will work like a charm. Here is a neat trick if you want to take screenshots from npodges.

到 gconf-editor 里找到:

apps>compiz>general>screen0>options

把 “command0” 改成 "gnome-screenshot"

然后把 “run_command0” 改成 "Print"

Now the PrintScr button will take screenshots. More helpful advice on the different gconf-editor options can be found on this page:

http://gentoo-wiki.com/HOWTO_XGL

我希望你 enjoy 这个向导。

为了取消

这个命令:

sudo rm /etc/gdm/gdm.conf-custom

http://www.ubuntuforums.org/showthread.php?t=131267


文章来源:官方WIKI
翻译人员:WeiTao

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
EGL、GLX、Xegl、XGL和XGLX都与OpenGL和X Window System(X11)之间的图形渲染和窗口管理有关。这些是不同的API和扩展,用于在图形应用程序和硬件之间进行通信和协调。 1. EGL(Embedded-System Graphics Library)是一个用于嵌入式系统的图形库,它提供了一个标准的接口,使应用程序能够与底层图形驱动程序进行交互。EGL可以用于管理窗口系统和设备上下文,以及在OpenGL ES等图形API之间进行切换。 2. GLX(OpenGL Extension to the X Window System)是一个在X11窗口系统上使用OpenGL的扩展。它允许应用程序使用OpenGL渲染图形,并将结果显示在X窗口中。GLX提供了与X Server的交互,以及创建和管理OpenGL上下文的功能。 3. Xegl是一种将EGL与X Window System集成的方法。它允许应用程序使用EGL进行图形渲染,并在X窗口中显示结果。这种集成可以提供更好的性能和更高的灵活性。 4. XGL是一个用于在X Window System上使用OpenGL的实现。它是一种通过将OpenGL命令转换为X协议来实现的技术,在服务器端执行OpenGL渲染。 5. XGLX(X11 Graphics Library Extension)是用于在X Window System上使用OpenGL的另一种扩展。它提供了X Server和OpenGL之间传递图形的功能,用于加速OpenGL渲染。 这些API和扩展提供了在X Window System上使用OpenGL进行图形渲染不同方法。开发人员可以根据特定的需求选择合适的API或扩展来实现他们的图形应用程序。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值