Bug 272834 - deskutils/plasma5-sddm-kcm: Automatically login: settings are no longer applied
Summary: deskutils/plasma5-sddm-kcm: Automatically login: settings are no longer applied
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL: https://www.freshports.org/security/k...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-07-31 05:11 UTC by Graham Perrin
Modified: 2023-08-18 19:01 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments
screenshot: keyhole icon (403.51 KB, image/png)
2023-08-17 06:16 UTC, Graham Perrin
no flags Details
screenshot: closing System Settings (715.08 KB, image/png)
2023-08-17 06:23 UTC, Graham Perrin
no flags Details
screenshot: PolicyKit1 KDE Agent dialogue (889.81 KB, image/png)
2023-08-17 06:32 UTC, Graham Perrin
no flags Details
recent pkg upgrades (22.40 KB, text/plain)
2023-08-17 06:37 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2023-07-31 05:11:48 UTC
Steps: 

1. check the box to enable the feature

2. pull down the first menu

3. select the required user

4. pull down the next menu

5. select Plasma (X11)

6. Apply

7. restart the computer

Expected: 

8. automated login

Actual result: 

8. SDDM.

Observation: 

- if I recall correctly, there should be an authentication dialogue 
  at, or before, step 6.

% pkg iinfo deskutils/plasma5-sddm-kcm
plasma5-sddm-kcm-5.27.6
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT amd64 1400093 #1 main-n264312-789df254cc9e-dirty: Tue Jul 25 09:49:23 BST 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 1400093 1400093
%
Comment 1 Florian Walpen 2023-08-10 10:02:54 UTC
For me an authentication dialog appears. It seems to come through sysutils/plasma5-polkit-kde-agent-1 - is that installed?

May also be related to sddm session problems like bug #272637.
Comment 2 Graham Perrin 2023-08-10 11:32:39 UTC
(In reply to Florian Walpen from comment #1)

Automated, and up-to-date: 

% pkg query -e '%a = 1' %o | grep plasma5-polkit-kde-agent
sysutils/plasma5-polkit-kde-agent-1
% pkg iinfo sysutils/plasma5-polkit-kde-agent-1
plasma5-polkit-kde-agent-1-5.27.6
% 

<https://www.freshports.org/sysutils/plasma5-polkit-kde-agent-1/#history>
Comment 3 Graham Perrin 2023-08-10 11:49:30 UTC
Additionally: 

- a click on the 'Open KDE Wallet Button' is visibly recognised (the button 
  darkens, briefly) but has no functional effect.

(I don't intend to change settings, but I was curious about the button.)

Then: 

- if I use the application dashboard or application launcher to open 
  'KDE Wallet', System Settings presents a pre-switch dialogue 
  (Apply, Discard, Cancel).
Comment 4 Graham Perrin 2023-08-10 12:10:35 UTC
(In reply to Graham Perrin ◐ from comment #3)

After closing System Settings (not attempting to save changes), I can use application dashboard or application launcher to open KWalletManager. 

This starts a run of 
/usr/local/bin/kwalletmanager5 
and then a single-click on the system tray icon for Wallet Manager opens the Wallet Manager window. A simple single click on the Open button, within the window, presents the KDE Wallet Service dialogue, and then entry of my passphrase successfully opens the 'kdewallet' wallet. 

However: 

- the system tray icon context menu option 'Configure Wallet…' has 
  no effect.
Comment 5 Graham Perrin 2023-08-10 13:05:54 UTC
(In reply to Graham Perrin ◐ from comment #4)

At some point, it became impossible to close the kdewallet wallet without force. I refrained from force. 

Then, probably coincidence (maybe bug 271945), the system froze, so I forced an ungraceful stop of the computer. 

----


That was whilst using GENERIC-NODEBUG main-n264621-09c20a293280 (boot environment n264621-09c20a293280-c), I aimed to boot n264621-09c20a293280-a but misread things in the loader menu and briefly booted a much earlier environment. I'm now, as intended, on n264621-09c20a293280-a: 

% date ; uptime ; grep BOOT /var/log/messages
Thu 10 Aug 2023 13:41:03 BST
 1:41p.m.  up 6 mins, 5 users, load averages: 2.00, 0.97, 0.41
Aug 10 02:25:57 mowa219-gjp4-8570p-freebsd kernel: ---<<BOOT>>---
Aug 10 02:33:10 mowa219-gjp4-8570p-freebsd kernel: ---<<BOOT>>---
Aug 10 11:07:27 mowa219-gjp4-8570p-freebsd kernel: ---<<BOOT>>---
Aug 10 13:25:54 mowa219-gjp4-8570p-freebsd kernel: ---<<BOOT>>---
Aug 10 13:36:13 mowa219-gjp4-8570p-freebsd kernel: ---<<BOOT>>---
% bectl list -c creation | tail -n 4
n264312-789df254cc9e-g -      -          1.20G 2023-08-07 05:02
n264621-09c20a293280-a NR     /          438G  2023-08-09 05:30
n264621-09c20a293280-b -      -          73.9M 2023-08-09 13:54
n264621-09c20a293280-c -      -          1.64G 2023-08-10 02:12
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT amd64 1400094 #2 main-n264621-09c20a293280-dirty: Wed Aug  9 02:15:02 BST 2023     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400094 1400094
% zpool status -x
all pools are healthy
% zpool iostat -v 5
…


----

Without opening System Settings, I: 

1. opened KWalletManager

2. used the system tray to open Wallet Manager

3. used Wallet Manager to open the wallet.

Then, IIRC: 

4. System Settings ▶ Login Screen (SDMM) ▶ Behaviour ▶ 
   Automatically log in: ☑ as user: grahamperrin with session Plasma (x11)

5. Open KDE Wallet Settings

– this did successfully bring the (already open) Wallet Manager window 
  to the front.

----

Subsequent clicks on the button, in System Settings, do not bring forward Wallet Manager _however_ the Wallet Manager icon in task manager _does_ change colour, so it's like there's limited interaction.
Comment 6 Florian Walpen 2023-08-11 19:02:59 UTC
(In reply to Graham Perrin ◐ from comment #5)

I can't follow you - my (limited) understanding is that KWallet is completely unrelated to the authentication required to store system settings. The message there only informs you that you cannot use your login password to open KWallet, if you don't provide a password at login (autologin).
So these are separate problems, I think.

Do other DBUS system services work, e.g. can you restart or shutdown the machine from the application menu? See bug #272637.
Comment 7 Graham Perrin 2023-08-14 13:54:31 UTC
(In reply to Florian Walpen from comment #6)

> … can you restart or shutdown the machine from the application menu? See 
> bug #272637.

I was not bugged there; please see bug 272637 comment 2.
Comment 8 Florian Walpen 2023-08-14 16:13:34 UTC
(In reply to Graham Perrin ◐ from comment #7)

Ok, I suppose you'd have to find out why the polkit authentication dialog doesn't show. With the latest polkit / sddm changes, I get the following processes when trying to save the autologin settings:

> # ps dax | grep -C 3 polkit
>  1913  -  Is     0:00.01 |-- /usr/sbin/cron -s
>  1929  -  Is     0:00.00 |-- sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups (sshd)
>  1967  -  S      0:00.13 |-- /usr/local/sbin/console-kit-daemon --no-daemon
>  1969  -  S      0:00.20 |-- /usr/local/lib/polkit-1/polkitd --no-debug
>  1980  -  I      0:00.00 |-- dbus-launch --autolaunch 08d6ac166876fc12ec42d1e45c71389a --binary-syntax --clo
>  1981  -  Is     0:00.00 |-- /usr/local/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7
>  1984  -  I      0:00.30 |-- /usr/local/bin/bsdisks --no-debug --syslog-output
> --
> 93545  -  S      0:00.12 |         | | `-- /usr/local/lib/firefox/firefox -contentproc -childID 12 -isForBro
> 63473  -  S      0:03.65 |         | `-- /usr/local/bin/systemsettings
>  2084  -  S      0:00.35 |         |-- /usr/local/lib/libexec/org_kde_powerdevil
>  2086  -  S      0:00.79 |         |-- /usr/local/lib/libexec/polkit-kde-authentication-agent-1 (polkit-kde-
> 64621  -  S      0:00.01 |         | `-- /usr/local/lib/polkit-1/polkit-agent-helper-1 flo (polkit-agent-hel
>  2087  -  S      0:00.62 |         |-- /usr/local/bin/kaccess
>  2091  -  S      0:00.16 |         |-- /usr/local/bin/gmenudbusmenuproxy
>  2092  -  S      0:01.46 |         |-- /usr/local/lib/libexec/DiscoverNotifier

With the first part at root level and the second inside the user session. Pid 64621 is the authentication dialog, I think.
Comment 9 Graham Perrin 2023-08-17 06:16:44 UTC
Created attachment 244160 [details]
screenshot: keyhole icon

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

> … - if I recall correctly, there should be an authentication dialogue …

Following an update to the OS, and upgrades to packages: 

- after opening Login Screen (SDDM), the Apply button bears a keyhole icon.

IIRC this icon was not present before the most recent round of upgrades to packages …
Comment 10 Graham Perrin 2023-08-17 06:23:01 UTC
Created attachment 244161 [details]
screenshot: closing System Settings

… and a PolicyKit1 KDE Agent dialogue will appear when required. 

In this screenshot, aiming to close System Settings presents a dialogue (modal to Systems Settings) with a more ordinary Apply button without a keyhole icon …
Comment 11 Graham Perrin 2023-08-17 06:32:46 UTC
Created attachment 244162 [details]
screenshot: PolicyKit1 KDE Agent dialogue

… application at time of closure is followed by closure, then appearance of the PolicyKit1 KDE Agent dialogue. 

This dialogue is transient, may disappear before a passphrase can be typed. 

I guess, disappearances are by design – timeouts (very good).
Comment 12 Graham Perrin 2023-08-17 06:35:50 UTC
(In reply to Graham Perrin ◐ from comment #3)

> …
>  
> - a click on the 'Open KDE Wallet Button' is visibly recognised 
>   (the button darkens, briefly) but has no functional effect.
> 
> …

(In reply to Florian Walpen from comment #6)

> … my (limited) understanding is that KWallet is completely unrelated to 
> the authentication required to store system settings. …

It does seem so. Thanks.
Comment 13 Graham Perrin 2023-08-17 06:37:25 UTC
Created attachment 244163 [details]
recent pkg upgrades
Comment 14 Graham Perrin 2023-08-17 06:42:14 UTC
Closing as overcome by events. 

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

> recent pkg upgrades

With reference to the attached list: if someone can positively identify the package – or packages – that fixed this bug, it might be very helpful. 

----

Since this bug 272834 is no longer apparent, a new bug is exposed. I'll make a separate report …
Comment 15 Florian Walpen 2023-08-17 09:25:21 UTC
(In reply to Graham Perrin ◐ from comment #14)

Can't tell for sure, but I'd bet that the problem was introduced by the update to sddm 0.20.0, and got fixed through the recent work by Gleb Popov on polkit, consolekit2 and sddm.

Please note that the problem regarding /usr/local/etc/pam.d/sddm-autologin* config files still persists for me, see bug #272649.
Comment 16 Graham Perrin 2023-08-17 18:21:35 UTC
(In reply to Florian Walpen from comment #15)

> … problem regarding /usr/local/etc/pam.d/sddm-autologin* config files 
> still persists for me, …

Maybe open a new bug report. Better than continuance in something that's closed?
Comment 17 Florian Walpen 2023-08-17 19:31:18 UTC
(In reply to Graham Perrin ◐ from comment #16)

I only saw your new bug #273174 after I wrote this, and it looks very much like what Gleb Popov attempted to fix in bug #272649. I would reopen the latter if I could, since all the context is there. But Gleb got a message anyway, he's still in CC. So for me this is solved, as in "my self-built self-patched packages work" and the maintainer knows about it.

Now about your problem, just check your sddm-autologin config files, then you know whether it's the thing from bug #272649. If it is, feel free to use my follow-up patch from bug #272649. I don't care in which bug report this proceeds, just trying to be helpful :)
Comment 18 Graham Perrin 2023-08-18 19:01:29 UTC
(In reply to Florian Walpen from comment #17)

👍 thanks for the help!