xwindows 在非fb,用pci方式访问显卡

news/2024/7/8 5:27:37 标签: buffer, linux, 图形, 服务器

 http://www.linuxforum.net/forum/showflat.php?Cat=&Board=linuxK&Number=610779
http://www.linuxforum.net/forum/showflat.php?Cat=&Board=kylix&Number=618721

If neither the driver for your card nor the VESA driver work you can still use
the frame buffer device by typing
"linux vga=mode"
mode being one of the following:
0x0301 : 640 x 480, 8 bit
0x0310 : 640 x 480, 15 bit
0x0311 : 640 x 480, 16 bit
0x0312 : 640 x 480, 24 bit
0x0303 : 800 x 600, 8 bit
0x0313 : 800 x 600, 15 bit
0x0314 : 800 x 600, 16 bit
0x0315 : 800 x 600, 24 bit
0x0305 : 1024 x 768, 8 bit
0x0316 : 1024 x 768, 15 bit
0x0317 : 1024 x 768, 16 bit
0x0318 : 1024 x 768, 24 bit
15 and 16 bit modes work best with the frame buffer device.
Whenever you choose a valid frame buffer device mode all other ICE-VIDEO,
ICE-RESOLUTION and ICE-COLORDEPTH parameters given on the command line will
be ignored.
An example: type
"linux vga=0x0317"
to load the frame buffer device driver and use a resolution of 1024 x 768 in
16 bit colors.
By using the frame buffer device you also get a graphical console at bootup.
If you want the graphical console but don't want to use the unaccelerated
frame buffer device driver later, start the installation using the frame buffer
device and choose another driver in the XFree86 configuration later.
When combined with other parameters "vga=mode" must be the last one, f. ex.
"linux ICE-SLOWDOWN vga=0x0317".

 

自kernel 2.2以来,Linux就具备了在控制台下显示图像的能力,这都归功于frame buffer。所谓的frame buffer,是计算机图形显示硬件(例如显卡)的一个抽象,它提供了一套通用的指令集,使得应用程序能够直接访问计算机的图形显示硬件。一般而言,frame buffer可以在以下几方面强化控制台的能力:

  • 控制台具有更高的图形分辨率;
  • 控制台具有更大的色深,能够显示更多的颜色;
  • 通过使用frame buffer,某些程序可避免使用X服务器,例如mplayer,如果设定视频输出设备为frame buffer,即-vo fbdev,就可以在控制台下播放视频。

如何在控制台下使用frame buffer ?

如果你使用的是较新的内核,很有可能你已经开启了内核的frame buffer选项,你可以使用以下指令查看:

grep -i config_fb /boot/config-$(uname -r)

如果发现CONFIG_FB=y,那么frame buffer选项已经开启,否则的话,你的内核还未支持frame buffer,你需要重新编译内核(此处暂略)。

在确定了frame buffer已开启之后,就可以在Grub等启动器中加入frame buffer特有的选项。修改/boot/grub/menu.1st文件,加入类似于下文的文字:

title foo         root (hd0,0) 
        kernel /vmlinuz ro root=/dev/hda2 vga=0x317

注意上文中的vga=0x317就是加入的frame buffer特有的选项,vga=0x317表示设置控制台的分辨率为1024x768,色深为16位,具体可参考下表:

buffer option table" alt="frame buffer option table" src="http://static.flickr.com/89/245319986_b62f1f44b9_o.jpg" />

http://www.niftyadmin.cn/n/841300.html

相关文章

python学完不会用_如何学习Python的基础知我感觉我学Python的基础知识学了不会运用,就是学完一节课写代码就抓瞎?...

首先,Python的应用领域是非常广泛的,你将Python基础学会之后,大概就了解了Python的过程式编程,函数式编程与面向对象式编程的区别。现在很多人对基础的深度也是很浅显的。写完基础之后连什么是面向对象都不知道。我现在告诉你Pyth…

BZOJ 4563 错排+高精度

思路&#xff1a; 把障碍移到对角线 就发现 这是个错位排列问题 用错排公式即可解 s[i](s[i-1]s[i-2])*i //By SiriusRen #include <cstdio> #include <cstring> #include <algorithm> using namespace std; struct Bignum{int a[1024],num;void init(){mems…

powerbi集成python缺点_Power BI中配置Python运行环境,及相关错误问题解决

Power BI Desktop中支持python&#xff0c;在Power BI的数据获取、数据转换、数据可视化、数据输出的全流程中&#xff0c;都可以支持使用Python。关于如何全流程使用Python&#xff0c;可以参见文章https://blog.csdn.net/scut_yfli/article/details/104881688本文先介绍如何在…

Spark Mllib里如何建立密集向量和稀疏向量(图文详解)

不多说&#xff0c;直接上干货&#xff01; 具体&#xff0c;见 Spark Mllib机器学习实战的第4章 Mllib基本数据类型和Mllib数理统计

DecimalFormat用法

DecimalFormat 是 NumberFormat 的一个具体子类&#xff0c;用于格式化十进制数字。DecimalFormat 包含一个模式 和一组符号 符号含义&#xff1a; 0 一个数字 # 一个数字&#xff0c;不包括 0 . 小数的分隔符的占位符 , 分组分隔符的占位符 ; 分隔格式。 - 缺省负数前缀…

python盒中取球_python内置方法

内置函数 ord chrdir()当前解释器所有变量all 列表都为真返回真&#xff0c;有个0返回假&#xff0c;可迭代对象为空返回真any 一个真返回真&#xff0c;可迭代对象为空返回假asciibin 十进制转二进制bool 布尔值oct 十进制转八进制hex 十进制转十六进制bytearray ss.encode(ut…

“使用驱动器中J:的光盘之前需要将其格式化

不知道神马原因致使U盘无法打开——大家千万注意&#xff1a;以后遇见这种情况千万别格式化&#xff08;当然如果你的U盘或者硬盘里没有重要东西那就另当别论&#xff09;&#xff0c;进入“开始-cmd”&#xff0c;因为我的U盘在电脑上读出来是J盘&#xff0c;所以在cmd打开命令…

黄聪:wordpress如何获取访问的网站的cookie值

$head wp_get_http_headers( $word_url ); $cookie $head[set-cookie]; $cookie substr( $cookie, 0 , strpos( $cookie, ";" ) ); 转载于:https://www.cnblogs.com/huangcong/p/7469015.html