12

Here is a picture of the problem:

enter image description here

Notice that all lines of text have horizontal lines similar to underlining. However, this is a plain text editor (Kate) and it does not do underlining. There is no formatting applied to this text.

I selected the text so the lines would show up better in a photo. But the lines exist even without selecting the text. Sometimes they are much thicker and darker. Sometimes they are light. Sometimes they won't be there at all, only to come back at random.

Konsole has the same issue. With white text on a black background, Konsole sometimes show multi-colored horizontal lines. Sometimes every line in Konsole has this ugly and distracting underlining. Sometimes only a portion of the lines have it.

Sometimes the lines are so dense and overwhelming that it is hard to read the text. Other times the lines are mild, as in the attached photograph.

I first saw this issue about a ten months ago on a desktop computer. I thought the user had just done something really crazy in font settings. But now I am seeing the issue on a new laptop without any significant settings changes from default.

Both systems run a fully updated Arch Linux KDE. On this laptop, I reset all font settings (in System Settings) to default values. I also reset the Konsole profile appearance to default settings (even though settings were already at default values).

However, the horizontal lines will not go away.

The applications work correctly (other than sometimes being hard to read text). Copied text does not include the horizontal lines. Commands in Konsole are not affected by the appearance of horizontal lines. It seems to be a display glitch, but it is not specific to any GPU (affects Intel or nvidia) or to any display screen (I tested different monitors on the desktop) or to anything else I can determine.

I tried various fixes on the affected desktop over the last ten months and I have not resolved it on that machine either.

I have multiple other Arch KDE computers that do not have the problem.

Does anyone have a clue as to what might cause this? Has else anyone seen it?

Edit: Please see the KDE bug report for Konsole:
373232 – Horizontal lines with fractional HiDPI scaling

8

This is reported to have been resolved in QTBUG-66036 with version 5.12. As of the time I am writing this, QT on Arch Linux is version 5.11.2-1. Other common distros have also not released packages with Qt 5.12. However, when Qt 5.12 is released, the developers expect this issue to be resolved.

To check your Qt version, you can open a terminal and type:

qmake --version

The output will look similar to this

QMake version 3.1
Using Qt version 5.11.1 in /usr/lib

When you see Qt version 5.12, then you can expect a resolution. If not, let the developers know at QTBUG-66036.

In the mean time, there is a work-around, as described in the bug report below

Steps to reproduce:

  1. Displays -> Scale -> Scale Factor: 1.3 (or 1.4, etc.)
  2. Restart
  3. Open Konsole or Kate, type stuff

Workaround: set Scale Factor back to 1.0 (or to an integer such as 2 or 3).

There is a similar bug report for Konsole here

373232 – Horizontal lines with fractional HiDPI scaling
https://bugs.kde.org/show_bug.cgi?id=373232

  • 3
    that workaround is absurd on 4k+ btw – tomasb Jun 6 '18 at 12:34
  • 1
    Yes, I agree that the workaround is terrible. Looking forward to a proper fix. – BugBuddy Jul 9 '18 at 7:48
  • found that integer factors work well (e.g. 2.0, 3.0, ...) – tomasb Jul 9 '18 at 16:38
  • please add a comment to the bug report: bugs.kde.org/show_bug.cgi?id=373232 – MountainX Jul 10 '18 at 17:18
  • 2
    @tomasb - If you want this fixed, please consider creating a login so you can let the developers know it affects you. If you are too lazy to do even that, you have no right to complain about the workaround (or anything else) being "absurd". If you use open source, please find ways to contribute, even if by only voting or commenting on bug reports -- anything. Be part of the community. – BugBuddy Sep 25 '18 at 18:48
6

Upgrading to Qt 5.12 is fine, but does not seem to fix the issue straight away. In Konsole profile settings under the advanced tab, change "Line Spacing" to 1. This has fixed the issue with horizontal lines for me.

  • had to increase it to 5, but worked fine. thank you. – User1291 Apr 3 at 9:39
  • The option "Line Spacing" is not available in Konsole version 19.8. – WeKa Sep 7 at 20:45
1

As a workaround, you could change the Fonts DPI:

  1. go to Fonts, check the box Force Fonts DPI
  2. set to an appropriate value (I use 144 on a 2560x1440 screen, you may want to try 192 in 4K)
    • Higher DPI translate to bigger text in your screen
  3. Set the your display scaling factor back to 1
  4. Logout and login to your user (or restart)

At this point the horizontal lines should be gone and you should be able to read everything on your screen

  • This is the only solution that works at the moment, and it will also adjust the scale of UI elements (not just font size). The dedicated "Scale Display" feature is still broken and causes several KDE applications to render with line artifacts. – tiguchi May 22 at 15:17
0

enter image description hereenter image description hereenter image description hereThe best workaround would for me is :

  1. Use Breeze Dark.
  2. Scale to 1.3,1.4, anything you want.
  3. Use GTK alternatives. Because any QT based editor will get that text rendering glitch.
  4. For Konsole, I prefer Tilix (which has least gtk dependencies like 5mb). For Dolphin terminal integration, follow https://bbs.archlinux.org/viewtopic.php?id=211524. Use "Open Tilix here" service (You can download from Dolphin Configuration > Service Menu). Just create a folder in your home as above service Documentation mentions. And change your default Terminal from KDE settings > Default Applications, so that you can Shift+F4 into the Tilix from Dolphin.
  5. For Kate or Kwrite, I prefer Gedit or any IDE's like Brackets or SublimeText or Atom.
0

After following Nico's instructions about changing the system text DPI to something higher like 144, 192, etc., there is a way to turn on display scaling again and have Kate looking good. However, results may vary between desktop environments.

Set your display scaling to the desired fractional value (I happen to use 1.5x).

You can set the environment variable QT_SCREEN_SCALE_FACTORS=1 for a single call to Kate.

QT_SCREEN_SCALE_FACTORS=1 kate

And you can make a wrapper script for all calls to Kate

#!/bin/bash
cd $HOME
# Add home binaries directory & cd into it
mkdir -p bin && cd bin
# Symlink Kate executable as kate0
ln -s $(which kate) kate0
# Create the wrapper script
echo '#!/bin/bash' > kate
# This tells Kate to use a 1x scale factor, and to pass all arguments from wrapper
echo 'QT_SCREEN_SCALE_FACTORS=1 kate0 "$@"' >> kate
# Make the wrapper script executable
chmod +x kate

Then make sure that $HOME/bin is in your $PATH. If it is not, then you can add it by

export PATH="$HOME/bin:$PATH"

Add that to ~/.profile to make it permanent.

Note that in order for this to work, your home scripts must come before the path of the original Kate executable (e.g. /usr/bin) in your $PATH environment variable.

0

Another workaround is setting Line Spacing to 1 under Settings -> Edit Current Profile ... -> Advanced -> Terminal Features. It's almost unnoticeable (one extra pixel between lines), but fixes the issue.

protected by Community Sep 7 at 21:37

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.