Bug 399143 - widgets/lineedit displays no text
Summary: widgets/lineedit displays no text
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Theme - Breeze (show other bugs)
Version: 5.12.5
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: 1.0
Assignee: visual-design
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-09-27 13:17 UTC by Gleb Popov
Modified: 2019-11-08 04:52 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Plasma Theme Explorer on startup (29.71 KB, image/png)
2019-03-26 22:10 UTC, groot
Details
Scroll down to widgets/lineedit (59.33 KB, image/png)
2019-03-26 22:10 UTC, groot
Details
.. enter text (60.03 KB, image/png)
2019-03-26 22:10 UTC, groot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Popov 2018-09-27 13:17:13 UTC
When I open Breeze theme in Plasma Theme Viewer and select widgets/lineedit item, I can't see any text I type into a preview. As if the font color is white. Characters are certainly get typed in, because I can select them (the white space corresponding to them), copy&paste, etc.

At first, I had this problem only in kscreenlocker_greet password prompt and was thinking that it is a feature. However, after updating to recent Plasma, the KRunner's input field also started having this issue. This is why I'm suspecting QtQuick.

SOFTWARE VERSIONS
KDE Plasma Version: 5.12.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1
Comment 1 Kai Uwe Broulik 2018-09-27 16:17:07 UTC

*** This bug has been marked as a duplicate of bug 396813 ***
Comment 2 Gleb Popov 2018-09-27 18:09:43 UTC
This is not a duplicate. I'm talking about not a placeholder text, but the text that is typed into lineedit.

Anyway, applying workaround patch from referenced bug changes nothing in my case. In fact, this patch is already applied.
Comment 3 David Edmundson 2018-10-01 22:56:09 UTC
Does it happen for a new user?
Comment 4 Gleb Popov 2018-10-06 07:53:24 UTC
Yes, these lineedits don't display entered text for newly created user too.
Comment 5 Andrew Crouthamel 2018-10-27 04:10:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Gleb Popov 2018-10-27 08:27:49 UTC
Forgot to set Status to REPORTED.
Comment 7 Gleb Popov 2018-11-21 11:31:35 UTC
Another FreeBSD user met the same bug when using SDDM:

http://www.ulbsd.ru/devel/sddm1.png vs http://www.ulbsd.ru/devel/sddm2.png

The interesting thing is that everything works fine when he uses nvidia proprietary driver. However, when switching to VESA driver, the bug appears.

On my side, I run intel driver, so I think this is FreeBSD- or driver-specific prolem. Feel free to close this bug, but any input would be really helpful.
Comment 8 Nate Graham 2018-11-24 15:16:06 UTC
That's not the Breeze theme that's depicted there...

Probably a downstream issue of some sort.
Comment 9 Serge Volkov 2018-11-25 13:24:41 UTC
I investigated the problem. And it is not driver bug.

If you use "renderType: Text.NativeRendering" for all text fields, the bug disappears and everything looks fine. For example, for lockcreen, you can make the following changes to the MineBlock.qml file:

1. Add to the top
    import QtQuick.Controls.Styles.Plasma 2.0 as Styles
2. Add to the PlasmaComponents.TextField
    Styles.TextFieldStyle {
        renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
    }

Also, you cannot use the ShaderEffect if the VESA driver is used. I deleted it from the UserDelegate.qml.

The same problems in the qml source files of sddm. I made a lot of changes to these files regarding renderType and the problem for me was solved.

These problems do not depend on the theme (Breeze or not - does not matter), because the problem is in the SddmComponents qml files. For all text fields, you need to add a renderType property.
Comment 10 Serge Volkov 2018-11-25 13:32:01 UTC
I made a mistake in the previous comment. It should be not MineBlock.qml, but MainBlock.qml.
Comment 11 David Edmundson 2018-11-25 17:34:17 UTC
These comments don't make sense together.

>Yes, these lineedits don't display entered text for newly created user too.

> If you use "renderType: Text.NativeRendering" for all text fields, the bug disappears 

Which would be the default for a new user
Comment 12 Gleb Popov 2018-11-25 18:26:14 UTC
(In reply to Serge Volkov from comment #9)
> 
> 1. Add to the top
>     import QtQuick.Controls.Styles.Plasma 2.0 as Styles
> 2. Add to the PlasmaComponents.TextField
>     Styles.TextFieldStyle {
>         renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering :
> Text.NativeRendering
>     }

Maybe I did something wrong, but this didn't help me. Characters in screenlocker's textbox are still invisible.
Comment 13 Serge Volkov 2018-11-25 18:33:35 UTC
(In reply to David Edmundson from comment #11)
> These comments don't make sense together.
> 
> >Yes, these lineedits don't display entered text for newly created user too.
> 
> > If you use "renderType: Text.NativeRendering" for all text fields, the bug disappears 
> 
> Which would be the default for a new user

I made this comment because my problems with sddm and screenlocker look the same. See https://mail.kde.org/pipermail/kde-freebsd/2018-November/030091.html
Comment 14 Serge Volkov 2018-11-25 18:37:55 UTC
(In reply to Gleb Popov from comment #12)
> (In reply to Serge Volkov from comment #9)
> > 
> > 1. Add to the top
> >     import QtQuick.Controls.Styles.Plasma 2.0 as Styles
> > 2. Add to the PlasmaComponents.TextField
> >     Styles.TextFieldStyle {
> >         renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering :
> > Text.NativeRendering
> >     }
> 
> Maybe I did something wrong, but this didn't help me. Characters in
> screenlocker's textbox are still invisible.

Please, write to me by e-mail sv at ulbsd.ru. I will explain in Russian.
Comment 15 Serge Volkov 2018-11-25 22:11:25 UTC
I continued to investigate and found that the problem is even deeper. If I use a VESA driver and go into System Settings -> Desktop Behavior -> Desktop Effects, then there is no text in the list of effects. And I think that there are many such components in plasma5 desktop.

I found a solution here https://stackoverflow.com/questions/43369016/can-i-globally-switch-to-native-text-rendering-in-qt-quick-controls-2

And I compiled x11-toolkits/qt5-declarative with DEFINES+=QT_QUICK_DEFAULT_TEXT_RENDER_TYPE=NativeTextRendering and the text has become visible in System Settings -> Desktop Behavior -> Desktop Effects. But in some other places (such as clock or password field on Breeze Lockscreen) the text did not appear.

I think that in some places of source code plasma5 components the rendering type is hard coded as Text.QtRendering. And this can not be changed to Text.NativeRendering.

This is a big problem!
Comment 16 Nate Graham 2018-11-26 00:09:47 UTC
Are you using a non-integer scale factor?
Comment 17 Serge Volkov 2018-11-26 08:52:13 UTC
I do not use anything. I do not develop any software. Now I write as a simple user of plasma5. I just use the VESA driver in the xorg. In the VESA driver there is no support for opengl. I think this is related to this.
Comment 18 Serge Volkov 2018-11-26 11:01:40 UTC
(In reply to Gleb Popov from comment #12)
> (In reply to Serge Volkov from comment #9)
> > 
> > 1. Add to the top
> >     import QtQuick.Controls.Styles.Plasma 2.0 as Styles
> > 2. Add to the PlasmaComponents.TextField
> >     Styles.TextFieldStyle {
> >         renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering :
> > Text.NativeRendering
> >     }
> 
> Maybe I did something wrong, but this didn't help me. Characters in
> screenlocker's textbox are still invisible.

My mistake. Add to the /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/MainBlock.qml file:
1. Add to the top

    import QtQuick.Window 2.2
    import QtQuick.Controls.Styles.Plasma 2.0 as Styles

2. Add after PlasmaComponents.TextField {

    Styles.TextFieldStyle {
        renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
    }

And delete Mainblock.qmlc file.
Comment 19 Gleb Popov 2018-11-26 11:32:38 UTC
(In reply to Serge Volkov from comment #18)
> And delete Mainblock.qmlc file.

Where is it located? I have no .qmlc files in /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen
Comment 20 Serge Volkov 2018-11-26 11:37:41 UTC
Again I was wrong.

Add to the /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/MainBlock.qml file:
1. Add to the top

    import QtQuick.Window 2.2
    import QtQuick.Controls.Styles.Plasma 2.0 as Styles

2. Add after PlasmaComponents.TextField {

    style: Styles.TextFieldStyle {
        renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
    }

And delete Mainblock.qmlc file.
Comment 21 Serge Volkov 2018-11-26 11:40:37 UTC
(In reply to Gleb Popov from comment #19)
> (In reply to Serge Volkov from comment #18)
> > And delete Mainblock.qmlc file.
> 
> Where is it located? I have no .qmlc files in
> /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/
> lockscreen

Does this directory exist? If exists, what files are there?
Comment 22 Gleb Popov 2018-11-26 11:42:28 UTC
(In reply to Serge Volkov from comment #21)
> (In reply to Gleb Popov from comment #19)
> > (In reply to Serge Volkov from comment #18)
> > > And delete Mainblock.qmlc file.
> > 
> > Where is it located? I have no .qmlc files in
> > /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/
> > lockscreen
> 
> Does this directory exist? If exists, what files are there?

It has MainBlock.qml, which I edited, but not MainBlock.qmlc. There are only .qml files.
Comment 23 Serge Volkov 2018-11-26 11:46:09 UTC
(In reply to Gleb Popov from comment #22)
> (In reply to Serge Volkov from comment #21)
> > (In reply to Gleb Popov from comment #19)
> > > (In reply to Serge Volkov from comment #18)
> > > > And delete Mainblock.qmlc file.
> > > 
> > > Where is it located? I have no .qmlc files in
> > > /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/
> > > lockscreen
> > 
> > Does this directory exist? If exists, what files are there?
> 
> It has MainBlock.qml, which I edited, but not MainBlock.qmlc. There are only
> .qml files.

It is OK. Edit this file (comment 20). And check lockscreen.
Comment 24 Serge Volkov 2018-11-26 12:37:03 UTC
In reply to Nate Graham from comment #16)
> Are you using a non-integer scale factor?

I check System Settings -> Display and Monitor -> Displays -> Scale Display. Scale factor equal 1.

If I use VESA driver and default qt5-declarative package, then I see that http://www.ulbsd.ru/devel/rendering_vesa_default.png

If I use VESA driver and qt5-declarative package compiled with QT_QUICK_DEFAULT_TEXT_RENDER_TYPE=NativeTextRendering, then I see that http://www.ulbsd.ru/devel/rendering_vesa_native.png

If I change scale factor to 1.1 in System Settings, then all elements increase their size. But in the program (for example lockscreen) Screen.devicePixelRatio parameter is always equal to 1 regardless of the scale factor in System Settings.

I do not understand anything. Maybe I have Qt5 version with bugs? My version is 5.11.2.
Comment 25 Gleb Popov 2018-11-26 17:19:32 UTC
(In reply to Serge Volkov from comment #23)
> (In reply to Gleb Popov from comment #22)
> > (In reply to Serge Volkov from comment #21)
> > > (In reply to Gleb Popov from comment #19)
> > > > (In reply to Serge Volkov from comment #18)
> > > > > And delete Mainblock.qmlc file.
> > > > 
> > > > Where is it located? I have no .qmlc files in
> > > > /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/
> > > > lockscreen
> > > 
> > > Does this directory exist? If exists, what files are there?
> > 
> > It has MainBlock.qml, which I edited, but not MainBlock.qmlc. There are only
> > .qml files.
> 
> It is OK. Edit this file (comment 20). And check lockscreen.

These are the same instructions you gave me in #9-10. I already done that in comment #12 and it didn't helped me. Your issue is different from mine.
Comment 26 Serge Volkov 2018-11-26 18:10:26 UTC
(In reply to Gleb Popov from comment #25)
> (In reply to Serge Volkov from comment #23)
> > (In reply to Gleb Popov from comment #22)
> > > (In reply to Serge Volkov from comment #21)
> > > > (In reply to Gleb Popov from comment #19)
> > > > > (In reply to Serge Volkov from comment #18)
> > > > > > And delete Mainblock.qmlc file.
> > > > > 
> > > > > Where is it located? I have no .qmlc files in
> > > > > /usr/local/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/
> > > > > lockscreen
> > > > 
> > > > Does this directory exist? If exists, what files are there?
> > > 
> > > It has MainBlock.qml, which I edited, but not MainBlock.qmlc. There are only
> > > .qml files.
> > 
> > It is OK. Edit this file (comment 20). And check lockscreen.
> 
> These are the same instructions you gave me in #9-10. I already done that in
> comment #12 and it didn't helped me. Your issue is different from mine.

Only comment 20 contains the correct code. The previous comments contain errors. Also try to use "renderType: Text.NativeRendering" instead "renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering"

Also you can download modified MainBlock.qml http://www.ulbsd.ru/devel/MainBlock.qml and try it.

Also tell me, please, do you have a problem from comment 24?
Comment 27 Serge Volkov 2018-12-28 11:15:49 UTC
I have been looking for a solution to the problem for a long time. Finally, I found a solution. Adding a line

QML_DISABLE_DISTANCEFIELD=1; export QML_DISABLE_DISTANCEFIELD

to the /etc/xprofile solved all the problems. Now all the text is displayed normally everywhere.
Comment 28 Gleb Popov 2018-12-28 11:31:47 UTC
(In reply to Serge Volkov from comment #27)
> I have been looking for a solution to the problem for a long time. Finally,
> I found a solution. Adding a line
> 
> QML_DISABLE_DISTANCEFIELD=1; export QML_DISABLE_DISTANCEFIELD
> 
> to the /etc/xprofile solved all the problems. Now all the text is displayed
> normally everywhere.

I confirm that it is a working workaround for me too.
Comment 29 groot 2019-03-26 22:10:00 UTC
Created attachment 119066 [details]
Plasma Theme Explorer on startup
Comment 30 groot 2019-03-26 22:10:26 UTC
Created attachment 119067 [details]
Scroll down to widgets/lineedit
Comment 31 groot 2019-03-26 22:10:41 UTC
Created attachment 119068 [details]
.. enter text
Comment 32 groot 2019-03-26 22:15:50 UTC
It's called "Plasma Theme Explorer" now, in Plasma 5.13.3 from a local poudriere build. I can't reproduce this with my regular user (admittedly, this user probably has a lot of crufty configuration from years of use) and the drm-kmod graphics drivers (Intel). I see the VESA driver mentioned a few times in this report, so I'd have to swap out some configurations (or give it a try in a VM) to see what's going on.
Comment 33 Gleb Popov 2019-03-28 08:02:44 UTC
I tried removing QML_DISABLE_DISTANCEFIELD after updating to recent video driver+plasma, but the bug is still here for me.

Note I'm using Intel driver (drm-kmod), not VESA one.
Comment 34 Serge Volkov 2019-03-28 09:14:01 UTC
I confirm. The problem still exists in many dialog windows and in SDDM login screen with VESA and Intel (drm-kmod) drivers. I tested on Intel Core i5 2500 CPU.

Only using the nvidia driver with nvidia GPU or using QML_DISABLE_DISTANCEFIELD with other graphics drivers solves the problem.

------
FreeBSD 12.0-RELEASE-p3 (amd64), KDE Plasma 5.15.3, KDE Frameworks 5.56.0, Qt 5.12.1
Comment 35 Jesper Schmitz Mouridsen 2019-10-23 15:33:45 UTC
Can you people having this issue try to change your LC_NUMERIC to
a locale with "." as a decimal separator?
and with LC_ALL unset...
Remember to delete the cached shaders in ~/.cache/qtshaders and ~/.cache/mesa_shader_cache

Also see:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237662
Comment 36 Gleb Popov 2019-11-08 04:52:04 UTC
Turned out to be mesa bug, fixed upstream.