Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106871 - xorg-x11 >= 6.8.2-r2 won't start because of mtrr patches
Summary: xorg-x11 >= 6.8.2-r2 won't start because of mtrr patches
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-22 02:09 UTC by dmbkiwi
Modified: 2005-10-06 16:59 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dmbkiwi 2005-09-22 02:09:51 UTC
This problem started when I upgraded from xorg-x11-6.8.2-r1 to
xorg-x11-6.8.2-r2.  After upgrading, X would not start.  The boot process ran
without error, and then started xdm.  The screen then went blank - there is no
keyboard response, and no mouse response.  In this state, I cannot ssh to the
machine.  When I reboot, /var/log/Xorg.0.log shows no errors, and stops at
different places.  Looking at the ebuilds, it looks like different patch sets
were used between r1 and later releases.  So far I've compiled r2, r3, r4 and
xorg-x11-6.8.99.15-r1.  All produce the same result.  

I'm not sure how much spec I need to give, but my video card (from lspci):

0000:01:00.0 VGA compatible controller: S3 Inc. 86C270-294 Savage/IX-MV (rev 11)

kernel:

Linux laptop 2.6.10-gentoo-r4 #5 Mon Apr 11 22:03:09 NZST 2005 i686 Pentium III
(Coppermine) GenuineIntel GNU/Linux

gcc:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with: /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.6
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/info
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)

I have two other boxes, and both have upgraded without a problem above 6.8.2-r1.
 Please let me know what other information I can give to help solve this.

Reproducible: Always
Steps to Reproduce:
1. Compile any version of xorg-x11 >= 6.8.2-r2
2. Restart X
Actual Results:  
X won't start.  Gives blank screen - no disc activity - no errors in
/var/log/Xorg.0.log.

Expected Results:  
X starts.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2005-09-22 09:50:44 UTC
Please add output of `emerge info`
Comment 2 dmbkiwi 2005-09-22 12:12:11 UTC
emerge info:

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1,
2.6.10-gentoo-r4 i686)
=================================================================
System uname: 2.6.10-gentoo-r4 i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.0_pre8
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://public.planetmirror.com/pub/gentoo/ http://gentoo.osuosl.org"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.7.251/portage"
USE="X aalib alsa apm arts avi bash-completion berkdb bitmap-fonts cdr crypt
cups curl divx4linux dvd eds emboss encode esd exif fam flac foomaticdb fortran
ftp gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 imagemagick imap imlib ipv6
java jpeg junit kde ldap libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg
ncurses nls ogg oggvorbis opengl oss pam pda pdflib perl pilot png ppds python
qt quicktime readline real samba sdl slang sox spell ssl svg svga tcpd tiff
truetype truetype-fonts type1-fonts usb vorbis win32codecs x86 xine xml2 xmms xv
xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2005-09-22 19:57:22 UTC
Take a look at http://xorg.freedesktop.org/wiki/DebuggingTheXserver -- You'll
need to build xorg-x11 with USE=debug. It would be quite helpful if you could
pull something useful out.

Alternately, try dropping in an older patchset to 6.8.2-r4 and see what happens.
You can find one at
http://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.2/xorg-x11-6.8.2-patches-0.1.2.tar.bz2
that was in -r1. You'll need to copy the -r4 ebuild to an overlay and change
PATCH_VER in the ebuild.
Comment 4 dmbkiwi 2005-09-24 01:18:59 UTC
I've build xorg-x11-6.8.2-r5 with USE=debug.  I've followed the instructions on
the freedesktop.org site to get debug output, and I'm afraid this is all I get:

(gdb) Reading symbols from /usr/bin/Xorg...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) (gdb) Signal        Stop  Print   Pass to program Description
SIGUSR1       No        Yes     Yes             User defined signal 1
(gdb) Signal        Stop        Print   Pass to program Description
SIGUSR2       No        Yes     Yes             User defined signal 2
(gdb) Signal        Stop        Print   Pass to program Description
SIGPIPE       No        Yes     Yes             Broken pipe
(gdb) Starting program: /usr/bin/Xorg :0 -nolisten tcp -br -deferglyphs 16

X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.10-gentoo-r4 i686 [ELF]
Current Operating System: Linux laptop 2.6.10-gentoo-r4 #5 Mon Apr 11 22:03:09
NZST 2005 i686
Build Date: 24 September 2005
        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Sep 22 11:04:00 2005
(==) Using config file: "/etc/X11/xorg.conf"
Using vt 7

I presume that this is pretty much useless.  Is there a way I can get more debug
info?  I'm going to try your second suggestion.
Comment 5 Shyam Mani (RETIRED) gentoo-dev 2005-09-24 03:13:13 UTC
Do you have a blank .xinitrc in your home directory by any chance?
Comment 6 dmbkiwi 2005-09-24 03:44:33 UTC
No .xinitrc in ~/ 
Comment 7 dmbkiwi 2005-09-24 12:48:46 UTC
I've compiled xorg-x11-6.8.2-r5 using the patchset from here:

http://dev.gentoo.org/~spyderous/xorg-x11/patchsets/6.8.2/xorg-x11-6.8.2-patches-0.1.2.tar.bz2

X now works on this machine.  So it seems it's definitely the patchset change. 
Problem is I don't know how to log the errors I'm getting with the later patchset.
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2005-09-24 14:00:42 UTC
Try a binary search of sorts on the patchsets. For example, now try 0.1.5. If
that works, jump forward 2-3 patchsets. If not, jump back 2-3.
Comment 9 dmbkiwi 2005-09-26 01:38:07 UTC
I've compiled 6.8.2-r5 with patchset 1.1.5, and no X.  I've compiled with
patchset 1.1.3, and no X.  So looks like the problem arose between 1.1.2 and
1.1.3.  Is that of any help?
Comment 10 Joshua Baergen (RETIRED) gentoo-dev 2005-09-26 10:22:47 UTC
# (#85363, fd.o #1765) Add another relocation type to the ELF loader.
0487_all_6.8.2-add-relocation-type-10-to-elfloader.patch

# (#82039) Fix direct rendering on R128 because of undefined WRITE_DEPTH
5137_all_6.8.2-fix-r128-undefined-write-depth.patch

# (#82705) dont-grab: Don't grab the keyboard, so combo keyboard/mice work.
9003_all_6.8.2-lnx-evdev-keyboard-dont-grab.patch

# (#80685) GCC4 compile fixes
9913_all_6.8.2-cfbgc-gcc4.patch
9914_all_6.8.2-mmx-gcc4.patch
9915_all_6.8.2-radeon-gcc4.patch

# (fd.o #2750) Fix case where a smaller write-combining region blocks
# write-combining setting of the whole frame buffer. Fix bug in wc setting code
# when regions are first splitted and setting of write-combining then fails.
9920_all_6.8.2-fix-write-combining.patch

These are all the patches that have been added between those sets.  Try
removing/adding them one-by-one and see which patch caused the problem.  Time
consuming, but ccache is your friend.
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2005-09-26 19:35:32 UTC
Here are the changes:

+0487_all_6.8.2-add-relocation-type-10-to-elfloader.patch
+5137_all_6.8.2-fix-r128-undefined-write-depth.patch
+9003_all_6.8.2-lnx-evdev-keyboard-dont-grab.patch
+9913_all_6.8.2-cfbgc-gcc4.patch
+9914_all_6.8.2-mmx-gcc4.patch
+9915_all_6.8.2-radeon-gcc4.patch
+9920_all_6.8.2-fix-write-combining.patch

For each change, you can edit the ebuild to have a line like this, for patch 0487:
patch_exclude 0487

Add this to patch_setup(), where the other patch_exclude's are. An educated
guess would say that 9003 and 5137 are least likely to matter, 0487 a little
less so, then perhaps the others would be the best to test.
Comment 12 Donnie Berkholz (RETIRED) gentoo-dev 2005-09-26 19:36:21 UTC
Woops, looks like I duped what Josh said.
Comment 13 dmbkiwi 2005-09-29 00:11:27 UTC
I've compiled xorg-x11 with patchset 1.1.3, excluding patch 9920, and it works.
 So I've then gone to xorg-x11-6.8.2-r5 (patchset 1.1.12) and excluded patch
9920, and now I'm getting this error:


 * Failed Patch: 9925_all_6.8.2-fix-mtrr-endless-loop.patch !
 *  (
/var/tmp/portage/xorg-x11-6.8.2-r5/work/patch/9925_all_6.8.2-fix-mtrr-endless-loop.patch
)
 *
 * Include in your bugreport the contents of:
 *
 *  
/var/tmp/portage/xorg-x11-6.8.2-r5/temp/9925_all_6.8.2-fix-mtrr-endless-loop.patch-6011.out

So following instructions:

laptop xorg-x11 # cat
/var/tmp/portage/xorg-x11-6.8.2-r5/temp/9925_all_6.8.2-fix-mtrr-endless-loop.patch-6011.out
***** 9925_all_6.8.2-fix-mtrr-endless-loop.patch *****

======================================================

PATCH COMMAND:  patch -p0 -g0 --no-backup-if-mismatch <
/var/tmp/portage/xorg-x11-6.8.2-r5/work/patch/9925_all_6.8.2-fix-mtrr-endless-loop.patch

======================================================
patching file xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
Hunk #1 FAILED at 248.
1 out of 1 hunk FAILED -- saving rejects to file
xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c.rej
======================================================

PATCH COMMAND:  patch -p1 -g0 --no-backup-if-mismatch <
/var/tmp/portage/xorg-x11-6.8.2-r5/work/patch/9925_all_6.8.2-fix-mtrr-endless-loop.patch

======================================================
can't find file to patch at input line 28
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Subject: CVS Update: xc (branch: trunk)
|Date: Sun, 15 May 2005 10:45:47 -0700 (PDT)
|From: Thomas Hellstrom <xorg-commit@cvs.freedesktop.org>
|Reply-To: xorg@lists.freedesktop.org
|To: xorg-commit@lists.freedesktop.org
|
|CVSROOT:    /cvs/xorg
|Module name:    xc
|Changes by: unichrome@gabe.freedesktop.org  05/05/15 10:45:47
|
|Log message:
|  Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop
|  if the offending region refuses to be removed.
|
|Modified files:
|      ./:
|        ChangeLog
|      xc/programs/Xserver/hw/xfree86/os-support/linux/:
|        lnx_video.c
|
|  Revision      Changes    Path
|  1.928         +7 -0      xc/ChangeLog
|  1.7           +2 -3
|xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
|
|--- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c  
2005-06-29 18:41:29.000000000 -0700
|+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c       
2005-06-29 18:45:04.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
======================================================

PATCH COMMAND:  patch -p2 -g0 --no-backup-if-mismatch <
/var/tmp/portage/xorg-x11-6.8.2-r5/work/patch/9925_all_6.8.2-fix-mtrr-endless-loop.patch

======================================================
can't find file to patch at input line 28
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Subject: CVS Update: xc (branch: trunk)
|Date: Sun, 15 May 2005 10:45:47 -0700 (PDT)
|From: Thomas Hellstrom <xorg-commit@cvs.freedesktop.org>
|Reply-To: xorg@lists.freedesktop.org
|To: xorg-commit@lists.freedesktop.org
|
|CVSROOT:    /cvs/xorg
|Module name:    xc
|Changes by: unichrome@gabe.freedesktop.org  05/05/15 10:45:47
|
|Log message:
|  Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop
|  if the offending region refuses to be removed.
|
|Modified files:
|      ./:
|        ChangeLog
|      xc/programs/Xserver/hw/xfree86/os-support/linux/:
|        lnx_video.c
|
|  Revision      Changes    Path
|  1.928         +7 -0      xc/ChangeLog
|  1.7           +2 -3
|xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
|
|--- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c  
2005-06-29 18:41:29.000000000 -0700
|+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c       
2005-06-29 18:45:04.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
======================================================

PATCH COMMAND:  patch -p3 -g0 --no-backup-if-mismatch <
/var/tmp/portage/xorg-x11-6.8.2-r5/work/patch/9925_all_6.8.2-fix-mtrr-endless-loop.patch

======================================================
can't find file to patch at input line 28
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Subject: CVS Update: xc (branch: trunk)
|Date: Sun, 15 May 2005 10:45:47 -0700 (PDT)
|From: Thomas Hellstrom <xorg-commit@cvs.freedesktop.org>
|Reply-To: xorg@lists.freedesktop.org
|To: xorg-commit@lists.freedesktop.org
|
|CVSROOT:    /cvs/xorg
|Module name:    xc
|Changes by: unichrome@gabe.freedesktop.org  05/05/15 10:45:47
|
|Log message:
|  Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop
|  if the offending region refuses to be removed.
|
|Modified files:
|      ./:
|        ChangeLog
|      xc/programs/Xserver/hw/xfree86/os-support/linux/:
|        lnx_video.c
|
|  Revision      Changes    Path
|  1.928         +7 -0      xc/ChangeLog
|  1.7           +2 -3
|xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
|
|--- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c  
2005-06-29 18:41:29.000000000 -0700
|+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c       
2005-06-29 18:45:04.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
======================================================

PATCH COMMAND:  patch -p4 -g0 --no-backup-if-mismatch <
/var/tmp/portage/xorg-x11-6.8.2-r5/work/patch/9925_all_6.8.2-fix-mtrr-endless-loop.patch

======================================================
can't find file to patch at input line 28
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Subject: CVS Update: xc (branch: trunk)
|Date: Sun, 15 May 2005 10:45:47 -0700 (PDT)
|From: Thomas Hellstrom <xorg-commit@cvs.freedesktop.org>
|Reply-To: xorg@lists.freedesktop.org
|To: xorg-commit@lists.freedesktop.org
|
|CVSROOT:    /cvs/xorg
|Module name:    xc
|Changes by: unichrome@gabe.freedesktop.org  05/05/15 10:45:47
|
|Log message:
|  Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop
|  if the offending region refuses to be removed.
|
|Modified files:
|      ./:
|        ChangeLog
|      xc/programs/Xserver/hw/xfree86/os-support/linux/:
|        lnx_video.c
|
|  Revision      Changes    Path
|  1.928         +7 -0      xc/ChangeLog
|  1.7           +2 -3
|xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
|
|--- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c  
2005-06-29 18:41:29.000000000 -0700
|+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c       
2005-06-29 18:45:04.000000000 -0700
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Comment 14 Donnie Berkholz (RETIRED) gentoo-dev 2005-09-29 10:16:43 UTC
(In reply to comment #13)
> I've compiled xorg-x11 with patchset 1.1.3, excluding patch 9920, and it works.
>  So I've then gone to xorg-x11-6.8.2-r5 (patchset 1.1.12) and excluded patch
> 9920, and now I'm getting this error:
> 
> 
>  * Failed Patch: 9925_all_6.8.2-fix-mtrr-endless-loop.patch !

You'll also have to exclude 9925, since it's dependent on 9920.
Comment 15 dmbkiwi 2005-10-04 01:06:49 UTC
Ok, it's now working by excluding patch 9920 and 9925.  So what now?  Is there
something about these patches that tells you what's going on?  Or do I just keep
excluding these patches when I compile xorg.  If so, is there a way to deal with
this without having to edit the ebuilds manually?
Comment 16 Donnie Berkholz (RETIRED) gentoo-dev 2005-10-04 11:20:30 UTC
(In reply to comment #15)
> Ok, it's now working by excluding patch 9920 and 9925.  So what now?

Now we politely ask Josh to drop those two patches from the 6.8.2 patchset. =)

So, Josh?
Comment 17 Joshua Baergen (RETIRED) gentoo-dev 2005-10-04 18:22:08 UTC
Those patches are both still in CVS head so this problem will only come back
once 7.0 is released...

According to the upstream bug from where these patches came
(https://bugs.freedesktop.org/show_bug.cgi?id=2750), this bug affects devices
that set up write-combined MTRR, which your card might not do (hence why you
don't need the patch).  It's unclear as to whether the problem it solves is
critical or just for correctness.

I recommend posting your problem on bugs.freedesktop.org, referencing this bug
and fdo's 2750.  That way we can get this bug actually fixed, instead of delayed.
Comment 18 Joshua Baergen (RETIRED) gentoo-dev 2005-10-06 16:59:28 UTC
Marking bug upstream.

Please post a bug at https://bugs.freedesktop.org and put the link here.  Thanks :)