Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
KDE5: kwin not starting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Fri Dec 30, 2016 1:39 am    Post subject: KDE5: kwin not starting Reply with quote

Good evening,

I'm a long timer gentoo user, but didnt update my system for over a year. I finally decided that it was long overdue and to do a good use of my Christmas time to put it up to date.

I'll spare you all the issues I went through and tackled already (not mentioning openrc, qt5, new gcc, sddm, kde5); but apparently this last one I cant tackle alone.

When I sign in sddm, I got the KDE5 desktop (which is ugly like hell IMO), but apparently kwin_x11 does not kick in by itself. If I start a konsole I can start it, and finally get the window decoration/manager which allow me to "move them", minimize them, etc. But somehow, it should be starting on its own.

I went through xsession errors, dmesg, /var/log/messages, /var/log/xorg... and could not find anything wrong. I have obviously searched on this board as I do most of the time (and thanks for helpers here because i solve almost all my issues with the search function!), but i need assistance on that one!

On a side question: anyone know how to "resize" the "folder view" which I was using a lot it KDE4? Apparently I cant resize them in KDE5...

Let me know what you need from me and i'll share the relevant piece of code.

Kindest Regards,
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Fri Dec 30, 2016 1:39 pm    Post subject: Reply with quote

Still digging:

I was not sure if kwin_x11 was not starting at all, or if it was crashing just before i could even see window decoration.

I put a wrapper around it (renaming kwin_x11 into kwin_x11.bin, and creating a bash script that would log an entry into /tmp and call the .bin). From what I see, it is not being called at all.

Does anyone know which file should usually call kwin? I would like to trace one level up to see why it is not being called.
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Fri Dec 30, 2016 2:16 pm    Post subject: Reply with quote

More progress..

Spotted an error:
/usr/bin/startkde: line 157: kapplymousetheme: command not found

This lead me to an obscure old bug (bug 13883 - https://bugs.mageia.org/show_bug.cgi?id=13883) in the early development of plasma5.. but anyway their troubleshooting helped me to figure out that the problem seems to be related to ksmserver.

If i manually launch ksmserver, then kwin gets kick and things seems to work.

However i still dont quite know what to do about the kapplymousetheme, as i dont know from which package it is coming from (equery b wasnt helpful).

Also, launching ksmserver throws the following which i am investigating right now:
Code:

QXcbConnection: XCB error: 9 (BadDrawable), sequence: 1978, resource id: 0, major code: 14 (GetGeometry), minor code: 0
QXcbConnection: XCB error: 9 (BadDrawable), sequence: 1979, resource id: 0, major code: 14 (GetGeometry), minor code: 0
QXcbConnection: XCB error: 9 (BadDrawable), sequence: 1980, resource id: 0, major code: 14 (GetGeometry), minor code: 0
....


I'm rebuilding the xcb lib just in case, and will look at dbus for the kapplymouse
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6831
Location: Austria

PostPosted: Fri Dec 30, 2016 2:56 pm    Post subject: Reply with quote

How did you install plasma and how do you start it?
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Fri Dec 30, 2016 2:58 pm    Post subject: Reply with quote

i simply did a massive emerge -DuN world, and got it all.

About starting it, I dont do anything in particular. I had to change kdm to sddm, and sddm is kicking it (it it set as default in the sddm drop down)
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Fri Dec 30, 2016 4:11 pm    Post subject: Reply with quote

(still digging)

Okay from what i see, clearly KSMserver is not launched post logging in sddm.
If i manually launch ksmserver from konsole, then everything show up properly (and kwin_x11 is launched)

Going through various log, and spotting the following. I dont know how much they can be relevent or not.
Meanwhile, I also commented out the kapplymousetheme line from startkde so I dont see the error. I have no clue what it was supposed to be doing here. As per my research, this was part of a kde4 package and do not "exist" in any recent packages.. ?!

in .xsessionerror:
Code:

powerdevil: Core is ready, registering various services on the bus...
powerdevil: Can't contact systemd

... and I dont have systemd. ?!

in var log messages:
Code:

Dec 30 10:51:42 be sddm-helper[4008]: PAM unable to dlopen(/lib64/security/pam_systemd.so): /lib64/security/pam_systemd.so: cannot open shared object file: No such file or directory
Dec 30 10:51:42 be sddm-helper[4008]: PAM adding faulty module: /lib64/security/pam_systemd.so

... sort of deja vu?

finally looking at sddm.log:
Code:

[10:51:41.448] (II) DAEMON: Initializing...
[10:51:41.452] (II) DAEMON: Starting...
[10:51:41.452] (II) DAEMON: Adding new display on vt 7 ...
[10:51:41.454] (II) DAEMON: Display server starting...
[10:51:41.454] (II) DAEMON: Running: /usr/bin/X -nolisten tcp -auth /var/run/sddm/{e552e367-4e0d-4611-8456-89ff74c146ed} -background none -noreset -displayfd
 18 vt7
[10:51:42.428] (II) DAEMON: Running display setup script  "/usr/share/sddm/scripts/Xsetup"
[10:51:42.432] (II) DAEMON: Display server started.
[10:51:42.432] (II) DAEMON: Socket server starting...
[10:51:42.433] (II) DAEMON: Socket server started.
[10:51:42.433] (II) DAEMON: Greeter starting...
[10:51:42.433] (II) DAEMON: Adding cookie to "/var/run/sddm/{e552e367-4e0d-4611-8456-89ff74c146ed}"
[10:51:42.438] (II) HELPER: [PAM] Starting...
[10:51:42.438] (II) HELPER: [PAM] Authenticating...
[10:51:42.438] (II) HELPER: [PAM] returning.
[10:51:42.440] (II) DAEMON: Greeter session started successfully
[10:51:42.524] (II) DAEMON: Message received from greeter: Connect
[10:51:54.999] (II) DAEMON: Message received from greeter: Login
[10:51:54.999] (II) DAEMON: Reading from "/usr/share/xsessions/plasma.desktop"
[10:51:54.999] (II) DAEMON: Session "/usr/share/xsessions/plasma.desktop" selected, command: "/usr/bin/startkde"
[10:51:55.013] (II) HELPER: [PAM] Starting...
[10:51:55.013] (II) HELPER: [PAM] Authenticating...
[10:51:55.018] (II) HELPER: [PAM] Preparing to converse...
[10:51:55.018] (II) HELPER: [PAM] Conversation with 1 messages
[10:51:55.143] (II) HELPER: [PAM] returning.


therefore, from my reading, sddm is launching startkde succesfully (which is coming from kde-plasma/plasma-workspace-5.8.3-r4 and not a legacy kde4).

Unless anyone else has suggestions, I'll start chasing through startkde why ksmserver is not launched..
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6831
Location: Austria

PostPosted: Fri Dec 30, 2016 5:06 pm    Post subject: Reply with quote

Do you have plasma-meta installed? Can you reproduce the issue with a new user?
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Fri Dec 30, 2016 5:06 pm    Post subject: Reply with quote

Partially found the problem

in /usr/bin/startkde script near by line 385, you get the following block:
Code:

# finally, give the session control to the session manager
# see kdebase/ksmserver for the description of the rest of the startup sequence
# if the KDEWM environment variable has been set, then it will be used as KDE's
# window manager instead of kwin.
# if KDEWM is not set, ksmserver will ensure kwin is started.
# kwrapper5 is used to reduce startup time and memory usage
# kwrapper5 does not return useful error codes such as the exit code of ksmserver.
# We only check for 255 which means that the ksmserver process could not be
# started, any problems thereafter, e.g. ksmserver failing to initialize,
# will remain undetected.
test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM"
# If the session should be locked from the start (locked autologin),
# lock now and do the rest of the KDE startup underneath the locker.
KSMSERVEROPTIONS=""
test -n "$dl" && KSMSERVEROPTIONS=" --lockscreen"
[b]kwrapper5 /usr/bin/ksmserver $KDEWM $KSMSERVEROPTIONS[/b]
if test $? -eq 255; then
 # Startup error
  echo 'startkde: Could not start ksmserver. Check your installation.'  1>&2
  test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
  xmessage -geometry 500x100 "Could not start ksmserver. Check your installation."
fi


The block does a basic check if $KDEWM is set, and if so, it calls ksmserver with --windowmanager and the content of the variable.

I would expect this one to be empty, but apparently at runtime, it is set to kwin (and not kwin_x11), therefore ksmserver doest start properly.

I temporarly changed the file so now ksmserver is starting; but i would really appreciate if someone has an idea where this could have been set to kwin in order to correct it at the right place!
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Sun Jan 01, 2017 1:09 pm    Post subject: Reply with quote

asturm wrote:
Do you have plasma-meta installed? Can you reproduce the issue with a new user?


@asturm: Hi, sorry apparently i missed your post because we both posted at about the same time.

yes, i do have plasma-meta indeed
Code:

[ebuild   R    ] kde-plasma/plasma-meta-5.8.3:5::gentoo  USE="display-manager pam sddm wallpapers -bluetooth -grub -gtk -handbook -networkmanager -plymouth -pulseaudio -sdk" 0 KiB


However i havent tested with a new user, which is a good idea. I'll test this out and update you!
Back to top
View user's profile Send private message
Sharp_Rulez
n00b
n00b


Joined: 17 Sep 2006
Posts: 34

PostPosted: Sun Mar 05, 2017 5:15 pm    Post subject: Reply with quote

Sorry to bring this back. Apparently my workaround worked too well so I forgot i had that issue until I emerge world again and my fix disappeared from /usr/bin/startkde

So, I created a new account to test and diagnose of my problem is system related, or profile related. Unfortunately, the new account shown the following error after KDE login:
"Plasma is unable to start as it could not correctly use OpenGL 2. Please check that your graphic drivers are set up correctly."

I did search about this "new issue" (likely unrelated with the current one though). Found plenty of people having problem with Plasma/sddm/nvidia proprietary driver. Funny enough, I do not have this problem with my normal account with plasma/sddm/nvidia (except this kwin issue). OpenGL is working fine. I park that one because I do not really care and I'm the only user of my workstation.

Back to this current problem and made some more research. My finding are the following:
- When "startkde" shell script is kicked, the variable KDEWM is UNSET
- If that variable is "empty/unset", the script attempt to run "kwin" as window manager
- kwin does not exist anymore, it has been replaced by "kwin_x11" and "kwin_wayland".
- Therefore I get into kde without window manager

My simple fix was to set KDEWM=kwin_x11 in /usr/bin/startkde; and it worked (until i emerged world).
New temporary fix: ln -s kwin_x11 kwin (working, but still not naildown the rootcause).

Questions
1) who (what application/script/session manager?) should set KDEWM?
2) should startkde attempt to run kwin_x11 instead of kwin as the latter does not exist anymore (bug?).

I also checked that I got the latest version of this file. The header actually show "DEFAULT KDE STARTUP SCRIPT ( 5.8.5 )"

Kind Regards,
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum