Bug 272649 - x11/sddm: following the upgrade to 0.20.0, Plasma (X11) no longer starts – /usr/local/etc/pam.d/sddm-autologin – auth required pam_env.so
Summary: x11/sddm: following the upgrade to 0.20.0, Plasma (X11) no longer starts – /u...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gleb Popov
URL: https://www.freshports.org/x11/sddm/
Keywords:
: 273174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-22 01:09 UTC by Graham Perrin
Modified: 2023-09-01 00:25 UTC (History)
3 users (show)

See Also:


Attachments
Konsole session transcript, including ouput from 'service sddm onestart' within a typescript file (4.15 KB, text/plain)
2023-07-22 01:09 UTC, Graham Perrin
no flags Details
Fix sddm autologin, patch the right template file. (1.95 KB, patch)
2023-08-15 16:43 UTC, Florian Walpen
no flags Details | Diff
Fix sddm autologin, patch the right template file. (1.74 KB, patch)
2023-08-15 16:50 UTC, Florian Walpen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2023-07-22 01:09:42 UTC
Created attachment 243534 [details]
Konsole session transcript, including ouput from 'service sddm onestart' within a typescript file

Symptoms comparable to bug 271630 comment 0, 

> … black screen with a cursor … 

I struggled to remember where I had seen a workaround. 

Eventually, I realised that symptoms here were slightly different – blank screens, no cursor – then I found post-closure bug 272297 comment 3, in particular: 

> … don't have pam_env.so …

After commenting out a line, normal service resumed with SDDM. Notes attached.
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2023-07-27 11:06:16 UTC
Related upstream pull request [1]. I'll fix the port once it lands.

[1] https://github.com/sddm/sddm/pull/1772
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-08-13 11:59:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=493a1a00b7447310444b1596d30d27307ef076d2

commit 493a1a00b7447310444b1596d30d27307ef076d2
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-08-07 18:00:11 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-08-13 11:57:40 +0000

    x11/sddm: Fix sddm-autologin PAM service.

    While there, remove patching in favor of a CMake variable.

    PR:             272649
    Sponsored by:   Serenity Cybersecurity, LLC

 x11/sddm/Makefile                                | 4 ++--
 x11/sddm/files/patch-services_sddm-autologin.pam | 9 ++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)
Comment 3 Graham Perrin 2023-08-14 15:59:20 UTC
(In reply to comment #1 and comment #2)

Thanks!

(In reply to Graham Perrin ◐ from comment #0)

> … After commenting out a line, normal service resumed with SDDM. …

Interestingly, Plasma (X11) does start with that line – in /usr/local/etc/pam.d/sddm-autologin – no longer commented out, although re: <https://www.freshports.org/x11/sddm/#history> I do not yet have 0.20.0_1 or 0.20.0_2. 

% pkg iinfo x11/sddm
sddm-0.20.0
%
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2023-08-14 16:15:22 UTC
(In reply to Graham Perrin ◐ from comment #3)
> sddm-0.20.0

My commit bumps PORTREVISION, so it should be sddm-0.20.0_1
Comment 5 Graham Perrin 2023-08-14 16:42:19 UTC
(In reply to Gleb Popov from comment #4)

Yep, I have not yet built from ports (the FreeBSD-provided package is still at 0.20.0 for FreeBSD:14:amd64 <https://www.freshports.org/x11/sddm/#packages>).
Comment 6 Florian Walpen 2023-08-15 16:16:21 UTC
(In reply to commit-hook from comment #2)

For me the patch from this commit is ineffective. I think this is because the CMakeLists.txt there installs the sddm-autologin-tally2.pam, not sddm-autologin.pam, under condition that HAVE_PAM_FAILLOCK is false (pam_faillock.so not found).
Comment 7 Florian Walpen 2023-08-15 16:43:24 UTC
Created attachment 244123 [details]
Fix sddm autologin, patch the right template file.

I now use the patch above on top of your commit. It just patches sddm-autologin-tally2.pam, not sddm-autologin.pam. You could also patch the CMakeLists.txt instead, of course.

This effectively changes the installed /usr/local/etc/pam.d/sddm-autologin.default for me.
Comment 8 Florian Walpen 2023-08-15 16:50:09 UTC
Created attachment 244124 [details]
Fix sddm autologin, patch the right template file.

Sorry, that patch was incomplete - updated.
Comment 9 Graham Perrin 2023-08-18 19:00:06 UTC
Reopen per bug 272834 comment 17 (thanks).

Also, 273174 might be a duplicate of this bug 272649.
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-08-27 11:18:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=97fda573d33daad946ef08bea1ccb5bc777c9d3b

commit 97fda573d33daad946ef08bea1ccb5bc777c9d3b
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-08-27 11:09:43 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-08-27 11:17:20 +0000

    x11/sddm: Fix patch for sddm-autologin.

    PR:             272649
    Sponsored by:   Serenity Cybersecurity, LLC

 x11/sddm/Makefile                                                   | 2 +-
 ..._sddm-autologin.pam => patch-services_sddm-autologin-tally2.pam} | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 11 Graham Perrin 2023-09-01 00:22:24 UTC
*** Bug 273174 has been marked as a duplicate of this bug. ***
Comment 12 Graham Perrin 2023-09-01 00:25:24 UTC
Confirmed working, following my first pkg upgrade on FreeBSD 15.0-CURRENT. 

Thanks!


% grep sddm\ upgraded /var/log/messages
Aug 31 22:21:44 mowa219-gjp4-8570p-freebsd pkg[5711]: sddm upgraded: 0.20.0_2 -> 0.20.0_3 
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 15.0-CURRENT FreeBSD 15.0-CURRENT amd64 1500000 #9 main-n265053-315ee00fa961-dirty: Mon Aug 28 03:23:49 BST 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1500000 1500000
%