[求助]如何在系统中关闭LVDS显示?

CPU/显卡/打印机/USB设备等硬件问题
回复
头像
chinaz
帖子: 238
注册时间: 2007-02-07 9:23

[求助]如何在系统中关闭LVDS显示?

#1

帖子 chinaz » 2020-08-14 11:02

系统版本debian8
硬件收银机板子D525,一个普通vga接口的显示器

问题:
安装好系统重启后只出现一个桌面壁纸,啥图标都没有,思考了半天才发觉当前显示器显示的只是被扩展的部分,系统默认把LVDS作为主显示了。。。
主板跳线和bios能调的地方都调了,都没有用。

xrandr信息显示有VGA1和LVDS1
执行下面的命令
xrandr --output LVDS1 --off
结果可以正常显示了,但是设置并不能保存,重启后问题依旧。

请问有什么方法可以在系统中设置默认关闭或者不使用LVDS1,只用VGA1?
宠辱不惊,闲看庭前花开花落;去留无意,漫随天外云卷云舒。
头像
astolia
论坛版主
帖子: 6542
注册时间: 2008-09-18 13:11

Re: [求助]如何在系统中关闭LVDS显示?

#2

帖子 astolia » 2020-08-14 11:29

简单点就是设置个启动脚本,要不然去改 /etc/X11/xorg.conf ,加上一段差不多这样的

代码: 全选

Section "Monitor"
    Identifier  "VGA1"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "LVDS1"
    Option      "Enable" "false"
EndSection
头像
chinaz
帖子: 238
注册时间: 2007-02-07 9:23

Re: [求助]如何在系统中关闭LVDS显示?

#3

帖子 chinaz » 2020-08-14 13:02

astolia 写了: 2020-08-14 11:29 简单点就是设置个启动脚本,要不然去改 /etc/X11/xorg.conf ,加上一段差不多这样的

代码: 全选

Section "Monitor"
    Identifier  "VGA1"
    Option      "Primary" "true"
EndSection

Section "Monitor"
    Identifier  "LVDS1"
    Option      "Enable" "false"
EndSection
以下是我用Xorg :0 -configure重新生成的xorg.conf内容,麻烦给个修改建议,谢谢!

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "built-ins"
EndSection

Section "Module"
Load "glx"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "Accel" # [<bool>]
#Option "AccelMethod" # <str>
#Option "Backlight" # <str>
#Option "CustomEDID" # <str>
#Option "DRI" # <str>
#Option "Present" # [<bool>]
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "Tiling" # [<bool>]
#Option "LinearFramebuffer" # [<bool>]
#Option "HWRotation" # [<bool>]
#Option "VSync" # [<bool>]
#Option "PageFlip" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "TripleBuffer" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "HotPlug" # [<bool>]
#Option "ReprobeOutputs" # [<bool>]
#Option "XvMC" # [<bool>]
#Option "ZaphodHeads" # <str>
#Option "VirtualHeads" # <i>
#Option "TearFree" # [<bool>]
#Option "PerCrtcPixmaps" # [<bool>]
#Option "FallbackDebug" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
#Option "BufferCache" # [<bool>]
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "Accel" # [<bool>]
#Option "AccelMethod" # <str>
#Option "Backlight" # <str>
#Option "CustomEDID" # <str>
#Option "DRI" # <str>
#Option "Present" # [<bool>]
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "Tiling" # [<bool>]
#Option "LinearFramebuffer" # [<bool>]
#Option "HWRotation" # [<bool>]
#Option "VSync" # [<bool>]
#Option "PageFlip" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "TripleBuffer" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "HotPlug" # [<bool>]
#Option "ReprobeOutputs" # [<bool>]
#Option "XvMC" # [<bool>]
#Option "ZaphodHeads" # <str>
#Option "VirtualHeads" # <i>
#Option "TearFree" # [<bool>]
#Option "PerCrtcPixmaps" # [<bool>]
#Option "FallbackDebug" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
#Option "BufferCache" # [<bool>]
Identifier "Card1"
Driver "intel"
BusID "PCI:0:2:1"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
宠辱不惊,闲看庭前花开花落;去留无意,漫随天外云卷云舒。
头像
chinaz
帖子: 238
注册时间: 2007-02-07 9:23

Re: [求助]如何在系统中关闭LVDS显示?

#4

帖子 chinaz » 2020-08-14 14:40

问题解决,过程如下:

参考了这个链接:
https://wiki.archlinux.org/index.php/Multihead

ctrl+alt+F2

sudo /etc/init.d/gdm3 stop
sudo Xorg :0 -configure
sudo cp /root/xorg.conf.new /etc/X11/xorg.conf
sudo mkdir /etc/X11/xorg.conf.d
sudo nano /etc/X11/xorg.conf.d/10-monitor.conf

-----------------
Section "Monitor"
Identifier "VGA1"
Option "Primary" "true"
EndSection

Section "Monitor"
Identifier "LVDS1"
Option "Enable" "false"
EndSection
----------------

sudo /etc/init.d/gdm3 start


感谢帮助!
宠辱不惊,闲看庭前花开花落;去留无意,漫随天外云卷云舒。
回复