现象,在ubuntu 22.04输入xrandr命令之后,弹出来的图长这样:
这里面的XWAYLAND0就比较抽象,也没这个接口才对。
经过一顿搜索,发现22.04启用了一个以前废弃的机制,参考下面连接:
https://blog.csdn.net/weixin_43223083/article/details/132858179
导致xrandr的所有命令就没效果了,在askubuntu网站上,有人说工具要从
xrandr换成wlr-randr,我撞了一下,也不行,报错是编译器不支持
compositor doesn't support wlr-output-management-unstable-v1
然后还有分享了一个Python的工具:https://gitlab.com/Oschowa/gnome-randr
运行结果是继续报错,报什么错我就不发了。
然后看到这个帖子:
https://askubuntu.com/questions/1412521/ubuntu-22-04-lts-changing-brightness-with-xrandr-doesnt-work
里面有一段,相当于关闭了xwayland这个功能,方法如下:
Edit: I went to /etc/gdm3/custom.conf and removed the # from
#WaylandEnable=false, which gave me back the ‘VGA-1’ output after a reboot.
然后重启,发现确实好用。
重启之后,我也有目前的HDMI-1的显示器连接了,然后就可以继续用xrandr这个命令行来调整了。