Skip to main content
Topic: [WORKAROUND FOUND] kwin 5.11.x blackscreen (Read 4547 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[WORKAROUND FOUND] kwin 5.11.x blackscreen

Starting from the 5.11 version of kwin I've, as result, a blackscreen: only the mouse icon and nothing else. By now its not a great problem, I downgraded at 5.10.5 version and all work. I googled around but I don't find nothing, any idea? This is my PC configuration:

Quote
System:    Host: darkartx01 Kernel: 4.13.9-1-zen x86_64 bits: 64 gcc: 7.2.0
          Desktop: KDE Plasma 5.11.2 (Qt 5.9.2) dm: sddm,sddm Distro: Artix rolling                                             
Machine:  Device: portable System: Dell product: MP061 serial: N/A  Chassis: type: 8 serial: N/A                               
          Mobo: Dell model: 0YD479 serial: N/A BIOS: Dell v: A10 date: 08/26/2009                                               
Battery    BAT0: charge: 73.3 Wh 141.1% condition: 51.9/73.3 Wh (71%) volts: 11.6/11.1
          model: SMP DELLRD8 Li-ion serial: 1984 status: Full cycles: 0
CPU:      Dual core Intel Core2 T7600 (-MCP-) arch: Conroe rev.6 cache: 4096 KB
          flags: (lm nx sse sse2 sse3 ssse3 vmx) bmips: 9313
          clock speeds: min/max: 1000/2333 MHz 1: 2327 MHz 2: 2327 MHz
Memory:    Using dmidecode: root required for dmidecode
Graphics:  Card: NVIDIA G71M [GeForce Go 7950 GTX] bus-ID: 01:00.0 chip-ID: 10de:0297
          Display Server: x11 (X.Org 1.19.5 ) drivers: nvidia (unloaded: modesetting,fbdev)
          Resolution: [email protected]
          OpenGL: renderer: GeForce Go 7950 GTX/PCIe/SSE2 version: 2.1.2 NVIDIA 304.137 Direct Render: Yes

Re: kwin 5.11.x blackscreen

Reply #1
Out of the top of my head and untested: start another DE and launch 'kwin --replace' from a terminal to see any error messages? If it works, the culprit is in the underlying KDE, otherwise kwin will probably show useful errors.

Re: kwin 5.11.x blackscreen

Reply #2
Out of the top of my head and untested: start another DE and launch 'kwin --replace' from a terminal to see any error messages? If it works, the culprit is in the underlying KDE, otherwise kwin will probably show useful errors.

This is the result of sudo kwin_x11 --replace started from LXQT with the last kwin 5.11.2-1. I tried to google something, but I wasn't lucky. Nothing out there...

Quote
[francesco@darkartx01 ~]$ sudo kwin_x11 --replace
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 12583076, major code: 20 (GetProperty), minor code: 0
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Config timer connecting...
QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 12583076, major code: 20 (GetProperty), minor code: 0
Setting the name of  0x559a1f910740  to  "org.kde.ActivityManager.Resources.Scoring"
Creating directory:  "/root/.local/share/kactivitymanagerd/resources/"
KActivities: Database connection:  "kactivities_db_resources_140326652993152_readwrite"
    query_only:          QVariant(qlonglong, 0)
    journal_mode:        QVariant(QString, "wal")
    wal_autocheckpoint:  QVariant(qlonglong, 100)
    synchronous:        QVariant(qlonglong, 1)
Setting the name of  0x559a1f951db0  to  "org.kde.ActivityManager.ActivityTemplates"
Setting the name of  0x559a1f918c20  to  "org.kde.ActivityManager.RunApplication"
OpenGL vendor string:                  NVIDIA Corporation
OpenGL renderer string:                GeForce Go 7950 GTX/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 304.137
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                NVIDIA
Driver version:                        304.137
GPU class:                              NV40/G70
OpenGL version:                        2.1.2
GLSL version:                          1.20
X server version:                      1.19.5
Linux kernel version:                  4.13.9
Requires strict binding:                no
GLSL shaders:                          limited
Texture NPOT support:                  yes
Virtual Machine:                        no
kf5.kcoreaddons.desktopparser: Property type "Url" is not a known QVariant type. Found while parsing property definition for "X-KWin-Video-Url" in "/usr/share/kservicetypes5/kwineffect.desktop"
detected kglobalaccel restarting, re-registering all shortcut keys
Service started, version: 7.0.0
Cleaning up...
QXcbConnection: XCB error: 3 (BadWindow), sequence: 1397, resource id: 12582916, major code: 18 (ChangeProperty), minor code: 0
kf5.kcoreaddons.kdirwatch: Cannot watch QRC-like path ":/icons/hicolor/index.theme

Re: kwin 5.11.x blackscreen

Reply #3
This is the result of sudo kwin_x11 --replace started from LXQT with the last kwin 5.11.2-1. I tried to google something, but I wasn't lucky. Nothing out there...

I am going to guess that kwin as of 5.11 is defaulting to wayland and due to nvidia not supporting wayland properly, you get the nvidia black screen.
https://www.phoronix.com/scan.php?page=news_item&px=Streams-vs-GBM-Toolkits

Gnome does shimy nvidia to work with wayland, but KDE doesn't have the resources to deal with nvidia's unwanted fork of wayland support.
https://www.phoronix.com/scan.php?page=news_item&px=GNOME-Mutter-Mainline-EGLStream

Here is some sources of the 5.11 changes:
https://www.phoronix.com/scan.php?page=news_item&px=KDE-Plasma-5.11
https://www.phoronix.com/scan.php?page=news_item&px=Plasma-5.12-Wayland-Release

Try:
Code: [Select]
Clean cache to resolve upgrade problems

The problem may be caused by old cache. Sometimes after an upgrade, the old cache might introduce strange, hard to debug behaviour such as unkillable shells, hangs when changing various settings and several other problems such as ark being unable to unrar or unzip or amarok not recognizing any of your music. This solution can also resolve problems with KDE and Qt programmes looking bad following upgrade.

Rebuild your cache with the following commands:

$ rm ~/.config/Trolltech.conf
$ kbuildsycoca5 --noincremental
From: https://wiki.archlinux.org/index.php/KDE#Clean_cache_to_resolve_upgrade_problems

And also:
Code: [Select]
Graphical related problems
Plasma keeps crashing with legacy Nvidia

This is caused by a bug in Plasma when using the Nvidia-304xx driver. Rather than disabling compositing, create a file kwin.sh in ~/.config/plasma-workspace/env/ with the following contents:

#!/bin/sh
export KWIN_EXPLICIT_SYNC=0

Then go to System Settings > Startup and Shutdown > Autostart and Check/Add the script as a pre-KDE startup file.
From: https://wiki.archlinux.org/index.php/KDE#Plasma_keeps_crashing_with_legacy_Nvidia

Xywa of Gentoo had a similiar problem with nvidia. Maybe that will help?
Quote from: Xywa
Ladies and Gentelman,
:D 8) :D

After 4 months nearly at the end, ONE more things to resolve - but Plasma 5 works finally with Optimus (on 1 account only), but I need your help with last problem (bellow).

Bellow are also my tips (apart from previous posts) for other users struggling with Optimus and what I did:

[1] Try it on new user account:
There was a clue on Arch forum called "Clean cache (KDE) to resolve upgrade problems".
https://wiki.archlinux.org/index.php/KDE#Clean_cache_to_resolve_upgrade_problems
- As I described in post above, in main account, after "startx" I could see only KDE login screen for few seconds, and then infamous black screen.
- Also in previous post I said, that with new account, I could finally start KDE, but I did not see mouse-pointer. In reality, the mouse-pointer was on the righ edge of the screen, looks like there was another "virtual" screen, next to right-side of my laptop screen. I could see it for a moment on the edge (when I was moving a mouse), and sometimes I could even move a window from this area outside a laptop screen into a screen.

[2] Check user groups
- So I decide to make a video, as explanation above looks bit complicated, so I decided for video purpose to create another new user (by 'useradd') just for video purpose. After that I could not a start KDE, so I though maybe I need to check the groups. So I added this user after 'useradd' to such new groups: wheel, audio, video, cdrw, users, portage, polkitd, gamestat. After 'startx' I had... !!!working KDE Plasma5 with Optimus!!! :D 8) :D 8) Tested with games on Steam :)

source: https://forums.gentoo.org/viewtopic-t-1042882-start-0.html

Re: kwin 5.11.x blackscreen

Reply #4
I am going to guess that kwin as of 5.11 is defaulting to wayland and due to nvidia not supporting wayland properly, you get the nvidia black screen.
.............

I tried all these hints but nothing: with 5.11 only black screen. I need to try yet the last, to discover if its true that kwin 5.11 redirect the screen on a different external screen. Maybe, but I'm not so acquainted... :)

Thanks' for your support.

What I don't understand, as an old K&R C programmer that wrote a bunch of low level software, how is possible a similar degradation. Now I'm no more so efficient, with languages, but the temptation to compare the sources is great... I like KDE, but I'm thinking seriously to send this so pretty environment, to visit the moon (....) and to migrate at Cinnamon, less fancy but, probably, more solid.

PS: if somebody have an idea, I'm here... :)

Re: kwin 5.11.x blackscreen

Reply #5
Googling around I founded a first part of the "workaround" in NixOS site.

If I create in ~/.config/plasma-workspace/env/a.sh, with the contents:

export KWIN_COMPOSE=X #usable value are O O1 O2 O2ES X N Q
export KWIN_EXPLICIT_SYNC=0

make it executable, verify that it is added in Startup and Shutdown --> Autostart -> with the parameter "Before session startup"
now kwin 5.11 work, but ok, with Xrender and not with Opengl, also if in your "Display and Monitor" setting you have selected opengl.

I've no idea where is the problem if in nvidia-opengl or in kwin. Due to the fact that the problem is present with almost ALL the nvidia driver, legacy or not, I imagine that the bug is a kwin problem, unable to understand which compositor manager to use.

Maybe that, with different nvidia driver (I'm using the 304 legacy) you must use different parameter for the KWIN_COMPOSE. Later I'll retry O2 and O2ES.

UPGRADE: for my configuration, nvidia 304, all work ONLY with KWIN_COMPOSE=X

 

Re: [WORKAROUND FOUND] kwin 5.11.x blackscreen

Reply #6
UPGRADE 2: I continue the text with KWIN parameters and the result is:
1) the GUI appear also with KWIN_COMPOSE=N #no compositor
2) I tested also other parameters and now my a.sh file is
export KWIN_COMPOSE=N
export KWIN_EXPLICIT_SYNC=0
export KWIN_TRIPLE_BUFFER=1
export KWIN_DIRECT_GL=1
3) all is working and seems also better than before; by now...
4) there was a strange behavior with KWIN_COMPOSE=X. With this parameter is activated Xrender despite opengl and Xrender use the CPU and, despite the fact that the last Xrender version has better performance, you must have an overhead of your CPU. Ok, nothing similar for me, the CPU temperature and usage % is the same and growth the GPU temperature. Very strange and another IT mystery to investigate :)
5) the parameter having a real effect, to solve the black screen problem, is KWIN_COMPOSE