Add Wayland switching

This commit is contained in:
Simon Long 2022-04-07 14:01:01 +01:00
parent 77a0bacda8
commit 6f2fd4b804
2 changed files with 40 additions and 1 deletions

8
debian/changelog vendored
View File

@ -1,11 +1,17 @@
raspi-config (20220318) UNRELEASED; urgency=medium
raspi-config (20220331) bullseye; urgency=medium
[ Serge Schneider ]
* Remove nonint whiptail msgbox in do_overlayfs
* Update get_boot_cli
* Remove legacy autologin cruft
* Run systemctl daemon-reload after boot behaviour changes
* Make autologin changes quieter
[ Simon Long ]
* Add switching for experimental Wayland backend
* Fix incorrect detection of read-only boot partition
* Force xrandr to reload on non-mutter systems when overscan changed
-- Serge Schneider <serge@raspberrypi.com> Mon, 07 Mar 2022 09:26:38 +0000
raspi-config (20220303) bullseye; urgency=medium

View File

@ -2017,6 +2017,36 @@ do_glamor() {
fi
}
do_wayland() {
DEFAULT=--defaultno
CURRENT=0
if grep -q "^user-session=LXDE-pi" /etc/lightdm/lightdm.conf ; then
DEFAULT=
CURRENT=1
fi
if [ "$INTERACTIVE" = True ]; then
whiptail --yesno "Would you like the Wayland backend to be enabled?" $DEFAULT 20 60 2
RET=$?
else
RET=$1
fi
if [ $RET -eq $CURRENT ]; then
ASK_TO_REBOOT=1
fi
if [ $RET -eq 0 ]; then
sed /etc/lightdm/lightdm.conf -i -e "s/^#\\?user-session.*/user-session=LXDE-pi/"
STATUS=enabled
elif [ $RET -eq 1 ]; then
sed /etc/lightdm/lightdm.conf -i -e "s/user-session.*/#user-session=LXDE-pi/"
STATUS=disabled
else
return $RET
fi
if [ "$INTERACTIVE" = True ]; then
whiptail --msgbox "Wayland is $STATUS" 20 60 1
fi
}
get_net_names() {
if grep -q "net.ifnames=0" $CMDLINE || \
( [ "$(readlink -f /etc/systemd/network/99-default.link)" = "/dev/null" ] && \
@ -3021,6 +3051,7 @@ do_advanced_menu() {
"A5 Network Proxy Settings" "Configure network proxy settings" \
"A6 Boot Order" "Choose network or USB device boot" \
"A7 Bootloader Version" "Select latest or default boot ROM software" \
"A9 Wayland" "Enable experimental Wayland backend" \
3>&1 1>&2 2>&3)
elif is_pi ; then
if is_kms; then
@ -3031,6 +3062,7 @@ do_advanced_menu() {
"A4 Network Interface Names" "Enable/disable predictable network i/f names" \
"A5 Network Proxy Settings" "Configure network proxy settings" \
"A8 Glamor" "Enable/disable glamor graphics acceleration" \
"A9 Wayland" "Enable experimental Wayland backend" \
3>&1 1>&2 2>&3)
else
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \
@ -3060,6 +3092,7 @@ do_advanced_menu() {
A6\ *) do_boot_order ;;
A7\ *) do_boot_rom ;;
A8\ *) do_glamor ;;
A9\ *) do_wayland ;;
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1
fi