User probably not correctly recognized

I have several strange behavior in my PC after upgrading to plasma 6.
The main is still the power commands not working. Yesterday I thought to have resolved, creating a new user (because the problem is of a given user, not for others), and after “converting” it to the same name and the same id num (in etc/group and etc/pswrd) of my previous user.
This solutions seemed work. After a while it didn’t work any more, after a while no, after a while yes: a mess.
In particular the logout via terminal (loginctl terminate-user john → qdbus org.kde.ksmserver /KSMServer logout 0 0 1) gives me a blank screen.

I think that the “restored” user (the same name in all my devices, this is why I want to keep it) has something wrong: but what?
How should I check if this user is correctly recognized by the system?


I did this attempt to check what could be wrong:

sudo w duns
[sudo] password for duns: 
 09:38:37 up 18 min,  2 users,  load average: 0,92, 0,67, 0,45
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
duns     tty1     -                09:20   18:01   0.03s  0.03s /usr/bin/startplasma-wayland
duns     pts/3    -                09:38    0.00s  0.01s  0.03s sudo w duns

I add that every time, after the login, I see the welcome center, as if it was the first time.