[SRU Regression] SDDM display inset patch crashes

Bug #2009074 reported by Erich Eickmeyer
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sddm (Ubuntu)
Fix Released
Critical
Erich Eickmeyer
Jammy
Fix Released
Critical
Erich Eickmeyer
Kinetic
Fix Released
Critical
Erich Eickmeyer
Lunar
Fix Released
Critical
Erich Eickmeyer

Bug Description

[ Impact ]

Reports have come in regarding the Xsetup script in sddm crashing with the following error since the previous patch in LP: #1998254:

 ./Xsetup.O: 15: Syntax error: word unexpected (expecting ")")

This was due to an array being set, which was not supported by sh. However, the script was developed for bash, but the shebang was still for sh.

Once changed to #!/bin/bash, it was good to go.

[ Test Case ]

Run /usr/share/sddm/scripts/Xsetup from a terminal
Script will fail with ./Xsetup.O: 15: Syntax error: word unexpected (expecting ")")

Additionally, bug fixed in LP: #1998254 will not be fixed.

[ Where things could go wrong ]

Apparently, things that could go wrong in the bug that was supposed to be fixed in #1998254 did go wrong (fix was ineffective), but with the correct script handler (bash), this should be fixed. However, I do concede that even then, after much testing, things could still not work quite right.

[ Other Information ]

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: sddm 0.19.0-3ubuntu2
ProcVersionSignature: Ubuntu 5.19.0-1012.13-lowlatency 5.19.7
Uname: Linux 5.19.0-1012-lowlatency x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
ApportVersion: 2.26.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Thu Mar 2 11:32:33 2023
InstallationDate: Installed on 2021-03-20 (711 days ago)
InstallationMedia: Ubuntu-Studio 21.04 "Hirsute Hippo" - Alpha amd64 (20210320)
SourcePackage: sddm
UpgradeStatus: Upgraded to lunar on 2022-12-18 (74 days ago)

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :
Changed in sddm (Ubuntu Jammy):
status: New → In Progress
Changed in sddm (Ubuntu Kinetic):
status: New → In Progress
Changed in sddm (Ubuntu Jammy):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in sddm (Ubuntu Kinetic):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in sddm (Ubuntu Jammy):
importance: Undecided → Critical
Changed in sddm (Ubuntu Kinetic):
importance: Undecided → Critical
Changed in sddm (Ubuntu Lunar):
importance: Undecided → Critical
Changed in sddm (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: jammy kinetic
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello Erich, or anyone else affected,

Accepted sddm into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sddm/0.19.0-3ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in sddm (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in sddm (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Erich, or anyone else affected,

Accepted sddm into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sddm/0.19.0-2ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sddm - 0.19.0-3ubuntu3

---------------
sddm (0.19.0-3ubuntu3) lunar; urgency=medium

  * Patch Xsetup script to use bash (LP: #2009074)
    - Allows previous patch to actually run as it
      requires arrays

 -- Erich Eickmeyer <email address hidden> Thu, 02 Mar 2023 11:26:21 -0800

Changed in sddm (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Michael Mikowski (kfocus) wrote :

I have verified the fix in Jammy at Erich's request. A test of /usr/share/sddm/scripts/Xsetup shows the `#!/bin/sh` interpreter was having an issue with the bash-isms of the pasted script:

```
sudo ./Xsetup
#> running NVIDIA Prime setup /sbin/prime-offload
#> ./Xsetup: 15: Syntax error: word unexpected (expecting ")")
```

One can find the original bash script here: https://github.com/kfocus/kfocus-source/blob/JJ-2023-03/package-main/usr/lib/kfocus/bin/kfocus-sddm-setup

The updated interpreter, `#!/bin/bash`, fixes the problem:

```
sudo ./Xsetup
running NVIDIA Prime setup /sbin/prime-offload
=====
[00006] BEGIN report
[00220] Pre-adjust xrandr monitor output:
Monitors: 4
 0: +*HDMI-0 3840/600x2160/340+0+0 HDMI-0
 1: +DP-1 3840/600x2160/340+3840+0 DP-1
 2: +DP-3 3840/600x2160/340+7680+0 DP-3
 3: +eDP-1-1 2560/344x1440/193+0+0 eDP-1-1
[00223] SetList created:
eDP-1-1|2560|1440|11520|0
[00338] SetList applied
[01345] Post-adjust xrandr monitor output:
Monitors: 4
 0: +*eDP-1-1 2560/344x1440/193+11520+0 eDP-1-1
 1: +HDMI-0 3840/600x2160/340+0+0 HDMI-0
 2: +DP-1 3840/600x2160/340+3840+0 DP-1
 3: +DP-3 3840/600x2160/340+7680+0 DP-3
=====
```

I also confirmed the fix with a functional test illustrated by the attached image. The too is before the update; notice how the inset at the TL is a mirror of the laptop screen. The bottom is after update, and the screens no longer overlap.

tags: added: verification-done verification-done-jammy verification-done-kinetic
removed: verification-needed verification-needed-jammy verification-needed-kinetic
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Erich, where is the kinetic verification? Michael tested jammy in comment #5, not kinetic.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Terribly sorry, meant to comment and got distracted. The goal was that the script would actually run. I was able to verify that in a VM myself and it validates the previous SRU. The functionality was already known to actually work.

If this SRU isn't allowed through on the script actually running alone, then it allows the bug of the script simply failing to exist, which is an even bigger problem as one would have to revert what is already in kinetic updates. AFAIK, that's not allowed.

From my standpoint, it's better to have a script that actually runs and does what it's meant to do as opposed to simply letting it error and crash.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hi Erich,

my comment was more about the lack of a statement on the kinetic testing. What we look for is an execution of the proposed test plan with the package in proposed for the ubuntu release under test.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Tested in Kinetic:
sddm-0.19.0-3ubuntu1.2

Script runs as it should.

Verification Done.

(sorry, meant to do this earlier, got sidetracked)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I verified the test results and am satisfied that they show the executed planned test case, and that the results are correct.

The package built correctly in all architectures and Ubuntu releases it was meant for.

There are no DEP8 tests for this package.

There is no SRU freeze ongoing at the moment affecting this SRU, which is for kinetic and jammy only.

There is no halted phasing on the previous update.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sddm - 0.19.0-3ubuntu1.2

---------------
sddm (0.19.0-3ubuntu1.2) kinetic; urgency=medium

  * Patch Xsetup script to use bash (LP: #2009074)
    - Allows previous patch to actually run as it
      requires arrays

 -- Erich Eickmeyer <email address hidden> Thu, 02 Mar 2023 12:24:58 -0800

Changed in sddm (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for sddm has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sddm - 0.19.0-2ubuntu2.3

---------------
sddm (0.19.0-2ubuntu2.3) jammy; urgency=medium

  * Patch Xsetup script to use bash (LP: #2009074)
    - Allows previous patch to actually run as it
      requires arrays

 -- Erich Eickmeyer <email address hidden> Thu, 02 Mar 2023 12:34:28 -0800

Changed in sddm (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.