Bug 1340224 - Text/Font corruption and missing cursor
Summary: Text/Font corruption and missing cursor
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 24
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-26 19:06 UTC by Urban Widmark
Modified: 2016-08-18 14:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-05-30 06:54:16 UTC
Type: Bug

Attachments (Terms of Use)
screenshot of text corruption (16.61 KB, image/png)
2016-05-26 19:06 UTC, Urban Widmark
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1317880 0 unspecified CLOSED garbled fonts in xfce 2021-02-22 00:41:40 UTC

Internal Links: 1317880

Description Urban Widmark 2016-05-26 19:06:18 UTC
Created attachment 1162240 [details]
screenshot of text corruption

Description of problem:
Using certain fonts there is corruption while typing, scrolling etc, making these fonts unusable. Also the cursor is not visible, instead the character you are on is blinking and if on a whitespace char nothing happens.

Version-Release number of selected component (if applicable):
24.5 built from source has the same issue

How reproducible:

Steps to Reproduce:
1. Install emacs and xorg-x11-fonts-100dpi
2. Use the following .emacs file

(setq default-frame-alist
      '((width . 80) (height . 60)
        (background-color . "white")
        (font . "-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1"))

3. Open a file
4. Scroll the buffer up and down.

Actual results:
Parts of the text is left behind, not cleared properly. See attachment.

Expected results:
Text looks ok after scrolling.

Additional info:
Also tested building emacs 24.5 from source and it has the same behaviour. Possibly this isn't emacs but some library it uses for drawing?

Graphics hardware is Intel Corporation HD Graphics 530

This is using XFCE which wouldn't start until I added "WaylandEnable=false" to /etc/gdm/custom.conf, but I tested the same with gnome (same gdm though).

The corruption disappears if I can make the window repaint, for example by switching workspace, resizing, minimise/maximise.

Removing the font line from the .emacs file makes it work. Some other fonts also work:

Comment 1 Jan Synacek 2016-05-30 06:54:16 UTC
(In reply to Urban Widmark from comment #0)
> Steps to Reproduce:
> 1. Install emacs and xorg-x11-fonts-100dpi

For the record, the correct font package to install to use the reproducer below is 'xorg-x11-fonts-ISO8859-1-100dpi'.

> 2. Use the following .emacs file
> (setq default-frame-alist
>       '((width . 80) (height . 60)
>         (background-color . "white")
>         (font .
> "-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1"))
> )
> 3. Open a file
> 4. Scroll the buffer up and down.

I cannot reproduce this on the latest Fedora 24 (as of Mon May 30).

$ rpm -q kernel gtk3 emacs

If the problem still persists for you, it looks more like a driver bug to me. See also https://bugzilla.redhat.com/show_bug.cgi?id=1317880.

Comment 2 Urban Widmark 2016-05-31 09:24:45 UTC
Works for me too using F24 on a different computer with Radeon HD 5770 graphics (have other issues there, no scrollbar handles and selection of text does not highlight in firefox...).

Also worked in a virtualbox machine on the same hardware as the original report.
Works in F23 on the same hardware.

Tested some different vanilla kernels (4.7-rc1, 4.4.11) with the same problem. 

I am not too familiar with intel graphics, is this the driver that is used?
All versions seem to match, except that the cairo version in F24 is older. They point to 1.15.x which is some kind of snapshot. Tried building that but made no difference (and I am sure it was using this version since I had link issues with changed symbols).

To me 1317880 looks unrelated. That looks like a problem outputting the fonts at all and only after using it for a while. Here it happens immediately but only for some operations (scrolling).
Font does matter for my problem since it does not happen with some fonts.

Comment 3 Jan Synacek 2016-05-31 10:46:10 UTC
Do you also experience the problem when using GNOME? Or anything other than XFCE?

Comment 4 Urban Widmark 2016-06-01 12:46:25 UTC
Yes, it is in my first post that I also tested with gnome (but with WaylandEnable=false in gdm, if that matters). I think I also tested it by booting from a USB stick with gnome and no changes other than installing my favourite font and emacs. If you want me to make sure I can repeat that test.

xfce does not seem to be a factor.

(the firefox selection issue seems to be about xfce theme though, I think it may be the same as this https://bugzilla.redhat.com/show_bug.cgi?id=1218726)

Comment 5 Urban Widmark 2016-08-18 14:26:36 UTC
Updated to kernel 4.6.6 today on the computer with this problem (from 4.5.7) and the problem has gone away. There are a few updates in 4.6 to the i915 driver so maybe that is why.

Although I see now that I did test a 4.7-rc kernel before, but maybe the driver changes were not included in that rc version.

Of course I updated a lot of other packages too but graphics driver still seems likely given that it worked with an amd card (in a different computer though).

Note You need to log in before you can comment on or make changes to this bug.