You are not logged in.

#1 2024-03-07 06:05:56

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Login hangs with Wayland

I am unable to login at all with Wayland. I enter my password and it just hangs. It appears this code in my .bash_profile is causing issues (this presents a prompt asking me to enter my SSH key password at login; I do some part time development involving GitHub and this way I don't have to enter my SSH key password each time I want to push something to GitHub) - when I hit CTRL+ALT+F1 it shows a prompt asking me to enter my password (though nothing happens if I do enter it). If I choose the X11 option instead, it works as expected (enter password, enter SSH key password when prompted, enter KWallet password when prompted).

if [ -z "$SSH_AUTH_SOCK" ] ; then
        eval `ssh-agent -s`
        export SSH_ASK_PASS="/usr/bin/ksshaskpass"
        ssh-add
fi

System info:
HP Pavilion 15cw1068m laptop
AMD Ryzen 5 3500U with Radeon Vega Mobile integrated graphics
16GB of RAM
1TB HDD

Offline

#2 2024-03-07 09:12:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

export SSH_ASKPASS="/usr/bin/ksshaskpass"
eval $(ssh-agent -s)
ssh-add <&-

The environment is wrong, please don't use backticks and your bash_profile seems to assume an interactive shell here.
=> How do you start what wayland compositor (in contrast to X11)

Online

#3 2024-03-07 15:23:48

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

I start Wayland by choosing that option from the lower left corner of the login screen.

Offline

#4 2024-03-07 15:32:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

Ok, "what login screen"?

Online

#5 2024-03-08 04:13:24

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

The KDE login screen. The one you see when you boot up the computer, where you enter your password to login. In the lower left corner there's an option to choose between X11 and Wayland.

Offline

#6 2024-03-08 08:04:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

So SDDM? Is this a KDE6 thing?
Wer're not gonna turn this into a game with twenty questions, please post your complete system journal after trying to log into wayland:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

The bash profile has flaws (see my first post) but is most likely not related to "KDE6 on wayland doesn't work for me", there're a couple of threads on this already.

Online

#7 2024-03-08 15:20:13

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

Offline

#8 2024-03-08 15:35:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

SDDM and you're runnign KDE6 on X11, the journal has several kwalletd6 crashes, but no attempt to log into a wayland session.
You've an AMD gpu, so it's not any nvidia-related issue.

https://bbs.archlinux.org/viewtopic.php?id=293533
https://bbs.archlinux.org/viewtopic.php … 1#p2155191 ?

Otherwise please post a log that covers a wayland login attempt.

Online

#9 2024-03-08 15:59:46

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

As I stated in my initial post, I am unable to login at all when selecting Wayland. I enter my password and it just sits there. I never get past SDDM at all.

Offline

#10 2024-03-08 16:12:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

You shall still try - and then maybe switch to a different VT and post the journal from there.
It's worthless if it doesn't actually cover the failure.

Did you check the link I posted?

Online

#11 2024-03-08 16:59:52

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

As expected, the .bash_profile script is the problem here. It's being run before KDE fully loads so the system is waiting in the background for the password which it never receives. If I remove/comment out that script I can login with Wayland just fine. This might be a better question for the folks at the KDE forum...

Offline

#12 2024-03-08 17:02:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

Did you see comment #2 at all?
The segment in your profile is completely bogus, but I've no idea why it'd cause trouble w/ wayland but not X11

Online

#13 2024-03-09 05:53:10

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

What environment should I be using? This script has worked fine for years.

Last edited by Oldiesmann (2024-03-09 06:15:27)

Offline

#14 2024-03-09 07:29:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

You previously wrote:

Changing the script as you suggested had absolutely no effect on the situation. I have since saved it as a shell script and added it as an autostart thing in KDE, though I"m not sure if it's still doing what I want or not (it no longer prompts me for my SSH key password - instead only prompts me for my wallet password saying that ksshaskpass wants to open the wallet).

How do we factor that into your edit?

The original script used the wrong "SSH_ASK_PASS" variable and running ssh-agent w/ an open stdin will make it ask for the password.
I can't say why but the difference between wayland and X11 would then seem that the stdin isn't closed for whatever runs the .bash_profile there.
So a second change to the script was to explicitly close the stdin for ssh-agent, it *cannot* ask you for a password in this configuration.

Assuming this is relevant to KDE sessions only, the better approach would certainly be ~/.config/plasma-workspace/env/, https://wiki.archlinux.org/title/KDE#Autostart

instead only prompts me for my wallet password saying that ksshaskpass

Because "export SSH_ASKPASS="/usr/bin/ksshaskpass"" now actually does something.
What actually happened before? Where and how have you been asked for your "SSH key password"?

Online

#15 2024-03-09 20:36:57

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

With my initial script, after logging in, I would get a prompt for my SSH password, then shortly after that another one for the wallet password (saying that kde wanted to open the wallet rather than ksshaskpass). Changing the script as you recommended didn't change anything - I still couldn't login when choosing Wayland. It only worked after I commented out the script in .bash_profile (and now works fine as a login script in the KDE autostart thing).

Offline

#16 2024-03-09 21:39:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

after logging in, I would get a prompt for my SSH password

Prompt where and how?
In some interactive text shell? Some GUI dialog? …

What does your autostart sctip look like and where is it placed?
This

export SSH_ASK_PASS="/usr/bin/ksshaskpass"

is wrong.
The correct environment variable is SSH_ASKPASS

And there's no way that

ssh-add <&- # nb. the "<&-" at the end

waits for some input.
"<&-" closes the input.

Wrt. the proposed change, I assume you still kept the "if [ -z "$SSH_AUTH_SOCK" ] ; then" part, right?
(cause you should)

Online

#17 2024-03-10 02:03:56

Oldiesmann
Member
Registered: 2020-04-20
Posts: 24

Re: Login hangs with Wayland

Yes, I kept the "if" part.

The prompt was a GUI dialog.

The autostart script is this:

#!/bin/bash
[[ -f ~/.bashrc ]] && . ~/.bashrc

if [ -z "$SSH_AUTH_SOCK" ] ; then
       eval $(ssh-agent -s)
       export SSH_ASK_PASS="/usr/bin/ksshaskpass"
       ssh-add <&-
fi

It's saved as a .sh file in my user directory then added in the login scripts area of the autostart thing in System Settings.

Offline

#18 2024-03-10 08:37:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,538

Re: Login hangs with Wayland

Does it end up in ~/.config/plasma-workspace/env/ ?

1. You should not have to nor actually source .bashrc there.
2. does it actually make any difference whether you export "SSH_ASK_PASS"*
3. do you have to close the ssh-add input in this context?


*the variable is incorrect, see https://wiki.archlinux.org/title/SSH_ke … th_ssh-add
you can also compare the behavior of "SSH_ASK_PASS=gnarf ssh-add" and "SSH_ASKPASS=gnarf ssh-add", only one of them will pick up "gnarf"

Last edited by seth (2024-03-10 08:37:51)

Online

Board footer

Powered by FluxBB