Wayland是Ubuntu 17.10的默认显示服务器“ 在支持的系统上”。但是,我如何知道我的平台是否被支持并且我真正使用的是Wayland?
echo $XDG_SESSION_TYPE
wayland
。mesa-utils-extra
并运行es2gears_wayland
。如果应用程序运行,那么你正在使用Wayland。xeyes
。如果光标位于X或XWayland窗口上,眼睛会移动。env | grep -i wayland
echo $DESKTOP_SESSION
gnome-wayland
ubuntu-wayland # Ubuntu 20.10
gnome
并且正在运行 Wayland。 - code_monk设置 > 关于 > 窗口系统
在Ubuntu 21.04上,您还可以从设置GUI中查看它(Win键,输入设置,选择。可执行文件名:gnome-control-center
),这很好。
该系统的默认值是Wayland,21.04似乎是第一个使用Wayland作为默认值的版本:https://www.omgubuntu.co.uk/2021/01/ubuntu-21-04-will-use-wayland-by-default
如果我按照提到的方法切换到X11,如在Ubuntu 17.10中如何从Wayland切换回Xorg?所述,它会显示:窗口系统:X11
而不是Wayland。
然而,正如在Ubuntu 21.04中如何启用Wayland?所提到的,如果Ubuntu检测到您没有硬件支持,它会默认回退到X11。
此外,NVIDIA 460驱动程序不支持Wayland,一旦安装它,X11将成为您唯一的选择。
顺便说一句,21.04迷你ISO安装版(其中包含Wayland但没有NVIDIA驱动程序,需要手动安装)存在一个已知的bug,会导致我的用户界面每隔一天崩溃一次:Ubuntu UI screen image freezes randomly during usage after fresh 21.04 install, suspecting Wayland or Nouveau,使其无法使用。当我安装了NVIDIA驱动并使用X11时,问题就停止了。xrandr
会显示不同的监视器名称。xrandr --listmonitors
# On Ubuntu: 0: +*eDP-1 4384/344x2466/193+3840+0 eDP-1
# On Ubuntu-wayland: 0: +XWAYLAND0 1920/340x1080/190+0+0 XWAYLAND0
echo $WAYLAND_DISPLAY
,只有在Wayland下才会打印出一个文本(比如wayland-0
)。
pgrep Xorg
或者类似的ps -ef | grep " :0"
命令。 - Ravexina