免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3345 | 回复: 3

[3D桌面]我的beryl历程 [复制链接]

论坛徽章:
0
发表于 2007-05-26 13:53 |显示全部楼层
00.我的系统信息:
OS:6.2-RELEASE-p5
WM:Fluxbox 1.0 Release Candidate 3
显卡是主板(C51G)集成的,在BIOS里分配64MB内存作为显存.
GeForce 6100 0x0242

01.升级xorg至7.2
更新ports tree

  1. #portsnap fetch
  2. #portsnap update
复制代码

升级xorg

  1. #pkg_delete -f xorg-\* libdrm-\* dri-\* libGL-\* libGLU-\* libglut-\* libXft-\* nvidia-driver-\*
  2. #setenv PACKAGESITE 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/'
  3. #pkg_add -r xorg
复制代码


02.安装Nvidia驱动

  1. #cd /usr/ports/x11/nvidia-driver/ && make install clean
复制代码

NOTE: should be recompiled for a particular FreeBSD kernel

  1. #pkg_info | grep nvidia
  2. nvidia-driver-1.0.9746_5 NVidia graphics card binary drivers for hardware OpenGL ren
复制代码


03.安装beryl

  1. #cd /usr/ports/x11-wm/beryl/ && make install clean
复制代码

中间可能会出错,我遇到的是
在编译glitz-0.5.6时出错:

  1. ===>  Building for glitz-0.5.6
  2. ......
  3. /usr/bin/ld: cannot find -lX11
  4. *** Error code 1
  5. Stop in /usr/ports/graphics/glitz/work/glitz-0.5.6/src/glx.
  6. *** Error code 1
  7. Stop in /usr/ports/graphics/glitz/work/glitz-0.5.6/src.
  8. *** Error code 1
  9. Stop in /usr/ports/graphics/glitz/work/glitz-0.5.6.
  10. *** Error code 1
  11. Stop in /usr/ports/graphics/glitz/work/glitz-0.5.6.
  12. *** Error code 1
  13. Stop in /usr/ports/graphics/glitz.
复制代码

使用 phg_add -r glitz 来安装glitz-0.5.6_1解决问题.
出现错误基本都是因为升级xorg所带来的,这也就是

  1. /usr/ports/UPDATING
  2. # portupgrade -aP
  3. The final step is to merge remaining files from /usr/X11R6 into
  4.   /usr/local (/usr/X11R6 is no longer used with xorg 7.2) and replace
  5.   /usr/X11R6 with a symlink.
  6. When the merge operation completes successfully, the /usr/X11R6
  7.   directory hierarchy will be removed and replaced by a symlink to
  8.   /usr/local.  This symlink is necessary because some binary ports (and
  9.   some remaining source ports) have hard-coded references to /usr/X11R6.
复制代码

里建议升级完要更新所有的包的原因.(我闲麻烦没有照做)

  1. #pkg_info | grep beryl
  2. beryl-0.2.1         Beryl Composite/Window Manager meta-port
  3. beryl-core-0.2.1_1  Beryl Composite/Window Manager
  4. beryl-manager-0.2.1_1 Manager for Beryl Composite/Window Manager
  5. beryl-plugins-0.2.1_1 Plugins for Beryl Composite/Window Manager
  6. beryl-settings-0.2.1 Beryl Settings Manager
  7. beryl-settings-bindings-0.2.1 Beryl Settings Bindings
复制代码


04.配置xorg.conf,启动beryl
我的/etc/X11/xorg.conf 的部分信息:

  1. Section "Module"
  2.         Load "freetype"
  3.         # Load "xtt"
  4.         Load  "extmod"
  5.         Load  "glx"
  6.         # Load  "dri"
  7.         Load  "dbe"
  8.         Load  "record"
  9.         Load  "xtrap"
  10.         Load  "type1"
  11.         Load  "speedo"
  12. EndSection

  13. Section "Device"
  14.         Identifier  "Card0"
  15.         Driver      "nvidia"
  16. EndSection

  17. Section "Screen"
  18. #
  19. Option "AllowGLXWithComposite" "True"
  20. Option "AddARGBGLXVisuals" "True"
  21. Option "DisableGLXRootClipping" "True"
  22. #
  23. EndSection

  24. Section "Extensions"
  25.        Option "Composite" "Enable"
  26. EndSection
复制代码


启动beryl
编辑 ~/.xinitrc  

  1. #start beryl  
  2. beryl --force-nvidia --use-cow &
  3. emerald --replace &
  4. exec xterm
  5. #end
复制代码

然后 startx,OK!

beryl的输出信息:

  1. **************************************************************
  2. * Beryl system compatiblity check                            *
  3. **************************************************************

  4. Detected xserver                                : NVIDIA

  5. Checking Display :0.0 ...

  6. Checking for XComposite extension               : passed (v0.3)
  7. Checking for XDamage extension                  : passed
  8. Checking for RandR extension                    : passed
  9. Checking for XSync extension                    : passed

  10. Checking Screen 0 ...

  11. Checking for GLX_SGIX_fbconfig                  : passed
  12. Checking for GLX_EXT_texture_from_pixmap        : passed
  13. Checking for non power of two texture support   : passed
  14. Checking maximum texture size                   : passed (4096x4096)

  15. Relaunching beryl with __GL_YIELD="NOTHING"
  16. **************************************************************
  17. * Beryl system compatiblity check                            *
  18. **************************************************************

  19. Detected xserver                                : NVIDIA

  20. Checking Display :0.0 ...

  21. Checking for XComposite extension               : passed (v0.3)
  22. Checking for XDamage extension                  : passed
  23. Checking for RandR extension                    : passed
  24. Checking for XSync extension                    : passed

  25. Checking Screen 0 ...

  26. Checking for GLX_SGIX_fbconfig                  : passed
  27. Checking for GLX_EXT_texture_from_pixmap        : passed
  28. Checking for non power of two texture support   : passed
  29. Checking maximum texture size                   : passed (4096x4096)
复制代码

论坛徽章:
0
发表于 2007-05-26 13:57 |显示全部楼层
参考文章:
FreeBSD & Beryl +Nvidia
http://www.freebsdforums.org/forums/showthread.php?t=47986

Nvidia驱动程序同时支持直接和间接GLX渲染加速,无需什么额外的XGL/AIGLX支持。

  1. Neither Xgl or AIGLX are required to use compiz with the NVIDIA drivers now that they natively support GLX_EXT_texture_from_pixmap.

  2. Xgl is an X server that renders using OpenGL and runs on top of another X server. It was the first X server available to support GLX_EXT_texture_from_pixmap.

  3. AIGLX stands for Accelerated Indirect GLX. It is not related to compiz or GLX_EXT_texture_from_pixmap at all, except that support for GLX_EXT_texture_from_pixmap in the open source DRI OpenGL drivers required it. NVIDIA has always supported Accelerated Indirect GLX rendering.

  4. NVIDIA supports both Direct AND Indirect rendering with the GLX_EXT_texture_from_pixmap extension. Users should not need to install any additional software to run compiz with new NVIDIA drivers. Please see the just-created sticky thread covering the basic setup steps.

  5. James Jones
  6. NVIDIA Corporation
复制代码

论坛徽章:
0
发表于 2007-05-26 14:24 |显示全部楼层
一些 beryl 快捷键:
注:super键影射为 windows键,以下简称 Win

程序切换:
Alt + Tab:在当前工作台中切换窗口
Ctrl + Alt + Tab:在所有工作台中切换窗口
Win +Tab :环行排列窗口
F8 :平铺窗口

移动窗口:
Alt + 鼠标左键并拖曳:移动窗口
Ctrl + Shift + 鼠标左键:迅速移动窗口(会粘住边框)

立方体旋转:
Ctrl + Alt + 左/右方向键:立体地切换桌面
Ctrl + Shift + Alt + 左/右方向键:把活动窗口移到左/右工作台
Ctrl + Alt + 鼠标左键并拖曳:手动旋转立方体
Ctrl + Alt + 单击鼠标中键,然后移动鼠标旋转

缩放:
Win + 鼠标右键:缩放一次
Win + 鼠标滚轮 上/下:手动缩放大/小

反色效果:
Win + m:屏幕反色
Win + n:当前窗口反色

亮度和饱和度, 透明度:
Ctrl + 鼠标滚轮 上/下:增加/减少 饱和度(对桌面也有效)
Shfit + 鼠标滚轮 上/下:增加/减少 亮度(对桌面也有效)
Alt + 鼠标滚轮 上/下:增加/减少 透明度

窗口对齐:
Win + 小键盘1...9:在屏幕中快速对齐一个窗口(1=左下,2=中下,3=右下......)

论坛徽章:
0
发表于 2007-05-26 18:20 |显示全部楼层
我是ATI用户,苦啊。,就不指望什么3d了,只要能完整支持2D就行了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP