Opensuse Leap 42.1 – Nvidia – KDE 5 – unregelmäßiger Crash des Windowmanagers

Der KDE Plasma-Desktop von Opensuse Leap 42.1 macht mir immer wieder erhebliche Schwierigkeiten. Leider auch bzgl. elementarer Dinge wie etwa der Bedienbarkeit der Fenster. Ich habe zwar den neuesten proprietären Treiber von Nvidia installiert; der hilft aber ebensowenig wie ältere Treiber oder ein Wechsel von OpenGL 2.0 zu OpenGL 3.1:

Bei Drag- und Drop-Aktionen mit komplexeren Applikationen wie etwa “kontact” oder Eclipse auf dem Desktop zerreißt es manchmal den Windowmanager. Danach haben sämtliche Fenster keine Bedienleiste mehr.

Ähnliches passiert auch bei Änderungen der Fensterdekoration über die KDE-“Systemeinstellungen”.

Es ist nun nicht notwendig, sich nach einem solchen desaströsen Vorfall ab- und wieder anzumelden. (Leider funktioniert nämlich auch das Abmelden nicht verlässlich … ). Solange man noch ein Terminalfenster öffnen kann, kann man den Windowmanager erneut starten.

Man muss dazu jedoch wissen, das sich das Kommando geändert hat. Statt “kwin &” ist das jetzt zu verwendende Kommando:

ich@mytux:~> kwin_x11 &

Ich hoffe, dieser Tipp hilft dem einen oder anderen.

Linux – Dell U2515H – questions regarding KDE adjustments and older graphics cards

Some months ago I wrote 2 blog articles about the use of (multiple) DELL U2515H screens on a Nvidia GTX750 TI graphics card on a Linux system.

Linux – Nvidia GTX 750 TI – Parallelbetrieb von 2 Dell U2515H mit 2560×1440 plus einem 1920×1200 Schirm
Linux – Nvidia GTX 750 TI – Dell U2515H – HDMI – 2560×1440 Pixel

Last week a reader, who had found these blog articles, asked me the following:

I am currently using a Dell U2412m with 1920×1200 resolution but I am planning to upgrade to a 2560×1440 and thought about the U2515H but I am a bit worried about how Plasma shows on such a high dpi panel. Do you have any issue with interface elements which are showed too small and are not tuneable?

Second thing I am a bit worried of my GTS 450 performance but I will upgrade my video card after the new nVidia series is launched.

I found these questions interesting and present my answers in form of this blog contribution.

Warning statement regarding older graphics cards

Before I get to the question regarding KDE and a high resolution screen as the DELL U2515H I want to make a warning statement:

The graphics card you want to use together with a Dell U2515H and the graphics card drivers MUST support high resolution HDMI (vers. 1.4, 2.0) or display port connections. Reason: The Dell U2515 does NOT provide any DVI connections!

Do not underestimate this topic for older graphics cards! Actually, I had very bad experiences in the past with a GTX 460 which provides a mini HDMI port: I never got a high resolution HDMI connection to run with this card (not under Opensuse 13.1/13.2). Despite high quality cables and in contrast to another system with a GTX 750 TI. And I really tried a lot of settings and driver versions until I gave up.

And note: Even the GTX 750TI required some effort and fiddling – but eventually it worked. This is the reason why I wrote about it.

So, if you have some money and want to avoid frustration with the DELL U2515H, I would suggest to buy a reasonable modern card which offers support for (several) display ports and/or high resolution HDMI. If gaming under Linux is not a topic (as in my case) but still some 3D applications or CUDA floating point operations are part of your work then presently a GTX 960 or the GTX 750 could be a reasonable alternative regarding the price-value relation. But look out for the number of ports supported – especially if you want to use several screens.

KDE and high resolution screens in general

It is quite clear that a screen resolution of 2560×1440 will significantly reduce the visible size of fonts and desktop elements scaled with font size. So, what you need is a very flexible scalability of fonts both for the desktop and window control elements as well as for applications you use.

The question whether Linux desktops as KDE are prepared for high resolution screens was also posed in an article with the title “Skaliert” (Scaled) published in the German “linuxuser” 10/2015. See http://www.linux-community.de/Internal/Artikel/Print-Artikel/LinuxUser/2015/10/Skaliert. Unfortunately, this article costs money to read it online. Actually, relatively small problems were described for KDE. This is very consistent with my own experience with both KDE 4.14 and KDE 5.x.

You can adjust almost all required basic font settings for the KDE desktop via KDE’s “systemsettings” and in addition most
applications offer scrollable and relatively seamless font scaling (e.g. via mouse scrolling). Playing around with font smoothing plus an enforcement of dpi resolution may pay off in case you care for smooth font displaying. (Actually I never had to apply any special contrast settings of the screen itself beyond standards for the screen to get a clear, but nevertheless smooth font display).

The spectrum of applications I primarily use consists of a mixture of QT and GTK applications:

KDE konsole and other terminal emulations, different types of graphical KDE file editors, different types of browsers (primarily FF and chromium), libreoffice, eclipse mars, aptana studio, SVN frontends, crossover with ms office applications, vmware with different types of guests, kvm with different types of guests, sound and multimedia applications, blender, etc., etc.

Almost all of my favorite applications offer internal font adjustment capabilities and the typical graphical elements of these applications scale seamlessly with font size. So, no reason to worry about KDE and its plasma desktop: In my opinion KDE is well prepared for high resolution screens.

A problem may, however, be the smooth integration of some GTK applications (as e.g. eclipse) into high resolution KDE, which is based on QT – but also there you have sufficient options with different GTK themes – and most of the problems I had were independent of the screen resolution and more GTK theme dependent. You may have to play around a bit with KDE’s settings for GTK integration – especially with the choice of the GTK design or GTK theme.

KDE and screens with different resolutions

A real problem in my opinion may result from a mixture of 2 screens with different (!) native resolutions. There is no way known to me to apply different font-settings to different screens on a KDE desktop comprising several screens in form of a Nvidia Xinerama combination.

As long as I used 2 screens – one with a resolution of 1920×1200 and one with 2560×1440 – I really suffered a bit from the display discrepancies regarding font size. Especially when I wanted to open several windows of one and the same application – as 2 windows of Eclipse – on both screens or whenever I wanted to stretch one application (e.g. VMware) over the 2 screens. You may try to find compromises – but it will never be perfect.

However, in my present daily work with 3 screens – 2 with 2560×1440 and 1 with 1920×1200 – the different display of font sizes may become even an advantage: Just by moving an application to the lower resolution screen you get a better view on details. (But I admit, this is pure luxury, not only for development work.)

Nevertheless it would be fun if KDE in the future could provide a possibility to adjust font-sizes per screen in a Xinerama version.

Performance?

I do not know exactly how a GTS 450 graphics card performs. But my guess is that even for 2 screens (with 2560×1440) performance for the simple 3D effects of a plasma desktop should be no topic at all – even for this card. Actually, it is really frustrating that you cannot use high resolution HDMI with older graphics cards – despite the fact that the graphics card may support a combined resolution of 2 x 2560×1440 for DVI capable screens and provide a sufficient performance for it.

I should, however, mention that for three screens (2 x 2560×1440, 1x 1920×1200) my GTX 750 TI works constantly with high frequencies of both CPU and memory. The card never reduces this frequencies during normal use – so it will consume more electrical power than in a 2 screen situation. For 2 screens at 2560×1440 it always reduced frequencies to lower levels when only 2D applications were used on the desktop. However, despite constant high frequencies I never noticed any heat problem under normal conditions. The ventilators operate at basic speed and temperatures are between 36 and 40 &
deg; Celsius.

With high resolution 3D games you may have a different experience – but if I play (which is seldom) I never play with extreme resolutions. So, actually I do not know how high resolution games perform on a (3D) KDE desktop.

Summary

Regarding the use of KDE with the DELL U2515H in my opinion you need not worry about font scalability and performance. You should worry more about the support of high resolution HDMI and display ports by both the physical card and the drivers for older Nvidia cards. A combination of a DELL U2515H with a screen of lower resolution will lead to problems – as visible font sizes may differ significantly.

Remark, added 17.12.2015:
Meanwhile I had the chance to test a Nvidia GTX 960 from Gigabyte together with 2 DELL U2515H connected via display port and a 1920×1200 screen connected via DVI. Works without any problems. And I see no problems with native Linux 3D OpenGL games as Red Eclipse or Xonotic at high resolutions so far. Temperatures around 43° Celsius.

Nvidia Treiber, KDE-Plasma-Desktop 4.14, Tearing-Effekt: Triple Buffering einschalten!

Meine Leser wissen, dass ich bzgl. des Linux-Desktops auf KDE setze. Den HW-technischen Unterbau liefern in meinen privaten Systemen, die ich meist selbst aufbaue, Nvidia-Grafikkarten. In der Regel verwende ich dafür den proprietären Treiber, dessen Modul ich über das Installationsskript von Nvidia kompilieren und installieren lasse. (Mit der unangenehmen Konsequenz eines “tainted” Kernel – aber das nur nebenbei).

Dieser Artikel betrifft ein Plasma-Problem, das ich auf Desktop-Systemen hatte. (Der Artikel bezieht sich nicht auf Laptop-Systeme mit Optimus-Technologie.) Seit geraumer Zeit (schätzungsweise seit KDE 4.12 bis heute unter KDE 4.14.9) plagte mich folgender, immer wiederkehrender Fehler:

Nach dem Starten des KDE Plasma Desktops mit aktivierten 3D-Effekten (OpenGL) – kam es bei der Bewegung von bestimmten Fenstern immer wieder zum sogenannten “Tearing”-Effekt. Besonders deutlich sichtbar wurde der für Fensterbegrenzungslinien von “konsole” oder Fenstern mit komplexeren GTK-Anwendungen. Dies erwies sich als unabhängig von der Voreinstellung der des OpenGL Composite Typs und des Qt-Grafiksystems (“native” oder “raster” Rendering)

Erstaunlicherweise verschwand dieser Effekt bei mir ebenso regelmäßig, wenn ich unter den KDE Systemeinstellungen auf dem Panel zu “Arbeitsflächen-Effekte” >> “Erweitert” eine der dortigen Einstellungen änderte und auf “Anwenden” drückte. Danach war für diese X-Sitzung Ruhe. Bei der Einstellungsänderung wurde offenbar etwas erkannt, was beim normalen KDE-Start nicht der Fall war). Aber solche manuellen Eingriffe bei jedem Start von KDE sind natürlich nervig.

Zufällig bin ich in anderem Zusammenhang vor ein paar Tagen über folgende Bug-Artikel gestolpert:
https://bugs.kde.org/show_bug.cgi?id=322060
https://bugs.kde.org/show_bug.cgi?id=330794
https://bugs.kde.org/show_bug.cgi?id=343184

Dadurch animiert habe ich nun mal “Triple Buffering” explizit in die “xorg.conf” eingetragen. Der Installer von Nvidia tut das nämlich nicht von sich aus. Er bewegte aber den einmal vorgenommenen händischen Eintrag bei der nächsten Treiber-Installation interessanterweise aus der “Device Section” in die “Screen Section”:

Auszug aus der /etc/X11/xorg.conf”:

Section "Screen"

    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: nvidia-auto-select +5120+0, HDMI-0: nvidia-auto-select +0+0, HDMI-1: nvidia-auto-select +2560+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    Option         "TripleBuffer" "true"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

 
Man erkennt hier, das ich Xinerama für 3 Schirme nutze. Der interessante Eintrag ist aber:

Option “TripleBuffer” “true”

Ich kann nur sagen:

Seitdem ist jegliches Tearing auf meinem 3-Schirme-Desktop verschwunden – ohne weitere Zusatzmaßnahmen und egal, was ich unter “Arbeitsflächen-Effekte” >> “Erweitert” für Einstellungen zum Punkt “Einzelbild-Zerreißen (Tearing) verhindern (Vsync)” einstelle. Auch ein spezieller Export der Umgebungsvariablen “__GL_YIELD” wie in einem der Bug-Reports beschrieben, erwies sich unter KDE 4.14 als überflüssig – diese Umgebungsvariable ist bei mir gar nicht gesetzt.

r
So einfach – man muss es halt nur wissen! Mein Dank an alle, die sich um diesen Bug in seinen verschiedenen Ausprägungen gekümmert haben! Ein schönes Beispiel dafür, dass der Open Source Prozess auch im Zusammenspiel mit Closed Source Komponenten funktioniert – auch wenn es manchmal etwas dauert.