重启后 kwin 的窗口装饰突然无法显示了

本来好好的,重启后 kwin5 的窗口装饰和边框都没显示了

Module 'org.kde.kwin.decoration' does not contain a module identifier directive - it cannot be protected from external registrations.

虽然没显示,但鼠标点上去按钮什么的位置还是有效的


~/.config/kwinrc里的

[org.kde.kdecoration2]
library=org.kde.kwin.aurorae

尝试去掉后,让它用默认装饰运行,没问题。上面那条错误也没有了。

查找 aurorae

.config/auroraerc
.kde4/share/apps/aurorae
.kde4/share/config/auroraerc
.kde4/share/apps/knewstuff3/aurorae.knsregistry


那么,为什么这个装饰主题会突然失效?

我目前没有安装 kde 对应的设置组件,无法打开 kde 窗口管理器的设置界面。我应该安装什么包?

  1. kcmshell5 —list 看下有什么 module,然后 kcmshell5 xxx 随便一个,看终端输出,aurorae 主题引擎的问题会提示错误的。
  2. 试试安装 systemsettings5

设置窗口才出来还没绘图完全,就卡住,然后崩溃了

$ systemsettings5 

(systemsettings5:32183): Gtk-WARNING **: 无法在模块路径中找到主题引擎:“xfce”,
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
failed to acquire GL context to resolve capabilities, using defaults..
WARNING: viewBackgroundColor is deprecated, use backgroundColor with colorSet: Theme.View instead
KActivities: Database connection:  "kactivities_db_resources_140530817901184_readonly" 
    query_only:          QVariant (qlonglong, 1) 
    journal_mode:        QVariant (QString, "wal") 
    wal_autocheckpoint:  QVariant (qlonglong, 100) 
    synchronous:         QVariant (qlonglong, 0)
Nothing to load - the client id is empty
file:///usr/share/kpackage/genericqml/org.kde.systemsettings.sidebar/contents/ui/introPage.qml:90:27: Unable to assign [undefined] to QString
file:///usr/share/kpackage/genericqml/org.kde.systemsettings.sidebar/contents/ui/introPage.qml:90:27: Unable to assign [undefined] to QString
file:///usr/share/kpackage/genericqml/org.kde.systemsettings.sidebar/contents/ui/introPage.qml:90:27: Unable to assign [undefined] to QString
file:///usr/share/kpackage/genericqml/org.kde.systemsettings.sidebar/contents/ui/introPage.qml:90:27: Unable to assign [undefined] to QString
file:///usr/share/kpackage/genericqml/org.kde.systemsettings.sidebar/contents/ui/introPage.qml:90:27: Unable to assign [undefined] to QString
Failed to create OpenGL context for format QSurfaceFormat (version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior (DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile (NoProfile)) 
KCrash: Application 'systemsettings5' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

[1]+  已停止               systemsettings5

QSocketNotifier: Invalid socket 9 and type 'Read', disabling...
QSocketNotifier: Invalid socket 21 and type 'Read', disabling...
QSocketNotifier: Invalid socket 10 and type 'Read', disabling...

(systemsettings5:32183): GLib-GIO-ERROR **: inotify read (): 错误的文件描述符
$ kcmshell5 kwindecoration

(kcmshell5:32296): Gtk-WARNING **: 无法在模块路径中找到主题引擎:“xfce”,
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
QGLXContext: Failed to create dummy context
Plugin changed to:  "org.kde.breeze"
Calling KPluginInfo::property ("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName () in "/usr/lib64/qt5/plugins/org.kde.kdecoration2/breezedecoration.so" instead.
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
Factory:  true
file:///usr/share/kwin/kcm_kwindecoration/Previews.qml:37: ReferenceError: savedIndex is not defined
Setting  active : false
Setting  providesContextHelp : true
Setting  active : false
Setting  providesContextHelp : true
Setting  active : false
Setting  providesContextHelp : true
Setting  active : false
Setting  providesContextHelp : true
file:///usr/share/kwin/kcm_kwindecoration/Buttons.qml:150: ReferenceError: iconLabel is not defined
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
file:///usr/share/kwin/kcm_kwindecoration/Previews.qml:37: ReferenceError: savedIndex is not defined
Plugin changed to:  "org.kde.kwin.aurorae"
Calling KPluginInfo::property ("X-KDE-PluginInfo-Name") is deprecated, use KPluginInfo::pluginName () in "/usr/lib64/qt5/plugins/org.kde.kdecoration2/breezedecoration.so" instead.
QString::arg: 1 argument (s) missing in 无法解析%2 中的符号“%2”:%3
Factory:  true
Module 'org.kde.kwin.decoration' does not contain a module identifier directive - it cannot be protected from external registrations.
Setting  width : -8
Setting  height : -33
Setting  width : -8
Setting  height : -33
Setting  width : 352
Setting  height : 192
Setting  width : 352
Setting  height : 192
Setting  caption : "Plastik"
Setting  width : 342
Setting  width : 302
Setting  height : 152
Setting  height : 142
Setting  caption : "Plastik"
Setting  active : false
Setting  width : 312
Setting  width : 302
Setting  height : 182
Setting  height : 142
file:///usr/share/kwin/kcm_kwindecoration/Buttons.qml:150: ReferenceError: iconLabel is not defined
Failed to create OpenGL context for format QSurfaceFormat (version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior (DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile (NoProfile)) 
KCrash: Application 'kcmshell5' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

[1]+  已停止               kcmshell5 kwindecoration


然而!!!!!!
optirun 就可以打开设置界面了!
optirun kwin_x11 也没问题!!!!(上面那条错误信息仍然有)

在不使用 optirun 的情况下,试了几个不同装饰主题,只有微风是可以显示的!

集显:

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
	Subsystem: Lenovo Device 21fc
	Kernel driver in use: i915
	Kernel modules: i915

三个问题:

  1. 你的 GTK 引擎也不存在,引擎名叫 xfce?真的秀…这是装了多少个 DE?
  2. 那一堆 .qml 文件的错误已经提示你位置了,去看看,大概率是 .qml 文件中使用了当前系统 Qt 版本还不存在或早已淘汰的函数或属性。不过上游和 openSUSE KDE 很难出现这种由于 Qt 版本升级造成的兼容性错误,所以严重怀疑你的 Qt 版本跟 KDE 版本不是来自同一个源。
  3. Failed to create OpenGL context 100% 跟你的显卡驱动有关系。集显用不了 OpenGL 你可以切换成 XRender
  1. 我不是用的 kde,桌面是 xfce,wm 用 kwin,这样很多年了。(GTK 那个警告一直以来都有,这么多年了没什么问题)
  2. 这个我去看看
  3. 一直用的是 xrender,刚刚又看了一遍设置里,是 xrender。不知道它现在为什么去搞 opengl
  1. 真的秀
  2. 问题还是在这儿,OpenGL 是 Qt 去调用来画界面的,现在 .qml 解析不了,往后看没有用了(好比写程序替换文本中的字符串,文本都打开出错再去研究为什么替换作业也报错没有意思,前置条件错了后面全是随机)