Xubuntu 14.04:屏幕分辨率 1440x900,没有 xorg.conf 或 lightdm.conf

Nox*_*nc. 5 resolution display-manager display-resolution

所以我现在很困惑,因为我阅读了许多针对屏幕分辨率问题的不同解决方案,但没有一个适用于我的情况(我认为)。

所以我运行的是 Xubuntu 14.04 x64 并且无法让我的 LG Flatron W1934S 适合该系统。

cvt输出:

linuxdev@linux-dev-pc:~$ cvt 1440 900
# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
Run Code Online (Sandbox Code Playgroud)

现在,通过使用以下几行,屏幕可以完美工作

$: xrandr --newmode "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync
$: xrandr --addmode VGA1 1440x900_60.00
$: xrandr --output VGA1 --mode 1440x900_60.00
Run Code Online (Sandbox Code Playgroud)

在目前的情况下:

linuxdev@linux-dev-pc:~$ xrandr -q
Screen 0: minimum 320 x 200, current 1440 x 900, maximum 32767 x 32767
VGA1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1440x900       59.9  
   1024x768       60.0  
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  
   1440x900_60.00   59.9* 
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Run Code Online (Sandbox Code Playgroud)

LSHW 显示输出:

*-display
             description: VGA compatible controller
             product: 82945G/GZ Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:16 memory:fe980000-fe9fffff ioport:dc00(size=8) memory:d0000000-dfffffff memory:fe940000-fe97ffff
Run Code Online (Sandbox Code Playgroud)

现在是个大问题;如何为其创建永久记录?

到目前为止,我尝试的是查看升级后不再存在的“xorg.conf”。当我手动创建 'xorg.conf' 时,系统崩溃并且不再引导到 GUI。通过终端,我需要删除“xorg.conf”以使其再次以低分辨率启动到正常状态。

此外,“lightdm.conf”很难找到或调整,因此目前我的选项很少。(我发现的唯一 lightdm.conf 位于 /etc/init,但从文件的输出我不知道在哪里或编辑什么)

/etc/init/lightdm.conf 输出:

linuxdev@linux-dev-pc:~$ cat /etc/init/lightdm.conf
# LightDM - light Display Manager
#
# The display manager service manages the X servers running on the
# system, providing login and auto-login services
#
# based on gdm upstart script

description "LightDM Display Manager"
author      "Robert Ancell <robert.ancell@canonical.com>"

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and plymouth-ready)
          or runlevel PREVLEVEL=S)

stop on runlevel [016]

emits login-session-start
emits desktop-session-start
emits desktop-shutdown

script
    if [ -n "$UPSTART_EVENTS" ]
    then
        # Check kernel command-line for inhibitors, unless we are being called
        # manually
        for ARG in $(cat /proc/cmdline); do
            if [ "$ARG" = "text" ]; then
        plymouth quit || : 
                stop
        exit 0
            fi
        done

    [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/bin/lightdm" -o "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/lightdm" ] || { stop; exit 0; }

    if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
    then
        # Single-user mode
        plymouth quit || :
        exit 0
    fi
    fi

    exec lightdm
end script

post-start script
    sleep 5
    clear > /dev/tty7
end script

post-stop script
    clear > /dev/tty7
    sleep 1
    if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
        initctl emit desktop-shutdown
    fi
end script
Run Code Online (Sandbox Code Playgroud)

感谢您的阅读和最终回复!

小智 1

非常好的东西。

我在将第二台显示器保持在正确位置时遇到了一些问题。启动时,系统会自动尝试镜像我的屏幕,即使我将它们保存在特定位置。我认为这与加载到与上次使用的分辨率不同的分辨率有关(因为它尚未通过 xrandr 添加)。

我能够通过额外的步骤解决我的问题。在我按照我想要的方式设置桌面(即添加新模式并初始化它)后,我安装了“arandr”并将当前的桌面设置保存到单行 shell 命令中。然后最终的脚本确保我的桌面每次都出现在正确的位置。我的完整脚本现在自动启动并在我的 Kubuntu 设置中完美运行。

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VIRTUAL1 --off --output DP3 --off --output DP2 --off --output DP1 --off --output HDMI3 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI2 --off --output HDMI1 --off --output VGA1 --mode 1280x1024_60.00 --pos 1920x104 --rotate normal
Run Code Online (Sandbox Code Playgroud)

我希望这对处于这种情况的任何人都有帮助。