当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : X启动时候在哪一步确定屏幕分辨率?
帖子发表于 : 2016-05-18 22:31 
头像

注册: 2007-04-14 11:17
帖子: 1063
送出感谢: 0 次
接收感谢: 3
Ubuntu14.04在lightdm服务启动前是无法使用xrandr获取屏幕相关信息的,但是lightd在启动X的时候输出信息如下面149~152行部分:
当然lightdm设置了用户自动登陆
代码:
128 [    13.419] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.910-0ubuntu1.6 (Timo Aaltonen <tjaalton@debian.org>)
129 [    13.432] (WW) Falling back to old probe method for modesetting
130 [    13.432] (WW) Falling back to old probe method for fbdev
131 [    13.432] (II) Loading sub module "fbdevhw"
132 [    13.432] (II) LoadModule: "fbdevhw"
133 [    13.432] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
134 [    13.436] (II) Module fbdevhw: vendor="X.Org Foundation"
135 [    13.436]    compiled for 1.15.1, module version = 0.0.2
136 [    13.436]    ABI class: X.Org Video Driver, version 15.0
137 [    13.436] (WW) Falling back to old probe method for vesa
138 [    13.436] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics
139 [    13.436] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2
140 [    13.437] (II) intel(0): Creating default Display subsection in Screen section
141     "Default Screen Section" for depth/fbbpp 24/32
142 [    13.437] (==) intel(0): Depth 24, (--) framebuffer bpp 32
143 [    13.437] (==) intel(0): RGB weight 888
144 [    13.437] (==) intel(0): Default visual is TrueColor
145 [    13.440] (**) intel(0): Framebuffer tiled
146 [    13.440] (**) intel(0): Pixmaps tiled
147 [    13.440] (**) intel(0): "Tear free" disabled
148 [    13.440] (**) intel(0): Forcing per-crtc-pixmaps? no
149 [    13.440] (II) intel(0): Output VGA1 has no monitor section
150 [    13.440] (II) intel(0): Output HDMI1 has no monitor section
151 [    13.440] (II) intel(0): Output DP1 has no monitor section
152 [    13.440] (II) intel(0): Output VIRTUAL1 has no monitor section
153 [    13.440] (==) intel(0): DPI set to (96, 96)
154 [    13.440] (II) Loading sub module "dri2"
155 [    13.440] (II) LoadModule: "dri2"
156 [    13.440] (II) Module "dri2" already built-in
157 [    13.440] (II) UnloadModule: "modesetting"
158 [    13.440] (II) Unloading modesetting
159 [    13.440] (II) UnloadModule: "fbdev"
160 [    13.440] (II) Unloading fbdev
161 [    13.440] (II) UnloadSubModule: "fbdevhw"
162 [    13.440] (II) Unloading fbdevhw
163 [    13.440] (II) UnloadModule: "vesa"
164 [    13.440] (II) Unloading vesa
165 [    13.440] (==) Depth 24 pixmap format is 32 bpp
166 [    13.453] (II) intel(0): SNA initialized with Baytrail (gen7) backend
167 [    13.453] (==) intel(0): Backing store enabled
168 [    13.453] (==) intel(0): Silken mouse enabled
169 [    13.453] (II) intel(0): HW Cursor enabled
170 [    13.453] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
171 [    13.453] (==) intel(0): DPMS enabled
172 [    13.453] (II) intel(0): [DRI2] Setup complete
173 [    13.453] (II) intel(0): [DRI2]   DRI driver: i965
174 [    13.453] (II) intel(0): [DRI2]   VDPAU driver: i965
175 [    13.453] (II) intel(0): direct rendering: DRI2 Enabled
176 [    13.453] (==) intel(0): hotplug detection: "enabled"
177 [    13.453] (--) RandR disabled
178 [    13.462] (II) SELinux: Disabled on system
179 [    13.587] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer

这里只有一个HDMI接口,通过无源HDMI转VGA转换器接了一个1366x768的15吋显示器。

X启动后在后台运行,但是在vt7上并没有任何输出信息,屏幕为无信号的状态,
按ctrl+alt+F1可以切到tty1,登陆执行sudo service lightdm restart 后自定义桌面能够在vt7上显示出来,这时候Xorg.0.log的输出
代码:
[   348.521] (**) intel(0): "Tear free" disabled
[   348.521] (**) intel(0): Forcing per-crtc-pixmaps? no
[   348.521] (II) intel(0): Output VGA1 has no monitor section
[   348.521] (II) intel(0): Output HDMI1 has no monitor section
[   348.521] (II) intel(0): Output DP1 has no monitor section
[   348.521] (II) intel(0): Output VIRTUAL1 has no monitor section
[   348.521] (--) intel(0): Output HDMI1 using initial mode 1280x720 on pipe 0
[   348.521] (==) intel(0): DPI set to (96, 96)

手动执行重启lightdm后Xorg.0.log输出了设置HDMI1为1280x720!

我记得以前最小化安装X及桌面后直接startx能在vt7上启动图形的,还是说vt7上的输出必须要用gnome/kde等桌面来设置?
后来我在openbox的自启动脚本里加上了下面几句也解决了:
代码:
xrandr --newmode "1024x768" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync #设置一个新的显示mode
xrandr --addmode HDMI1 1024x768 # 添加新的显示mode到 HDMI1
xrandr --output HDMI1 --mode 1024x768 #设置HDMI1显示


其中1024x768的显示mode可以通过 cvt 1024 768 命令获得信息

so,现在我的问题是X启动的时候在那个阶段确定输出显示器的信息(VGA?HDMI?DVI?以及显示器的分辨率等),还是说那个地方可以设置?


_________________
MSI GE60 2OE-455XCN
Intel Core i7-4810MQ
NVIDIA GeForce GTX 765M / 2G GDDR5
2x8GB DDRIII(L) 1600MHz
PLEXTOR 256G MSATA (PX-256M6M)
SATA 750G 7200RPM
SATA 1T 7200RPM
15.6" FHD 1920×1080


页首
 用户资料  
 
2 楼 
 文章标题 : Re: X启动时候在哪一步确定屏幕分辨率?
帖子发表于 : 2016-05-20 0:52 
头像

注册: 2008-04-26 12:41
帖子: 11000
送出感谢: 11
接收感谢: 38
:em09


_________________
[新手必读]wubi安装常见问题(FAQ)
[分享]装双系统的同学必看——Windows与Linux系统共享交换分区的方法
kde下唯美的暗黑内透主题(无需编译)
无穷老机上的Trinity Desktop Environment


页首
 用户资料  
 
3 楼 
 文章标题 : Re: X启动时候在哪一步确定屏幕分辨率?
帖子发表于 : 2016-05-20 7:21 

注册: 2009-08-04 16:33
帖子: 16893
送出感谢: 21
接收感谢: 1827
引用:
X启动的时候在那个阶段确定输出显示器的信息(VGA?HDMI?DVI?以及显示器的分辨率等),还是说那个地方可以设置?

https://lists.freedesktop.org/archives/ ... 00919.html
lightdm
這一篇建議兩個選項
1. unity-greeter uses unity-settings-daemon to set the resolution
2. display-setup-script in lightdm.conf
看看 能否幫上忙


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译