From 6f2fd4b804c428126e722aa2d865c66abea616b8 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Thu, 7 Apr 2022 14:01:01 +0100 Subject: [PATCH] Add Wayland switching --- debian/changelog | 8 +++++++- raspi-config | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 05aa8f5..43e860d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 07 Mar 2022 09:26:38 +0000 raspi-config (20220303) bullseye; urgency=medium diff --git a/raspi-config b/raspi-config index 373df96..b2109f3 100755 --- a/raspi-config +++ b/raspi-config @@ -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