Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167052 - xorg-server-1.2.0 crashes/doesn't work on sparc (ultra 10) using onboard ATI Rage video
Summary: xorg-server-1.2.0 crashes/doesn't work on sparc (ultra 10) using onboard ATI ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: Sparc64 Linux
: High critical (vote)
Assignee: Gentoo X packagers
Keywords: Inclusion
: 180521 (view as bug list)
Depends on:
Blocks: 175465
  Show dependency tree
Reported: 2007-02-15 15:32 UTC by Dmitry 'MAD' Artamonow
Modified: 2007-08-01 22:18 UTC (History)
2 users (show)

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

Log of X failure with onboard ati (ati-fail-log.txt,19.15 KB, text/plain)
2007-04-20 17:41 UTC, Gustavo Zacarias (RETIRED)
Log of X failure with addon matrox (mga-fail-log.txt,12.92 KB, text/plain)
2007-04-20 17:41 UTC, Gustavo Zacarias (RETIRED)
06_use_proc_instead_of_sysfs_for_pci_domains patch from Debian (06_use_proc_instead_of_sysfs_for_pci_domains.diff,1.65 KB, patch)
2007-07-20 10:06 UTC, Dmitry 'MAD' Artamonow
Details | Diff
working /etc/X11/xorg.conf (xorg.conf,3.28 KB, text/plain)
2007-07-23 08:45 UTC, Dmitry 'MAD' Artamonow
Another xorg.conf file (xorg.conf,1.84 KB, text/plain)
2007-07-24 15:39 UTC, Gustavo Zacarias (RETIRED)
Cleaned-up patch (,561 bytes, patch)
2007-07-27 20:06 UTC, Gustavo Zacarias (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 'MAD' Artamonow 2007-02-15 15:32:56 UTC
Tried to install Xorg on Ultra10 with onboard ATI Rage video. After emerging I tried to configure Xorg (X -configure) and got this error on screen:
Fatal server error:
xf86MapPciMem: Could not mmap PCI memory [base=0xe2000000,hostbase=0xe2000000,size=2000] (Inappropriate ioctl for device)

When I start X with hand-edited xorg.conf (slightly modified /etc/X11/xorg.conf.example) computer locked with black or distorted screen and non-working keyboard.

Downgrading to xorg-server-1.1.1-r4 fixed the problem. I guess it's because of /usr/portage/x11-base/xorg-server/files/1.1.1-sparc64-ati-lockups.patch Though I didn't tried yet to apply it to xorg-server-1.2.0 (recompiling X is very time expensive)

Reproducible: Always

Steps to Reproduce:
1. emerge =xorg-server-1.2.0
2. X -configure

Actual Results:  
sunflower ~ # X -configure

X Window System Version 7.2.0
Release Date: 22 January 2007
X Protocol Version 11, Revision 0, Release 7.2
Build Operating System: Linux sparc64
Current Operating System: Linux sunflower #1 PREEMPT Fri Feb 2 20:17:22 MSK 2007 sparc64
Build Date: 03 February 2007
        Before reporting problems, check
        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: Tue Feb 13 11:14:17 2007
List of video drivers:

Fatal server error:
xf86MapPciMem: Could not mmap PCI memory [base=0xe2000000,hostbase=0xe2000000,size=2000] (Inappropriate ioctl for device)

sunflower ~ # tail -10 /var/log/Xorg.1.log
        [21] -1 0       0x00c00400 - 0x00c004ff (0x100) IX[B](B)
(WW) Attempt to disable VGA routing through Simba at 0:1:0 disallowed.
(II) Primary Device is: PCI 01:02:0
(WW) Attempt to enable VGA routing through Simba at 0:1:1 disallowed.

Fatal server error:
xf86MapPciMem: Could not mmap PCI memory [base=0xe2000000,hostbase=0xe2000000,size=2000] (Inappropriate ioctl for device)

(WW) Attempt to disable VGA routing through Simba at 0:1:0 disallowed.

sunflower ~ # emerge --info
Portage 2.1.1-r2 (default-linux/sparc/sparc64/2006.1, gcc-3.4.6, glibc-2.3.6-r5, 2.6.20 sparc64)
System uname: 2.6.20 sparc64 sun4u
Gentoo Base System release 1.12.6
Last Sync: Mon, 12 Feb 2007 12:59:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r6
CFLAGS="-O2 -mcpu=ultrasparc -pipe"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
LINGUAS="en en_GB ru"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
USE="sparc X alsa alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol bitmap-fonts cli cracklib cups dlloader dri eds elibc_glibc emboss encode fbcon gcc64 gif gtk gtk2 iconv imlib input_devices_keyboard input_devices_mouse isdnlog jpeg kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libwww linguas_en linguas_en_GB linguas_ru mad mbox midi mpeg ncurses nls nptl nptlonly ogg opengl pam pcre perl png pppd python qt3 readline reflection sdl session spl ssl symlink truetype truetype-fonts type1-fonts udev userland_GNU video_cards_fbdev video_cards_mach64 video_cards_mga video_cards_sunffb vorbis xml xorg xv zlib"

sunflower ~ # lspci              
00:00.0 Host bridge: Sun Microsystems Computer Corp. Ultra IIi
00:01.0 PCI bridge: Sun Microsystems Computer Corp. Simba Advanced PCI Bridge (rev 13)
00:01.1 PCI bridge: Sun Microsystems Computer Corp. Simba Advanced PCI Bridge (rev 13)
01:01.0 Bridge: Sun Microsystems Computer Corp. EBUS (rev 01)
01:01.1 Ethernet controller: Sun Microsystems Computer Corp. Happy Meal (rev 01)
01:02.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro 215GP (rev 5c)
01:03.0 IDE interface: Silicon Image, Inc. PCI0646 (rev 03)
02:01.0 USB Controller: Agere Systems USS-344S USB Controller (rev 11)
02:01.1 USB Controller: Agere Systems USS-344S USB Controller (rev 11)
02:01.2 USB Controller: Agere Systems USS-344S USB Controller (rev 11)
02:01.3 USB Controller: Agere Systems USS-344S USB Controller (rev 11)
Comment 1 Gustavo Zacarias (RETIRED) gentoo-dev 2007-04-20 17:39:52 UTC
Tested on my u5 with onboard ati + addon mga, both fail with the following versions:
The rest is plain stable.
Comment 2 Gustavo Zacarias (RETIRED) gentoo-dev 2007-04-20 17:41:11 UTC
Created attachment 116835 [details]
Log of X failure with onboard ati
Comment 3 Gustavo Zacarias (RETIRED) gentoo-dev 2007-04-20 17:41:34 UTC
Created attachment 116837 [details]
Log of X failure with addon matrox
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2007-04-25 01:56:06 UTC
Need your xorg.conf files please.
Comment 5 Gustavo Zacarias (RETIRED) gentoo-dev 2007-04-25 12:18:33 UTC
Same ones work fine on current stable xorg-server, and i specify BusID for the matrox because xorg-server gets confused when i've got both cards in (actually i can have the mga without the ati since it's onboard).
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2007-05-08 06:02:04 UTC
I've talked to Debian people and this is apparently an issue there too.
Comment 7 Benjamin Judas 2007-06-01 09:00:55 UTC
See my bug.

It's related to sysfs. xorg doesn't handle /sys on sparc (and probably on powerpc, too) correctly.

umount /sys and starting X should solve the issue.

They (i.e. the xorg-devs) seem to have hardcoded PCI-Domain 0 in their sourcecodes. This breaks on everything not related to x86.
Comment 8 Gustavo Zacarias (RETIRED) gentoo-dev 2007-06-01 11:29:47 UTC
Basically your bug #180521 is a dupe of this one.
Maybe it works unmounting sysfs, but that's definitely not a solution, sysfs is used by a ton of other stuff so this should be fixed upstream.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-06-01 17:03:09 UTC
*** Bug 180521 has been marked as a duplicate of this bug. ***
Comment 10 Dmitry 'MAD' Artamonow 2007-07-20 10:06:32 UTC
Created attachment 125441 [details, diff]
06_use_proc_instead_of_sysfs_for_pci_domains patch from Debian

I've successfully build and ran xorg-server-1.2.0 using the attached patch, which I borrowed from Debian (they seem to fixed this bug already, see ). Patch is for xorg-server-, and for applying it to xorg-server-1.2.0 sources you'll need to use "patch --ignore-whitespace".

Here's my steps to compile:

echo "<x11-base/xorg-server-1.3.0 ~*" >> /etc/portage/package.keywords
ebuild /usr/portage/x11-base/xorg-server/xorg-server-1.2.0-r3.ebuild unpack
cd /var/tmp/portage/x11-base/xorg-server-1.2.0-r3/work/xorg-server-1.2.0/
patch -p1 -l < ~mad/tmp/06_use_proc_instead_of_sysfs_for_pci_domains.diff
ebuild /usr/portage/x11-base/xorg-server/xorg-server-1.2.0-r3.ebuild compile
ebuild /usr/portage/x11-base/xorg-server/xorg-server-1.2.0-r3.ebuild install
ebuild /usr/portage/x11-base/xorg-server/xorg-server-1.2.0-r3.ebuild qmerge
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2007-07-20 17:23:59 UTC
Need your xorg.conf files please.
Comment 12 Dmitry 'MAD' Artamonow 2007-07-23 08:45:22 UTC
Created attachment 125729 [details]
working /etc/X11/xorg.conf

(In reply to comment #11)
> Need your xorg.conf files please.

Attached, but there's nothing unusual in it IMHO. BTW, I've build xorg-server- with aforementioned patch and it also works fine. Sadly, all versions of xorg-server I tried (even stable 1.1.1) don't work for me with kernels >= 2.6.22. That seems to be another issue, though.
Comment 13 Gustavo Zacarias (RETIRED) gentoo-dev 2007-07-24 15:39:58 UTC
Created attachment 125882 [details]
Another xorg.conf file

More xorg.conf files? Here take mine...
Comment 14 Gustavo Zacarias (RETIRED) gentoo-dev 2007-07-26 18:36:09 UTC
Donnie, any news on the patch you want tested by us? (that you mentioned on #gentoo-dev)
Otherwise might i suggest we work around this with Debian's patch and a sparc kludge?...
Comment 15 Gustavo Zacarias (RETIRED) gentoo-dev 2007-07-27 20:06:53 UTC
Created attachment 126176 [details, diff]
Cleaned-up patch

Cleaned-up patch (otherwise it doesn't apply cleanly for some reason).
Comment 16 Gustavo Zacarias (RETIRED) gentoo-dev 2007-07-27 20:08:08 UTC
And yeah, it works fine here on my tests too.
Dmitry: the X fix for 2.6.22 is queued on the kernel@ guys for the next instance of gentoo-sources-2.6.22 (likely -r2).
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2007-08-01 22:18:17 UTC
Just committed to, thanks for your patience!