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

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

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

因此,我运行的是 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

目前,使用以下几行屏幕可以完美工作

$: 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

而当前的情况是:

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)

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

现在最大的问题是:我如何为其创建永久记录?

到目前为止,我尝试查看“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 <[email protected]>"

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

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

答案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

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

相关内容