Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493186 - x11-themes/icewm-themes: broken/corrupt rendering of 1-pixel images on nvidia hardware
Summary: x11-themes/icewm-themes: broken/corrupt rendering of 1-pixel images on nvidia...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-03 02:32 UTC by Denilson Sá Maia
Modified: 2018-04-29 17:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,6.09 KB, text/plain)
2013-12-03 02:33 UTC, Denilson Sá Maia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denilson Sá Maia 2013-12-03 02:32:25 UTC
XPM images that are 1-pixel-high (or 1-pixel-wide) are not rendered correctly on nvidia hardware.

x11-themes/icewm-themes-0.0.2
x11-wm/icewm-1.3.7-r1
x11-drivers/nvidia-drivers-319.60
x11-base/xorg-x11-7.4-r2
x11-base/xorg-server-1.14.3-r2

Hardware: on-board GeForce 8200 on ECS motherboard.

I've had this same symptom in 2008 (5 years ago), in Frets on Fire game, with a different machine but also running nvidia-drivers. In-game textures that were less then 32 pixels were not rendered correctly.
http://www.fretsonfire.net/forums/viewtopic.php?t=24960

I've also found a bug report for Red Hat (with screenshot):
http://bugzilla.redhat.com/show_bug.cgi?id=981758


The workaround is to resize those images to at least 2 pixels. Running this at the ebuild should work:

find . -type f -name '*.xpm' -exec identify {} \; | egrep ' 1x' | sed 's/ XPM .*//' | while read f ; do convert "$f" -resize 200%x100%! "$f" ; done
find . -type f -name '*.xpm' -exec identify {} \; | egrep 'x1 ' | sed 's/ XPM .*//' | while read f ; do convert "$f" -resize 100%x200%! "$f" ; done

Do you want me to submit a patch to icewm-themes, or is this trivial enough to add? (introduces dependency on media-gfx/imagemagick or similar)
Comment 1 Denilson Sá Maia 2013-12-03 02:33:30 UTC
Created attachment 364488 [details]
emerge --info
Comment 2 Denilson Sá Maia 2013-12-03 03:03:13 UTC
Note: the command-lines I posted above are buggy.

'convert' will write the new file before 'find' has finished listing all the files, which means there is a racing condition that can let find re-read and re-list the same file again, which will make 'convert' re-convert it and re-write it to disk, and so on.

Adding "| sort" or "| tac" to the pipeline should fix this racing condition.

Alternatively, just read from one directory and write the fixed files into another one.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-03 12:07:30 UTC
/usr/share/doc/nvidia-drivers-*/html/knownissues.html:

   Texture seams in Quake 3 engine
           Many games based on the Quake 3 engine set their textures to use
           the GL_CLAMP clamping mode when they should be using
           GL_CLAMP_TO_EDGE. This was an oversight made by the developers
           because some legacy NVIDIA GPUs treat the two modes as equivalent.
           The result is seams at the edges of textures in these games. To
           mitigate this, older versions of the NVIDIA display driver remap
           GL_CLAMP to GL_CLAMP_TO_EDGE internally to emulate the behavior of
           the older GPUs, but this workaround has been disabled by default.
           To re-enable it, uncheck the "Use Conformant Texture Clamping"
           checkbox in nvidia-settings before starting any affected
           applications.

Are you sure it isn't this bug + workaround?
Comment 4 Denilson Sá Maia 2013-12-06 05:34:53 UTC
(In reply to Jeroen Roovers from comment #3)
> Are you sure it isn't this bug + workaround?

Probably not. Toggling that checkbox before launching icewm had no effect. Maybe because the buggy lies within xorg-server itself, but I really don't know. Also, it is worth noting that IceWM does not use OpenGL, as far as I know.

Probably xorg-server-1.13.4 didn't trigger this bug, while 1.14.3 triggers it.
Comment 5 Denilson Sá Maia 2013-12-10 13:02:55 UTC
I just backtracked and found this:
xorg-server-1.11.4-r3 → Works fine, no bug in IceWM themes.
xorg-server-1.12.4-r2 → Invisible titlebar in IceWM (due to 1-pixel image)

Debian guys say this bug is caused by the update from 2:1.12.3-1 to 2:1.12.3.902-1.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688908


Tested on:
* Gentoo Linux amd64
* nvidia-drivers-319.60
* GeForce 9500M GS (unrelated, as this has been reproduced on other hardware as well.

Sidenote: I haven't tested later nvidia-drivers because later versions (325.15, 331.29) are unstable to me, they tend hold the kernel too long, breaking the network drivers or just freezing up the system.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-11 15:51:14 UTC
Most of the themes seem broken here - the centre of the title bar is (nearly) empty using most of them, preventing both window dragging and viewing the title in most cases.
Comment 7 Pacho Ramos gentoo-dev 2018-04-29 17:42:56 UTC
removed