Bug 480380

Summary: kwallet not unlocking at login
Product: [KDE Neon] neon Reporter: Doug <dougshaw77>
Component: generalAssignee: Neon Bugs <neon-bugs>
Status: CONFIRMED ---    
Severity: normal CC: a.j.ball, jr, kdelibs-bugs, neon-bugs, net_life, nicolas.fella, php4fan, sitter
Priority: NOR Keywords: qt6
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The popup

Description Doug 2024-01-27 04:05:12 UTC
Created attachment 165264 [details]
The popup

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. login to Plasma session

OBSERVED RESULT
A window asking user to unlock kwallet pops up

EXPECTED RESULT
No popup

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE Neon Testing
(available in About System)
KDE Plasma Version: 5.92.90
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2024-01-27 21:32:01 UTC
This seems to be a problem with how Neon packages kwallet-pam

I had to install libpam-kwallet5 to have the needed pam files
Comment 2 Nicolas Fella 2024-01-27 21:33:03 UTC
*** Bug 479060 has been marked as a duplicate of this bug. ***
Comment 3 Doug 2024-01-28 03:58:25 UTC
(In reply to Nicolas Fella from comment #1)
> This seems to be a problem with how Neon packages kwallet-pam
> 
> I had to install libpam-kwallet5 to have the needed pam files

Doing that fixed the problem for me as well- both at login and starting Falkon.
Comment 4 Jonathan Riddell 2024-01-29 09:14:11 UTC
I've added back libpam-kwallet5 (along side 6) to the Recommends for plasma-workspace now
https://invent.kde.org/neon/kde/plasma-workspace/-/commit/55eb53b8b89157f9fc2ac1af2fb3c7bf14222e9c
Comment 5 Nicolas Fella 2024-02-16 12:43:22 UTC
The packaging looks odd to me. libpam-kwallet6 does not actually contain any useful files
Comment 6 Harald Sitter 2024-02-16 13:39:36 UTC
(In reply to Nicolas Fella from comment #5)
> The packaging looks odd to me. libpam-kwallet6 does not actually contain any
> useful files

It depends on libpam-kwallet-common which contains files.
Comment 7 Nicolas Fella 2024-02-17 08:06:12 UTC
But the actually interesting file (pam_kwallet5.so) is in libpam-kwallet5. I don't see why we need multiple packages in the first place. The 5 in pam_kwallet5.so is purely cosmetic
Comment 8 Alex Ball 2024-03-05 10:49:44 UTC
I was hit by this problem after upgrading KDE Neon User Edition to MegaRelease 6.

- `PAM_KWALLET5_LOGIN` environment variable was not set.
- No socket was created at `/run/user/1000/kwallet5.socket`.
- Therefore the `pam_kwallet_init` script did nothing.

Thanks to this thread, I see this was caused by `libpam-kwallet5` being removed in the upgrade, and not being restored in the fixes released on 2 March.

The issue is that `libpam-kwallet5` is marked and treated as a transitional package:

- Its title now has "- transitional" at the end.
- The description says "This package can be removed."
- Its category is "Libraries - Old"
- It depends on `libpam-kwallet6`.

But since `libpam-kwallet5` contains the file of substance that makes everything work, in reality `libpam-kwallet6` depends on `libpam-kwallet5`.

This looks like a clear case of a packaging error to me. Presumably `pam_kwallet5.so` was intended to move to `libpam-kwallet-common`?
Comment 9 Andrea Ippolito 2024-03-14 16:48:12 UTC
Hello,

sorry to chime in.

Wondering if this issue is the root cause of: https://bugs.kde.org/show_bug.cgi?id=480151

Several upgrading users (Plasma 5 -> 6), me included, are facing this annoying issue for which we have to re-enter our kwallet's pwd at every boot just to have our OS connect to the WiFi network.

Maybe it would be good to merge these tickets into one, and also provide a workaround (if possible at all) while the packaging problem gets sorted out.

Thanks a lot in advance! :)
Comment 10 php4fan 2024-03-14 16:56:15 UTC
> Several upgrading users (Plasma 5 -> 6), me included, are facing this annoying issue

I haven't upgraded to plasma 6; I'm having and always have had this issue on Plasma 5.
On Manjaro, and I think I had it on OpenSUSE TW too  before I switched to Manjaro.
I'm using X11.
Comment 11 Andrea Ippolito 2024-03-14 16:59:14 UTC
Sorry, didn't mean to create confusion here.

I've read your bug report again and indeed the issue didn't appear after a 5->6 upgrade for you.

Although some other comments in your bug report experienced this on that upgrade path.

This is weird...
Comment 12 Alex Ball 2024-03-14 17:31:21 UTC
(In reply to Andrea Ippolito from comment #9)
> Maybe it would be good to merge these tickets into one, and also provide a
> workaround (if possible at all) while the packaging problem gets sorted out.

You're on openSUSE Tumbleweed, aren't you? I can't see what files are included in which packages using the openSUSE package browser, so all I can do is reiterate the files that you need at a minimum:

- pam_kwallet5.so (in libpam-kwallet5 on Neon)
- pam_kwallet_init (in libpam-kwallet-common on Neon)
- pam_kwallet_init.desktop (in libpam-kwallet-common on Neon)
- plasma-kwallet-pam.service (in libpam-kwallet-common on Neon)

As mentioned previously, even under kf6 the working parts here still have "5" in them.
Comment 13 Andrea Ippolito 2024-03-14 17:41:42 UTC
(In reply to Alex Ball from comment #12)
> (In reply to Andrea Ippolito from comment #9)
> > Maybe it would be good to merge these tickets into one, and also provide a
> > workaround (if possible at all) while the packaging problem gets sorted out.
> 
> You're on openSUSE Tumbleweed, aren't you? I can't see what files are
> included in which packages using the openSUSE package browser, so all I can
> do is reiterate the files that you need at a minimum:
> 
> - pam_kwallet5.so (in libpam-kwallet5 on Neon)
> - pam_kwallet_init (in libpam-kwallet-common on Neon)
> - pam_kwallet_init.desktop (in libpam-kwallet-common on Neon)
> - plasma-kwallet-pam.service (in libpam-kwallet-common on Neon)
> 
> As mentioned previously, even under kf6 the working parts here still have
> "5" in them.

Thanks so much!

I got an answer from the opensuse TW support forums as well (thread here: https://forums.opensuse.org/t/plasma-6-upgrade-kwallet-not-unlocked-at-login/173150/7), apparently they are working on a fix:

https://bugzilla.opensuse.org/show_bug.cgi?id=1221371
Comment 14 php4fan 2024-03-14 17:42:04 UTC
> Sorry, didn't mean to create confusion here.

Maybe *I* created some confusion, sorry.
Just to clarify: I understand that for some (if not most) other users the issue appeared only after upgrading. That's why I wanted to chime in to let you know that that wasn't the case for me.
Comment 15 Andrea Ippolito 2024-03-14 17:46:24 UTC
(In reply to php4fan from comment #14)
> > Sorry, didn't mean to create confusion here.
> 
> Maybe *I* created some confusion, sorry.
> Just to clarify: I understand that for some (if not most) other users the
> issue appeared only after upgrading. That's why I wanted to chime in to let
> you know that that wasn't the case for me.

No, no, I definitely did :D

Your report was about Plasma 5 ;)

I just got confused by the follow-up comments saying "me too plasma 6" and since I've already developed a bit of a Plasma 6 tunnel vision following the release for my distro yesterday, I see plasma 6 everywhere now :D
Comment 16 Andrea Ippolito 2024-03-17 19:09:27 UTC
Hi again,

just commenting again to say that at least on opensuse-tumbleweed the problem is solved as of snapshot 20240315.

Bug report was here, for reference:

https://bugzilla.opensuse.org/show_bug.cgi?id=1221371

I wonder if this KDE bug report is still valid at this point @Doug ?
Comment 17 Doug 2024-03-18 06:05:02 UTC
(In reply to Andrea Ippolito from comment #16)
> Hi again,
> 
> just commenting again to say that at least on opensuse-tumbleweed the
> problem is solved as of snapshot 20240315.
> 
> Bug report was here, for reference:
> 
> https://bugzilla.opensuse.org/show_bug.cgi?id=1221371
> 
> I wonder if this KDE bug report is still valid at this point @Doug ?

My problem was fixed with the workaround suggested in comment #1.  Unfortunately, I cannot really check if the problem is fixed in Neon generally without reinstalling at this point.
Comment 18 Alex Ball 2024-03-18 09:31:05 UTC
(In reply to Andrea Ippolito from comment #16)
> I wonder if this KDE bug report is still valid at this point @Doug ?

Expanding on what I said in comment #8, I don't think this Neon bug can be considered fixed until either

- the `libpam-kwallet5` package is marked as substantive/necessary for pam-kwallet functionality as opposed to transitional (the description "This package can be removed" is outright false if you want this to work); OR
- the file `pam_kwallet5.so` (or a new file that does the same thing) is included in one of the packages currently marked as necessary for pam-kwallet functionality: presumably `libpam-kwallet-common` (since it seems to be) but possibly `libpam-kwallet6`.
Comment 19 net_life 2024-08-24 14:20:39 UTC
KDE NOEN with plasma 6.1

Package libpam-kwallet5 provides pam file in wrong location. 
In package it is: /usr/lib/x86_64-linux-gnu/security/pam_kwallet5.so

But, all other pam modules are installed into /lib/x86_64-linux-gnu/security/ , not into /usr/lib ... 

A symbolic link in /lib/x86_64-linux-gnu/security/ to   /usr/lib/x86_64-linux-gnu/security/pam_kwallet5.so makes auto unlock to work again.