如何在无头 Linux/Ubuntu 上为宽屏 VNC 配置 xorg.conf?

Ste*_*gin 7 linux ubuntu xorg vnc x11

我有一个配置为无头运行的 Ubuntu 12.10 Box。我已经通过大量反复试验设法无头启动 X,但我仍然有一个小故障:

使用显示器启动时,一切正常,宽屏分辨率等等,当无头启动时,它将坚持 4:3 分辨率,我怀疑它与vesa驱动程序有关。

眼镜:

  • 显卡 intel HD 4000(集成 i7)
  • ubuntu 12.10(最新更新)

这是我的 /etc/X11/ xorg.conf

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     "NoAccel"               # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "Backlight"             # <str>
        #Option     "DRI"                   # <str>
        #Option     "ColorKey"              # <i>
        #Option     "VideoKey"              # <i>
        #Option     "Tiling"                # [<bool>]
        #Option     "LinearFramebuffer"     # [<bool>]
        #Option     "SwapbuffersWait"       # [<bool>]
        #Option     "TripleBuffer"          # [<bool>]
        #Option     "XvPreferOverlay"       # [<bool>]
        #Option     "HotPlug"               # [<bool>]
        #Option     "RelaxedFencing"        # [<bool>]
        #Option     "XvMC"                  # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "TearFree"              # [<bool>]
        #Option     "PerCrtcPixmaps"        # [<bool>]
        #Option     "FallbackDebug"         # [<bool>]
        #Option     "DebugFlushBatches"     # [<bool>]
        #Option     "DebugFlushCaches"      # [<bool>]
        #Option     "DebugWait"             # [<bool>]
        #Option     "BufferCache"           # [<bool>]
    Identifier  "intelCard"
    Driver      "intel"
    BusID       "PCI:0:2:0" 
    Option      "ConnectedMonitor" "SME2220NW"
    Option      "CustomEDID" "SME2220NW:/etc/X11/samsung.edid"
EndSection

Section "Monitor"
    Identifier "SME2220NW"
    VendorName "SAM"
    ModelName "SME2220NW"
    # Block type: 2:0 3:fd
    HorizSync 30-81
    VertRefresh 56-75
    # Max dot clock (video bandwidth) 150 MHz
    # Block type: 2:0 3:fc
    # Block type: 2:0 3:ff
    # DPMS capabilities: Active off:yes  Suspend:no  Standby:no

    Mode    "1680x1050" # vfreq 59.883Hz, hfreq 64.674kHz
        DotClock    119.000000
        HTimings    1680 1728 1760 1840
        VTimings    1050 1053 1059 1080
        Flags   "-HSync" "+VSync"
    EndMode  

    Option   "enable" "true"
    Option   "Preferred Mode" "1680x1050"
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "SME2220NW"
    Device      "intelCard"
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
    Option         "metamodes" "1680x1050 +0+0; 1440x900 +0+0; 1280x1024 +0+0; 1280x960 +0+0; 1280x800 +0+0; 1024x768 +0+0; 800x600 +0+0; 640x480 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Run Code Online (Sandbox Code Playgroud)

这是我的 /var/log/ xorg.0.log

[  8841.997] 
X.Org X Server 1.13.1.901 (1.13.2 RC 1)
Release Date: 2013-01-03
[  8841.997] X Protocol Version 11, Revision 0
[  8841.997] Build Operating System: Linux 2.6.24-32-xen x86_64 Ubuntu
[  8841.997] Current Operating System: Linux L2 3.7.0-7-generic #15-Ubuntu SMP Sat Dec 15 16:34:25 UTC 2012 x86_64
[  8841.997] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.7.0-7-generic root=UUID=58d10bfd-8c7c-4308-98eb-7002337b7510 ro nomodeset
[  8841.997] Build Date: 04 January 2013  11:17:34AM
[  8841.997] xorg-server 2:1.13.1.901+git20130104+server-1.13-branch.3a8c618a-0ubuntu0ricotz~quantal (For technical support please see http://www.ubuntu.com/support) 
[  8841.997] Current version of pixman: 0.28.2
[  8841.997]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[  8841.997] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  8841.997] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jan 30 12:23:13 2013
[  8841.997] (==) Using config file: "/etc/X11/xorg.conf"
[  8841.997] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  8841.998] (==) No Layout section.  Using the first Screen section.
[  8841.998] (**) |-->Screen "Default Screen" (0)
[  8841.998] (**) |   |-->Monitor "SME2220NW"
[  8841.998] (**) |   |-->Device "intelCard"
[  8841.998] (==) Automatically adding devices
[  8841.998] (==) Automatically enabling devices
[  8841.998] (==) Automatically adding GPU devices
[  8841.998] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[  8841.998]    Entry deleted from font path.
[  8841.998] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[  8841.998]    Entry deleted from font path.
[  8841.998] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[  8841.998]    Entry deleted from font path.
[  8841.998] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
[  8841.998]    Entry deleted from font path.
[  8841.998] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/100dpi/:unscaled,
    /usr/share/fonts/X11/Type1,
    /usr/share/fonts/X11/100dpi,
    built-ins
[  8841.998] (==) ModulePath set to "/usr/lib/x86_64-linux-gnu/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"
[  8841.998] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[  8841.998] (II) Loader magic: 0x7ff68004ac40
[  8841.998] (II) Module ABI versions:
[  8841.998]    X.Org ANSI C Emulation: 0.4
[  8841.998]    X.Org Video Driver: 13.1
[  8841.998]    X.Org XInput driver : 18.0
[  8841.998]    X.Org Server Extension : 7.0
[  8841.999] (--) PCI:*(0:0:2:0) 8086:0162:1043:84ca rev 9, Mem @ 0xf7800000/4194304, 0xe0000000/268435456, I/O @ 0x0000f000/64
[  8841.999] (II) Open ACPI successful (/var/run/acpid.socket)
[  8841.999] Initializing built-in extension Generic Event Extension
[  8841.999] Initializing built-in extension SHAPE
[  8841.999] Initializing built-in extension MIT-SHM
[  8841.999] Initializing built-in extension XInputExtension
[  8841.999] Initializing built-in extension XTEST
[  8841.999] Initializing built-in extension BIG-REQUESTS
[  8841.999] Initializing built-in extension SYNC
[  8841.999] Initializing built-in extension XKEYBOARD
[  8841.999] Initializing built-in extension XC-MISC
[  8841.999] Initializing built-in extension SECURITY
[  8841.999] Initializing built-in extension XINERAMA
[  8841.999] Initializing built-in extension XFIXES
[  8841.999] Initializing built-in extension RENDER
[  8841.999] Initializing built-in extension RANDR
[  8841.999] Initializing built-in extension COMPOSITE
[  8841.999] Initializing built-in extension DAMAGE
[  8841.999] Initializing built-in extension MIT-SCREEN-SAVER
[  8841.999] Initializing built-in extension DOUBLE-BUFFER
[  8841.999] Initializing built-in extension RECORD
[  8841.999] Initializing built-in extension DPMS
[  8841.999] Initializing built-in extension X-Resource
[  8841.999] Initializing built-in extension XVideo
[  8841.999] Initializing built-in extension XVideo-MotionCompensation
[  8841.999] Initializing built-in extension XFree86-VidModeExtension
[  8841.999] Initializing built-in extension XFree86-DGA
[  8841.999] Initializing built-in extension XFree86-DRI
[  8841.999] Initializing built-in extension DRI2
[  8841.999] (II) LoadModule: "glx"
[  8842.000] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  8842.000] (II) Module glx: vendor="X.Org Foundation"
[  8842.000]    compiled for 1.13.1.901, module version = 1.0.0
[  8842.000]    ABI class: X.Org Server Extension, version 7.0
[  8842.000] (==) AIGLX enabled
[  8842.000] Loading extension GLX
[  8842.000] (II) LoadModule: "intel"
[  8842.000] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[  8842.000] (II) Module intel: vendor="X.Org Foundation"
[  8842.000]    compiled for 1.13.1.901, module version = 2.20.19
[  8842.000]    Module class: X.Org Video Driver
[  8842.000]    ABI class: X.Org Video Driver, version 13.1
[  8842.000] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
    i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G,
    E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
    965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
    4 Series, G45/G43, Q45/Q43, G41, B43, B43, Clarkdale, Arrandale,
    Sandybridge Desktop (GT1), Sandybridge Desktop (GT2),
    Sandybridge Desktop (GT2+), Sandybridge Mobile (GT1),
    Sandybridge Mobile (GT2), Sandybridge Mobile (GT2+),
    Sandybridge Server, Ivybridge Mobile (GT1), Ivybridge Mobile (GT2),
    Ivybridge Desktop (GT1), Ivybridge Desktop (GT2), Ivybridge Server,
    Ivybridge Server (GT2), Haswell Desktop (GT1), Haswell Desktop (GT2),
    Haswell Desktop (GT2+), Haswell Mobile (GT1), Haswell Mobile (GT2),
    Haswell Mobile (GT2+), Haswell Server (GT1), Haswell Server (GT2),
    Haswell Server (GT2+), Haswell SDV Desktop (GT1),
    Haswell SDV Desktop (GT2), Haswell SDV Desktop (GT2+),
    Haswell SDV Mobile (GT1), Haswell SDV Mobile (GT2),
    Haswell SDV Mobile (GT2+), Haswell SDV Server (GT1),
    Haswell SDV Server (GT2), Haswell SDV Server (GT2+),
    Haswell ULT Desktop (GT1), Haswell ULT Desktop (GT2),
    Haswell ULT Desktop (GT2+), Haswell ULT Mobile (GT1),
    Haswell ULT Mobile (GT2), Haswell ULT Mobile (GT2+),
    Haswell ULT Server (GT1), Haswell ULT Server (GT2),
    Haswell ULT Server (GT2+), Haswell CRW Desktop (GT1),
    Haswell CRW Desktop (GT2), Haswell CRW Desktop (GT2+),
    Haswell CRW Mobile (GT1), Haswell CRW Mobile (GT2),
    Haswell CRW Mobile (GT2+), Haswell CRW Server (GT1),
    Haswell CRW Server (GT2), Haswell CRW Server (GT2+),
    ValleyView PO board
[  8842.001] (++) using VT number 7

[  8842.004] (EE) No devices detected.
[  8842.004] (==) Matched intel as autoconfigured driver 0
[  8842.004] (==) Matched vesa as autoconfigured driver 1
[  8842.004] (==) Matched modesetting as autoconfigured driver 2
[  8842.004] (==) Matched fbdev as autoconfigured driver 3
[  8842.004] (==) Assigned the driver to the xf86ConfigLayout
[  8842.004] (II) LoadModule: "intel"
[  8842.004] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[  8842.004] (II) Module intel: vendor="X.Org Foundation"
[  8842.004]    compiled for 1.13.1.901, module version = 2.20.19
[  8842.004]    Module class: X.Org Video Driver
[  8842.004]    ABI class: X.Org Video Driver, version 13.1
[  8842.004] (II) UnloadModule: "intel"
[  8842.004] (II) Unloading intel
[  8842.004] (II) Failed to load module "intel" (already loaded, 32758)
[  8842.004] (II) LoadModule: "vesa"
[  8842.005] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[  8842.005] (II) Module vesa: vendor="X.Org Foundation"
[  8842.005]    compiled for 1.13.0, module version = 2.3.2
[  8842.005]    Module class: X.Org Video Driver
[  8842.005]    ABI class: X.Org Video Driver, version 13.0
[  8842.005] (II) LoadModule: "modesetting"
[  8842.005] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  8842.005] (II) Module modesetting: vendor="X.Org Foundation"
[  8842.005]    compiled for 1.13.0, module version = 0.5.0
[  8842.005]    Module class: X.Org Video Driver
[  8842.005]    ABI class: X.Org Video Driver, version 13.0
[  8842.005] (II) LoadModule: "fbdev"
[  8842.005] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  8842.005] (II) Module fbdev: vendor="X.Org Foundation"
[  8842.005]    compiled for 1.12.99.903, module version = 0.4.3
[  8842.005]    Module class: X.Org Video Driver
[  8842.005]    ABI class: X.Org Video Driver, version 13.0
[  8842.005] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
    i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G,
    E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
    965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
    4 Series, G45/G43, Q45/Q43, G41, B43, B43, Clarkdale, Arrandale,
    Sandybridge Desktop (GT1), Sandybridge Desktop (GT2),
    Sandybridge Desktop (GT2+), Sandybridge Mobile (GT1),
    Sandybridge Mobile (GT2), Sandybridge Mobile (GT2+),
    Sandybridge Server, Ivybridge Mobile (GT1), Ivybridge Mobile (GT2),
    Ivybridge Desktop (GT1), Ivybridge Desktop (GT2), Ivybridge Server,
    Ivybridge Server (GT2), Haswell Desktop (GT1), Haswell Desktop (GT2),
    Haswell Desktop (GT2+), Haswell Mobile (GT1), Haswell Mobile (GT2),
    Haswell Mobile (GT2+), Haswell Server (GT1), Haswell Server (GT2),
    Haswell Server (GT2+), Haswell SDV Desktop (GT1),
    Haswell SDV Desktop (GT2), Haswell SDV Desktop (GT2+),
    Haswell SDV Mobile (GT1), Haswell SDV Mobile (GT2),
    Haswell SDV Mobile (GT2+), Haswell SDV Server (GT1),
    Haswell SDV Server (GT2), Haswell SDV Server (GT2+),
    Haswell ULT Desktop (GT1), Haswell ULT Desktop (GT2),
    Haswell ULT Desktop (GT2+), Haswell ULT Mobile (GT1),
    Haswell ULT Mobile (GT2), Haswell ULT Mobile (GT2+),
    Haswell ULT Server (GT1), Haswell ULT Server (GT2),
    Haswell ULT Server (GT2+), Haswell CRW Desktop (GT1),
    Haswell CRW Desktop (GT2), Haswell CRW Desktop (GT2+),
    Haswell CRW Mobile (GT1), Haswell CRW Mobile (GT2),
    Haswell CRW Mobile (GT2+), Haswell CRW Server (GT1),
    Haswell CRW Server (GT2), Haswell CRW Server (GT2+),
    ValleyView PO board
[  8842.006] (II) VESA: driver for VESA chipsets: vesa
[  8842.006] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  8842.006] (II) FBDEV: driver for framebuffer: fbdev
[  8842.006] (++) using VT number 7

[  8842.006] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[  8842.006] (WW) xf86OpenConsole: setsid failed: Operation not permitted
[  8842.008] (WW) Falling back to old probe method for modesetting
[  8842.008] (EE) open /dev/dri/card0: No such file or directory
[  8842.008] (WW) Falling back to old probe method for fbdev
[  8842.008] (II) Loading sub module "fbdevhw"
[  8842.008] (II) LoadModule: "fbdevhw"
[  8842.008] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  8842.008] (II) Module fbdevhw: vendor="X.Org Foundation"
[  8842.008]    compiled for 1.13.1.901, module version = 0.0.2
[  8842.008]    ABI class: X.Org Video Driver, version 13.1
[  8842.008] (EE) open /dev/fb0: No such file or directory
[  8842.008] (II) Loading sub module "vbe"
[  8842.008] (II) LoadModule: "vbe"
[  8842.009] (II) Loading /usr/lib/xorg/modules/libvbe.so
[  8842.009] (II) Module vbe: vendor="X.Org Foundation"
[  8842.009]    compiled for 1.13.1.901, module version = 1.1.0
[  8842.009]    ABI class: X.Org Video Driver, version 13.1
[  8842.009] (II) Loading sub module "int10"
[  8842.009] (II) LoadModule: "int10"
[  8842.009] (II) Loading /usr/lib/xorg/modules/libint10.so
[  8842.009] (II) Module int10: vendor="X.Org Foundation"
[  8842.009]    compiled for 1.13.1.901, module version = 1.0.0
[  8842.009]    ABI class: X.Org Video Driver, version 13.1
[  8842.009] (II) VESA(0): initializing int10
[  8842.009] (II) VESA(0): Primary V_BIOS segment is: 0xc000
[  8842.010] (II) VESA(0): VESA BIOS detected
[  8842.010] (II) VESA(0): VESA VBE Version 3.0
[  8842.010] (II) VESA(0): VESA VBE Total Mem: 262080 kB
[  8842.010] (II) VESA(0): VESA VBE OEM: Intel(R) Sandybridge/Ivybridge Graphics Chipset Accelerated VGA BIOS
[  8842.010] (II) VESA(0): VESA VBE OEM Software Rev: 1.0
[  8842.010] (II) VESA(0): VESA VBE OEM Vendor: Intel Corporation
[  8842.010] (II) VESA(0): VESA VBE OEM Product: Intel(R) Sandybridge/Ivybridge Graphics Controller
[  8842.010] (II) VESA(0): VESA VBE OEM Product Rev: Hardware Version 0.0
[  8842.023] (==) VESA(0): Depth 24, (--) framebuffer bpp 32
[  8842.023] (==) VESA(0): RGB weight 888
[  8842.023] (==) VESA(0): Default visual is TrueColor
[  8842.023] (==) VESA(0): Using gamma correction (1.0, 1.0, 1.0)
[  8842.023] (II) Loading sub module "ddc"
[  8842.023] (II) LoadModule: "ddc"
[  8842.023] (II) Module "ddc" already built-in
[  8842.029] (II) VESA(0): VESA VBE DDC supported
[  8842.029] (II) VESA(0): VESA VBE DDC Level none
[  8842.029] (II) VESA(0): VESA VBE DDC transfer in appr. 0 sec.
[  8842.030] (II) VESA(0): VESA VBE DDC read failed
[  8842.030] (II) VESA(0): Searching for matching VESA mode(s):
[  8842.030] Mode: 160 (0x0)
[  8842.030]    ModeAttributes: 0x0
[  8842.030]    WinAAttributes: 0x0
[  8842.030]    WinBAttributes: 0x0
...
[  8842.043] (II) VESA(0): Total Memory: 4095 64KB banks (262080kB)
[  8842.043] (II) VESA(0): SME2220NW: Using hsync range of 30.00-81.00 kHz
[  8842.043] (II) VESA(0): SME2220NW: Using vrefresh range of 56.00-75.00 Hz
[  8842.043] (WW) VESA(0): Unable to estimate virtual size
[  8842.043] (II) VESA(0): Not using built-in mode "1920x1440" (no mode of this name)
[  8842.043] (II) VESA(0): Not using built-in mode "1600x1200" (no mode of this name)
[  8842.043] (II) VESA(0): Not using built-in mode "1280x1024" (no mode of this name)
[  8842.043] (II) VESA(0): Not using built-in mode "1024x768" (no mode of this name)
[  8842.043] (II) VESA(0): Not using built-in mode "1024x768" (no mode of this name)
[  8842.043] (II) VESA(0): Not using built-in mode "800x600" (no mode of this name)
[  8842.043] (II) VESA(0): Not using built-in mode "640x480" (no mode of this name)
[  8842.043] (WW) VESA(0): No valid modes left. Trying less strict filter...
[  8842.043] (II) VESA(0): SME2220NW: Using hsync range of 30.00-81.00 kHz
[  8842.043] (II) VESA(0): SME2220NW: Using vrefresh range of 56.00-75.00 Hz
[  8842.043] (WW) VESA(0): Unable to estimate virtual size
[  8842.043] (II) VESA(0): Not using built-in mode "1920x1440" (hsync out of range)
[  8842.043] (--) VESA(0): Virtual size is 1600x1200 (pitch 1600)
[  8842.043] (**) VESA(0): *Built-in mode "1600x1200"
[  8842.043] (**) VESA(0): *Built-in mode "1280x1024"
[  8842.043] (**) VESA(0): *Built-in mode "1024x768"
[  8842.043] (**) VESA(0): *Built-in mode "1024x768"
[  8842.043] (**) VESA(0): *Built-in mode "800x600"
[  8842.043] (**) VESA(0): *Built-in mode "640x480"
[  8842.043] (==) VESA(0): DPI set to (96, 96)
[  8842.043] (II) VESA(0): Attempting to use 65Hz refresh for mode "1600x1200" (15a)
[  8842.044] (II) VESA(0): Attempting to use 75Hz refresh for mode "1280x1024" (11b)
[  8842.044] (II) VESA(0): Attempting to use 75Hz refresh for mode "1024x768" (118)
[  8842.044] (II) VESA(0): Attempting to use 75Hz refresh for mode "1024x768" (17f)
[  8842.044] (II) VESA(0): Attempting to use 72Hz refresh for mode "800x600" (115)
[  8842.044] (II) VESA(0): Attempting to use 73Hz refresh for mode "640x480" (112)
[  8842.045] (**) VESA(0): Using "Shadow Framebuffer"
[  8842.045] (II) Loading sub module "shadow"
[  8842.045] (II) LoadModule: "shadow"
[  8842.045] (II) Loading /usr/lib/xorg/modules/libshadow.so
[  8842.045] (II) Module shadow: vendor="X.Org Foundation"
[  8842.045]    compiled for 1.13.1.901, module version = 1.1.0
[  8842.045]    ABI class: X.Org ANSI C Emulation, version 0.4
[  8842.045] (II) Loading sub module "fb"
[  8842.045] (II) LoadModule: "fb"
[  8842.045] (II) Loading /usr/lib/xorg/modules/libfb.so
[  8842.045] (II) Module fb: vendor="X.Org Foundation"
[  8842.045]    compiled for 1.13.1.901, module version = 1.0.0
[  8842.045]    ABI class: X.Org ANSI C Emulation, version 0.4
[  8842.045] (II) UnloadModule: "modesetting"
[  8842.045] (II) Unloading modesetting
[  8842.045] (II) UnloadModule: "fbdev"
[  8842.045] (II) Unloading fbdev
[  8842.045] (II) UnloadSubModule: "fbdevhw"
[  8842.045] (II) Unloading fbdevhw
[  8842.045]

hil*_*red 5

如果您只打算去无头,有一个更简单的方法来做到这一点:不要使用标准的 X 服务器。

我经常在几乎从未连接过显示器的盒子上执行此操作。此示例在 debian 上使用 xdm,但我已使用 kdm 和 gdm 完成。

将 Xvnc 指定为 X 服务器以使用其完整路径并在命令行上指定分辨率。例如,这是来自无头盒的我的 /etc/X11/xdm/Xservers 之一。

:0 local /usr/bin/Xvnc :0 -nolisten tcp -desktop crystal:0 -geometry 1400x1050 -rfbauth /home/ben/.vnc/passwd
Run Code Online (Sandbox Code Playgroud)

为了让事情变得更好,我创建了 /etc/X11/Xsession-0

#!/bin/sh
#

vncconfig -nowin &
# invoke global X session script
. /etc/X11/Xsession
Run Code Online (Sandbox Code Playgroud)

并将以下行添加到 /etc/X11/xdm/xdm-config

DisplayManager._0.session:      /etc/X11/Xsession-0
Run Code Online (Sandbox Code Playgroud)

在(并且仅在)所有已知的 Xvnc 实例上自动启动 vncconfig。在混合本地远程设置中,我使用两台 X 服务器,一台传统的虚拟服务器。奇迹般有效。不幸的是,这对于当前超级用户友好的显示管理器来说更加困难,因为他们太努力让事情变得简单。


小智 2

使用xrandr您可以定义新的模型行。这行代码来自我的,~/.xinitrc它在每次 X 会话启动时运行。这明确定义了可应用于任何输出的 1280x720 60Hz 模式。

xrandr --newmode "1280x720p" 74.25 1280 1320 1376 1650 720 722 728 750

然后应用它(也可以通过.xinitrc永久会话自动应用):

xrandr --addmode HDMI1 "1280x720p"
xrandr --output HDMI1 --mode "1280x720p"
Run Code Online (Sandbox Code Playgroud)

当然将其更改HDMI1为您的实际输出。即使输出没有连接显示器,它也能工作。