Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ttk artifacts on Ubuntu

144 views
Skip to first unread message

nemethi

unread,
Feb 27, 2017, 5:43:56 AM2/27/17
to
Consider the following simple script, which creates a ttk::combobox, a
ttk::spinbox and a ttk::scrollbar widget:

ttk::combobox .combo
ttk::spinbox .spin
ttk::scrollbar .scrl
grid .combo -row 0 -column 0 -padx 10 -pady 10 -sticky e
grid .spin -row 1 -column 0 -padx 10 -pady 10 -sticky e
grid .scrl -row 0 -column 1 -padx 10 -pady 10 -sticky ns -rowspan 2

Run the script on Ubuntu Linux, on real hardware (i.e., not in a virtual
machine). I have tested it both on Ubuntu with the Unity desktop and on
Ubuntu MATE, on two different laptops: one with AMD graphics and one
with an Nvidia graphics card. If the OS version is 16.04 or earlier,
everything is fine, the GUI is rendered as expected. However, with OS
version 16.10 and the daily build of version 17.04, the result exhibits
serious rendering problems. To see what I mean, please visit the page

http://www.nemethi.de/ttk_ubuntu/artifacts.html

I have used xmag to zoom in the relevant part of the window. One can
immediately see that on Ubuntu 16.10 and later, the arrow components of
the three ttk widgets are cropped, making them totally ugly and unusable.

I am not sure whether this is a Ttk bug, being that it is only exhibited
on recent Ubuntu versions. These are shipped with Linux kernel 4.8
(Ubuntu 16.10) or even 4.10 (Ubuntu 17.04), and the X environment uses
newer components, too. Fact is, however, that Ubuntu is one of the most
popular Linux distributions, hence problems of this kind are for me
serious show-stoppers.

Has anyone of you experienced this problem? Can you reproduce it on
Ubuntu or other Linux distributions/desktops? Does anybody know why the
problem only arises on real hardware but not in a virtual machine?

Before filing a bug report, I would like to know whether others have
experienced the same problem and maybe have a plausible explanation for
what could be the reason.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba....@t-online.de

Rich

unread,
Feb 27, 2017, 5:49:05 AM2/27/17
to
nemethi <csaba....@t-online.de> wrote:
> http://www.nemethi.de/ttk_ubuntu/artifacts.html
>
> I have used xmag to zoom in the relevant part of the window. One can
> immediately see that on Ubuntu 16.10 and later, the arrow components of
> the three ttk widgets are cropped, making them totally ugly and unusable.
>
> I am not sure whether this is a Ttk bug, being that it is only exhibited
> on recent Ubuntu versions. These are shipped with Linux kernel 4.8
> (Ubuntu 16.10) or even 4.10 (Ubuntu 17.04), and the X environment uses
> newer components, too. Fact is, however, that Ubuntu is one of the most
> popular Linux distributions, hence problems of this kind are for me
> serious show-stoppers.
>
> Has anyone of you experienced this problem?

No.

> Can you reproduce it on Ubuntu or other Linux distributions/desktops?

Does not appear on Slackware 14.1 running Noveu on a real Nvidia
graphics card.

> Does anybody know why the problem only arises on real hardware but
> not in a virtual machine?

Isn't Ubuntu 16.10 the first Ubuntu to switch to running Wayland as the
display server? Maybe this is a Wayland bug that only manifests on a
real GPU?

nemethi

unread,
Feb 27, 2017, 5:56:28 AM2/27/17
to
No, Ubuntu 16.10 doesn't use Wayland. Ubuntu has MIR as a Wayland
alternative, but that is not yet activated per default. And, at any
rate, it is definitely not included in Ubuntu MATE (which exposes the
reported problem, too)

Georgios Petasis

unread,
Feb 27, 2017, 2:23:47 PM2/27/17
to
(Just a wild guess) Maybe they have somehow changed in the theme the
dimensions of the elements? If I remember correctly, ttk uses images
(and I don't remember if they are scaled or not).

George

nemethi

unread,
Mar 1, 2017, 5:43:10 AM3/1/17
to
A wild guess indeed :-) . The Ttk implementation draws the arrows with
the aid of the Xlib functions XFillPolygon and XDrawLines. These are
known to have problems when used to draw (filled) triangles, and this
Xlib bug seems to be present on Ubuntu 16.10 and later but not on Ubuntu
16.04 and earlier.

In the meantime I have a simple patch for the file ttkDefaultTheme.c
that eliminates the problem. I will submit it as part of a Ttk bug report.

nemethi

unread,
Mar 1, 2017, 9:14:24 AM3/1/17
to
Submitted bug report with proposed patch:

https://core.tcl.tk/tk/tktview?name=77527326e5

Ticket UUID: 77527326e587883bda19e5d02c3580021e53d722.

nemethi

unread,
Mar 9, 2017, 12:12:02 PM3/9/17
to
A few more observations:

1. Just like Ubuntu, the latest Solus Linux release has upgraded X.org
from version 1.18.3 to 1.18.4, but it doesn't exhibit the artifact
described above. The problem seems to be Ubuntu-specific.

2. Both laptops on which I have seen the reported artifact have hybrid
graphics (Intel + AMD and Intel + Nvidia, respectively). On a classical
PC (with an AMD Radeon graphics card) everything is fine (I have just
tested it with the daily build of Ubuntu MATE 17.04). From this I
conclude that the problem is probably specific to Ubuntu 16.10 and
later, with Intel graphics.

3. Although the reported problem seems to be caused by an issue in
Ubuntu's driver for the Intel integrated graphics chipset, fact is that
it is a show-stopper, which, however, can easily be eliminated with the
aid of the proposed simple workaround.


I have added the above as a comment to the bug report. It would be fine
if someone from the Tk Core Team could take a look at it (up to know,
the bug report isn't yet assigned to anybody). :-(

nemethi

unread,
Mar 9, 2017, 12:16:47 PM3/9/17
to
Sorry, I meant "up to now" and the "Tcl Core Team".
^^^ ^^^

Francois Vogel

unread,
Mar 10, 2017, 5:22:25 PM3/10/17
to
nemethi a écrit le 09/03/2017 à 18:11 :
> I have added the above as a comment to the bug report. It would be
> fine if someone from the Tk Core Team could take a look at it (up to
> know, the bug report isn't yet assigned to anybody). :-(

Workaround proposal committed to a test branch:

http://core.tcl.tk/tk/timeline?r=bug-77527326e5

I don't see the bug, on any of my systems.
If someone could confirm that the workaround works that would be
appreciated.

Thanks,
F.


0 new messages