Bug 15278 - [965Q] Fonts garbled after installing Intel drivers
Summary: [965Q] Fonts garbled after installing Intel drivers
Status: RESOLVED DUPLICATE of bug 15012
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.3 (2007.09)
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
Keywords: NEEDINFO
Depends on:
Reported: 2008-03-31 02:46 UTC by Sergey Popov
Modified: 2008-07-03 20:28 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:

Xorg config file (14.60 KB, text/plain)
2008-04-01 03:05 UTC, Sergey Popov
no flags Details
Log from last launch (47.91 KB, text/plain)
2008-04-01 03:05 UTC, Sergey Popov
no flags Details
Log from dmesg (30.18 KB, text/plain)
2008-04-07 11:22 UTC, Sergey Popov
no flags Details
Log from X launch with latest intel 2D driver (41.93 KB, text/plain)
2008-04-14 08:33 UTC, Sergey Popov
no flags Details
Xorg server start log with EXANoCompozite (43.92 KB, text/plain)
2008-04-15 08:47 UTC, Sergey Popov
no flags Details

Description Sergey Popov 2008-03-31 02:46:38 UTC
Fonts are barely guessable after installing Intel drivers. It looks like
Strange, but applications like xmms, fbrun, wbar or xcalc work right, their menus have normal fonts too.

As I didn't find any error like this, it may be distro specific.

Chipset: i965Q
Distro: Vector Linux 5.9 (Slackware-based)

How I managed to do this:
I downloaded xf86, drm and mesa using git-clone by instructions from http://www.intellinuxgraphics.org/download.html and compiled them following http://www.intellinuxgraphics.org/install.html
Then I loaded drm and i915 modules, changed Driver "i810" on Driver "intel" in xorg.conf and rebooted X-server. Got fonts trashed as shown above.

What did I do then:
Well, I thought, I built drm and mesa drivers incorrectly. I blacklisted modules and even rebooted the system. No effect. I renamed modules and rebooted. No i915 or drm modules in lsmod, but the same unreadable fonts. Changed "intel" in xorg.conf on "i810". Rebooted. The same. Reconfigured X with xorgconfig. Rebooted. The same. Loaded kernel. The same.

What information should I add?
Comment 1 Gordon Jin 2008-04-01 00:19:03 UTC
Please attach xorg.conf and Xorg.0.log, and provide the specific version (git commit?) of xf86-video-intel.
Comment 2 Sergey Popov 2008-04-01 03:05:03 UTC
Created attachment 15599 [details]
Xorg config file
Comment 3 Sergey Popov 2008-04-01 03:05:36 UTC
Created attachment 15600 [details]
Log from last launch
Comment 4 Sergey Popov 2008-04-01 03:13:49 UTC
xf86-video-intel is from git 20080328.

System is 32-bit, by the way.

Also, when working in terminal (Ctrl+Alt+F1, if I used the wrong word), after about a minute of work liters start to disappear in bash, mc, man. Switching to graphic mode and back helps for another minute. Framebuffer is disabled.
Comment 5 Wang Zhenyu 2008-04-02 23:31:31 UTC
Could you try to add NEED_NON_STOLEN flag for exa offscreen allocation?

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 9e23c3c..57b72a6 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1437,7 +1439,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
            pI830->exa_offscreen =
                i830_allocate_memory(pScrn, "exa offscreen",
-                                    size, 1, NEED_LIFETIME_FIXED);
+                                    size, 1, NEED_LIFETIME_FIXED | NEED_NON_STOLEN);
            if (pI830->exa_offscreen == NULL) {
                xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
                           "Failed to allocate EXA offscreen memory.\n");
Comment 6 Sergey Popov 2008-04-03 05:05:35 UTC
C(In reply to comment #5)
> Could you try to add NEED_NON_STOLEN flag for exa offscreen allocation?

Added, recompiled, restarted. Fonts disappeared completely.
Comment 7 Wang Zhenyu 2008-04-06 21:04:17 UTC
This problem is only with dri off? how about add NEED_NON_STOLEN for exa_965_state buffer?
Comment 8 Wang Zhenyu 2008-04-07 01:34:12 UTC
I can't reproduce this with current master tips (xserver, xf-v-i, etc.) Do you follow
http://www.x.org/wiki/Development/git? How about comment out "vga" driver in your xorg.conf?

Comment 9 Sergey Popov 2008-04-07 11:21:42 UTC
Disabling "vga" is not possible.

Ok, I found strange line in xorg.log. Driver tries to take memory from more than 6Gb. Ok, I though that's it because I run 6Gb of RAM on 32-bit kernel with 64Gb support.

Set up "mem=4096m" in lilo and rebooted - hooray, I can see fonts, but they are garbled again.

Ok, recompiled kernel and modules with only 4Gb support, rebooted - won't run. Recompiled xf86, drm and mesa. X freeze at start. Logs show it freezes at DRI initialisation. Following is shown in dmesg:

BUG: unable to handle kernel paging request at virtual address f88e8148
printing eip: f89834de *pde = 37c28067 *pte = 00000000 
Oops: 0000 [#1] PREEMPT SMP 
Modules linked in: i915 drm(F) ipv6 intel_agp i2c_i801 i2c_core agpgart

Pid: 24695, comm: X Tainted: PF       ( #3)
EIP: 0060:[<f89834de>] EFLAGS: 00013282 CPU: 0
EIP is at i915_driver_lastclose+0x5e/0x1d0 [i915]
EAX: 00000000 EBX: f88e7898 ECX: f6f15fc0 EDX: f27512c0
ESI: f6eac000 EDI: f6f0f000 EBP: f78a842c ESP: f4c5ff2c
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process X (pid: 24695, ti=f4c5e000 task=f7cdf7b0 task.ti=f4c5e000)
Stack: f89b401f f6f0f01c f6eac000 00000008 f215d980 f6f0f000 f78a842c f89b318e 
       f6f0f130 f6f0f01c f7c56e40 f7298294 00000008 f215d980 f7298160 f78a842c 
       c0174e31 00000000 00000000 f76aff40 f215d980 f7c59380 00000000 f215d980 
Call Trace:
 [<f89b401f>] drm_release+0x38f/0x4c0 [drm]
 [<f89b318e>] drm_lastclose+0x2e/0x3e0 [drm]
 [<c0174e31>] __fput+0x91/0x170
 [<c0171e57>] filp_close+0x47/0x80
 [<c0173562>] sys_close+0x72/0xd0
 [<c0104406>] syscall_call+0x7/0xb
Code: c0 89 86 fc 00 00 00 89 f8 e8 5f f6 02 00 85 c0 74 6b 8b 46 08 85 c0 74 64
 8b 87 ac 02 00 00 89 44 24 08 8b 58 08 a1 88 48 9d f8 <83> bb b0 08 00 00 01 19
 ed 83 c5 03 85 c0 0f 85 0e 01 00 00 8b 
EIP: [<f89834de>] i915_driver_lastclose+0x5e/0x1d0 [i915] SS:ESP 0068:f4c5ff2c
---[ end trace f5582aabe6fb7a42 ]---

Also full dmesg is attached (after several attempts I lodaded X with vesa driver).
Comment 10 Sergey Popov 2008-04-07 11:22:18 UTC
Created attachment 15741 [details]
Log from dmesg
Comment 11 Wang Zhenyu 2008-04-07 18:52:36 UTC
This should be fixed drm git tree.

I just follow http://www.x.org/wiki/Development/git, which I built two xorg trees, one is from all master tips, and another is from server-1.4 and mesa-7.0 stable branch. I can't reproduce your problem on both config. WC setting issue should be another problem, you may first ignore it. Could you try that building steps?
Comment 12 Sergey Popov 2008-04-14 08:32:41 UTC
Sorry for bumping up the bug ;) .

I've looked on steps from GitDevelopment, but no luck - they're the same

Maybe that I run 6Gbs of mem on 32-bit kernel or Russian KOI8-R locale may be the cause.

Today I downloaded xf86-video-intel from git, compiled and rebooted X with intel drivers (I'm using vesa now)
No errors were in Xorg.0.log (I'll attach it below), but no fonts were shown, like: http://i22.photobucket.com/albums/b322/faijeya/bug3.jpg . GTK1 apps like xmms work perfectly, GTK2 and QT - no.

What can it be?
Comment 13 Sergey Popov 2008-04-14 08:33:20 UTC
Created attachment 15909 [details]
Log from X launch with latest intel 2D driver
Comment 14 Wang Zhenyu 2008-04-14 20:37:56 UTC
Could you try http://xorg.freedesktop.org/archive/individual/driver/xf86-video-intel-
or git master? 

Does Option "EXANoComposite" make fonts render fine for you?
Comment 15 Sergey Popov 2008-04-15 08:46:39 UTC
No, with still no fonts are seen.

With Option "EXANoComposite" in serverflags section X do not start. They stop with black screen and "X" in the center of it. Login manager isn't shown.

As you can't reproduce it, can the trouble be in non-X components? If yes, what should I check?
Comment 16 Sergey Popov 2008-04-15 08:47:28 UTC
Created attachment 15928 [details]
Xorg server start log with EXANoCompozite
Comment 17 Wang Zhenyu 2008-04-15 18:45:58 UTC
oh, you should add that option to Device section, following Driver "intel".
Comment 18 Wang Zhenyu 2008-04-23 18:26:51 UTC
Could you tell me what's the model of your 965Q machine?
Comment 19 Sergey Popov 2008-04-29 04:33:22 UTC
It worked))).

I'm terribly sorry for the delay - at first I had to run some lengthy tasks, so X reboot was no option and after that I took a vacation for marriage.

So today I came to work and tested with Option "EXANoComposite" in Driver subsection. Fonts are ok and I've got direct rendering. Driver version is from 18042008.

Thank you for your help, without you I could never manage this problem))).

Bug can be closed now.
Comment 20 Wang Zhenyu 2008-05-05 20:56:46 UTC
oh, wait, if enable exa composite is still broken on you 965, I can't think this bug can be closed. 

What's your version of driver that you see font corrupt? git master or 2.3 release?
Comment 21 Brice Goglin 2008-05-31 10:56:30 UTC
Zhenyu, did you try to reproduce this problem with Xserver 1.4? Or only with Xserver 1.5 or master?
Comment 22 Michael Fu 2008-06-05 19:31:45 UTC
Sergey, could you please respond zhenyu's comment# 20?
Comment 23 Michael Fu 2008-06-22 23:48:41 UTC
could be a dup of bug# 15012? anyway, last ping to bug reporter...Sergey, are you there?
Comment 24 Brice Goglin 2008-06-23 00:38:48 UTC
I'd say yes it's a dupe of #15012. I couldn't get all my users to confirm (we have almost 10 Debian users getting such a bug), but it looks EXA Composite is in cause for most of them. What I'd like to know is whether it's related to Xserver 1.4.
Comment 25 Wang Zhenyu 2008-06-23 01:00:33 UTC
Bryce, I think I never produced this on our 965Q here. Just be awared that I might let Sergey try wrong patch, which I meant to set NEED_NON_STOLEN allocation flag to "exa G965 state buffer", that my guess is that some 965 machine might have problem in access 965 state buffer when in stolen memory, but not sure if it would break on other 965s, weird. I think we would fix this possibility with new mem manager.
Comment 26 Michael Fu 2008-06-23 18:02:31 UTC
zhenyu, what's the next step then. should we ask surgey to try the GEM branch?
Comment 27 Wang Zhenyu 2008-06-23 20:35:55 UTC
As Sergey was trying with 2.3 branch releases, so first try current master with Eric/Carl's i965 state buffer rework, which might have 'side effect' to fix possible alignment or other issue. If that still failed, try set NEED_NON_STOLEN flag in 'exa G965 state buffer' allocation.

Trying gem is also good, although it requires more building actions.
Comment 28 Michael Fu 2008-07-03 20:28:48 UTC
it seems we are lack of bug reporter's response here. I'm marking this as dup of bug# 15012 and let's track this issue there... Sergey, if you are able to test 2.3.2, please post comment here and we can reopen this bug..

*** This bug has been marked as a duplicate of bug 15012 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.