下午好,
系统是Ubuntu16.04的联想Thinkpad X220在一个对接站,该系统输出声音通过DP和视频通过VGA电缆。
由于有时VGA输出或DP (在xrandr -2中)声音没有连接,所以有一个启动脚本:
if xrandr | grep -i "VGA-1 connected"; then
xrandr --newmode "720p" 74.48 1280 1336 1472 1664 720 721 724 746 -HSync +Vsync
xrandr --addmode VGA-1 "720p"
xrandr --output VGA-1 --mode "720p"
xrandr --output VGA-1 --primary
if xrandr | grep -i "HDMI-2 connected"; then
xrandr --addmode HDMI-2 "720p"
xrandr --output LVDS-1 --off
xrandr --output HDMI-2 --mode "720p"
xrandr --output HDMI-2 --same-as VGA-1
fi
elif xrandr | grep -i "HDMI-2 connected"; then
xrandr --newmode "720p" 74.48 1280 1336 1472 1664 720 721 724 746 -HSync +Vsync
xrandr --addmode HDMI-2 "720p"
xrandr --output LVDS-1 --mode "1280x720"
xrandr --output HDMI-2 --mode "720p" --same-as LVDS-1
else
echo "kein Beamer an"
fi),但仍然存在错误消息,“无法为监视器应用存储的配置”,每次启动。
一些建议是检查monitors.xml
cat $HOME/.config/monitors.xml但它看起来很完美:
<monitors version="1">
<configuration>
<clone>yes</clone>
<output name="LVDS-1">
<vendor>LGD</vendor>
<product>0x02d8</product>
<serial>0x00000000</serial>
</output>
<output name="VGA-1">
<vendor>???</vendor>
<product>0x0000</product>
<serial>0x00000000</serial>
<width>1280</width>
<height>720</height>
<rate>60</rate>
<x>0</x>
<y>0</y>
<rotation>normal</rotation>
<reflect_x>no</reflect_x>
<reflect_y>no</reflect_y>
<primary>no</primary>
</output>
<output name="HDMI-1">
</output>
<output name="DP-1">
</output>
<output name="HDMI-2">
<vendor>MEI</vendor>
<product>0xd043</product>
<serial>0x15121053</serial>
<width>1280</width>
<height>720</height>
<rate>60</rate>
<x>0</x>
<y>0</y>
<rotation>normal</rotation>
<reflect_x>no</reflect_x>
<reflect_y>no</reflect_y>
<primary>yes</primary>
</output>
<output name="HDMI-3">
</output>
<output name="DP-2">
</output>
<output name="DP-3">
</output>
</configuration>
</monitors>所以我现在发帖..。
先谢谢你,向你问好,乔希姆
发布于 2019-02-25 06:40:38
好的,
有帮助的是:
rm ~/.config/monitors.xml还没什么麻烦。
从长远来看,我正在考虑创建一个执行上述代码的关闭脚本.
https://askubuntu.com/questions/1113948
复制相似问题