ubuntu16.04启动怪事

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
lqfie
帖子: 18
注册时间: 2017-08-01 18:31
系统: win10

ubuntu16.04启动怪事

#1

帖子 lqfie » 2017-11-01 17:48

小弟 新手入坑 机器配置如下
CPU:Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
mem:32G
disk:2T
GPU:GeForce GTX 1050 Ti
issue:Ubuntu 16.04.3 LTS 桌面版本
kernel-release:4.10.0-38-generic

此机器安装teamviewer,开启ssh服务等 关闭屏幕和锁定屏幕都已经设置关闭

问题

此机器需要连接显示器才能正常重启显示桌面版的登录界面,否则不接显示器使用teamviewer连接一直显示/dev/mapper/ubuntu--vg-root:clean 21354/12500992 files, 1338960/49999872 blocks 不能显示登录界面,但是其他服务还正常。不接显示器的情况下重启都不好使,效果同上。
接了显示器重启就能显示登录界面

还有个奇怪的地方 就是不接显示器显示/dev/mapper/ubuntu--vg-root:clean 等字样 然后你接上显示器,在ttyN中重启lightdm和teamviewer,就能显示登录界面了

请教各位大神 这是什么问题 如何解决在没有显示器的前提下正常登录桌面版本的界面
头像
astolia
论坛版主
帖子: 6396
注册时间: 2008-09-18 13:11

Re: ubuntu16.04启动怪事

#2

帖子 astolia » 2017-11-01 19:33

Xorg默认需要有显示器才能启动。要么你自己修改xorg.conf设置一个显示器,如 https://wiki.archlinux.org/index.php/xo ... r_settings
要么你装xserver-xephyr包,用Xephyr -screen 1024x768 :1来启动一个图形环境
lqfie
帖子: 18
注册时间: 2017-08-01 18:31
系统: win10

Re: ubuntu16.04启动怪事

#3

帖子 lqfie » 2017-11-02 10:15

多谢楼上
lqfie
帖子: 18
注册时间: 2017-08-01 18:31
系统: win10

Re: ubuntu16.04启动怪事

#4

帖子 lqfie » 2017-11-02 19:21

astolia 写了:Xorg默认需要有显示器才能启动。要么你自己修改xorg.conf设置一个显示器,如 https://wiki.archlinux.org/index.php/xo ... r_settings
要么你装xserver-xephyr包,用Xephyr -screen 1024x768 :1来启动一个图形环境
大哥 抽空试验了下 无效 以下是我的配置 您帮忙看看
就按照链接给的方法添加 Modes "1920X1080" 难道非得写到/etc/X11/xorg.conf.d这个路径下吗?

####################################################################################################
cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 384.90 (buildmeister@swio-display-x86-rhel47-05) Tue Sep 19 18:13:03 PDT 2017

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 1050 Ti"
Option "TwinView" "on"
Option "RandRRotation" "true"
Option "NoLogo" "True"
Option "Coolbits" "4"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920X1080"
EndSubSection
EndSection

xxh@1050TI:~$
头像
astolia
论坛版主
帖子: 6396
注册时间: 2008-09-18 13:11

Re: ubuntu16.04启动怪事

#5

帖子 astolia » 2017-11-06 10:05

modes不是分辨率,必须是xrandr输出中已有的显示模式才行。而你用的又是大写的X,我可以肯定没有这种模式。
非要用xrandr中没有的模式就要自己动手加,方法见 https://wiki.archlinux.org/index.php/xr ... esolutions ,把相关的命令添加到~/.xinitrc
回复