Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444406 - x11-drivers/xf86-video-trident-1.3.6 - Fails loading with xorg-server-1.13.0-r1, trident_drv.so: undefined symbol: TRIDENT_Sync
Summary: x11-drivers/xf86-video-trident-1.3.6 - Fails loading with xorg-server-1.13.0-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 08:50 UTC by Mark Dominik Bürkle
Modified: 2013-02-24 20:28 UTC (History)
1 user (show)

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


Attachments
my try on a HAVE_XAA_H patch - didn't try it yet (xf86-video-trident-1.3.6-src-trident_dga.c-NO_XAA.patch,1.46 KB, text/plain)
2012-11-23 08:50 UTC, Mark Dominik Bürkle
Details
local overlay with patch for trident_dga.c, compiles and loads in Xorg (usr-local-portage_xf86-video-trident-1.3.6.patched.tgz,4.10 KB, application/x-compressed-tar)
2012-12-07 21:09 UTC, Mark Dominik Bürkle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dominik Bürkle 2012-11-23 08:50:45 UTC
Created attachment 330300 [details]
my try on a HAVE_XAA_H patch - didn't try it yet

X Server fails to start, "no screens defined" because trident_drv failed to load:

[ 19712.297] (EE) Failed to load /usr/lib/xorg/modules/drivers/trident_drv.so: /usr/lib/xorg/modules/drivers/trident_drv.so: undefined symbol: TRIDENT_Sync


as seen in Ubuntu,
 https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-trident/+bug/1044820

in comment #12,
 https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-trident/+bug/1044820/comments/12

-----cut-----
xserver-xorg-video-trident (1:1.3.6-0ubuntu2) quantal; urgency=low

  * fix-loading.diff: Move TRIDENT_Sync inside #ifdef HAVE_XAA_H. Allows
    the driver to load. (LP: #1044820)
 -- Timo Aaltonen <email address hidden> Wed, 26 Sep 2012 11:02:15 +0300
-----cut-----
Comment 1 Mark Dominik Bürkle 2012-11-23 08:51:56 UTC
How do I include a patch in a local ebuild/package?
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-11-23 09:37:25 UTC
See the following information on how to patch this in a local overlay

http://devmanual.gentoo.org/ebuild-writing/functions/src_prepare/epatch/index.html
http://devmanual.gentoo.org/ebuild-writing/misc-files/patches/index.html
http://devmanual.gentoo.org/ebuild-writing/variables/index.html

The first URL specifies how to patch from the ebuild, the second URL shows you how and where to place the patches whereas the third URL shows you what any of the variables you come across expand to. Of course, if there is an epatch_user call present in the ebuild you might as well just place the patch in /etc/portage/patches/CATEGORY/PACKAGE/ where you replace CATEGORY/PACKAGE
Comment 3 Mark Dominik Bürkle 2012-11-23 15:10:43 UTC
I patched the source by using Ctrl-Z to suspend the emerge process.
Now I got a blank screen (not even the "X crashed" message is displayed properly) and the following on stderr:

X: /var/tmp/portage/x11-base/xorg-server-1.13.0-r1/work/xorg-server-1.13.0/dix/pixmap.c:112: AllocatePixmap: Assertion `pScreen->totalPixmapSize > 0' failed.

(captured from a modified /etc/init.d/xdm script that calls strace right after starting the display manager, it's start method ends in
        /etc/X11/startDM.sh
        strace -ff -F -o /tmp/strace-gdm -p $(< "${PIDFILE}")
        eend 0
)

and in Xorg.0.log there is a line about an illegal opcode:

[ 36347.242] (II) Module "ddc" already built-in
[ 36347.243] f000:388c: 01 ILLEGAL EXTENDED X86 OPCODE!
[ 36347.243] (II) TRIDENT(0): VESA VBE DDC not supported

However, I'll stick to xorg-server-1.12 for now, maybe continue patching on sunday.
Comment 4 Mark Dominik Bürkle 2012-12-05 14:17:27 UTC
Today I sold the laptop that has the trident chip in it.

However, yesterday I created an overlay, a patch file and patched binary package in the VirtualBox vm that I used to set up that old laptop (which I still have runnable, but due to the lack of another live eth device, eth0 is down and so the vm is currently unreachable...). I will upload those overlay files when I purchased a switch or eth-loopback plug.


The result of testing the patched binary package on the trident (Toshiba Satellite Pro 6000) laptop was: a black screen, not even GDM's "X Server not running" dialog showed up (though, IIRC, the process list via ssh showed those).


I still have strace files from the manual patching (using Ctrl-Z when emerging xf86-video-trident and patching the sources with the attached patch file) that led to a well-looking Xorg.0.log and the stderr message:

write(2, "X: /var/tmp/portage/x11-base/xorg-server-1.13.0-r1/work/xorg-server-1.13.0/dix/pixmap.c:112: AllocatePixmap: Assertion `pScreen->totalPixmapSize > 0' failed.\n", 158) = 158
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb5c80000
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(16860, 16860, SIGABRT)           = 0
--- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=16860, si_uid=0} ---
+++ killed by SIGABRT +++
strace-gdm.16860 lines 2312-2353/2353 (END)

If anyone is interested in that strace file (running X on a trident CyberBlade XPAi1 laptop) I will upload it here.
Comment 5 Mark Dominik Bürkle 2012-12-05 14:23:15 UTC
To me this looks like a developer has to have a look on trident_dga.c.

What's the process to get this reported upstream - is there someone that has a machine with a trident chip in it?

Kind regards,
mdb
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-12-05 16:50:32 UTC
(In reply to comment #5)
> What's the process to get this reported upstream - is there someone that has
> a machine with a trident chip in it?

Use the homepage listed in the ebuild:

> Homepage:    http://xorg.freedesktop.org/

Find a bug reporting site there (they have Bugzilla) and report it in the right category and product, provide enough details there and for tracking purposes you can then link the downstream and upstream bugs to each other. Please leave a link to the upstream bug here.
Comment 7 Mark Dominik Bürkle 2012-12-07 20:30:29 UTC
in Xorg Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57996
Comment 8 Mark Dominik Bürkle 2012-12-07 21:09:39 UTC
Created attachment 331768 [details]
local overlay with patch for trident_dga.c, compiles and loads in Xorg

to use the patch, have PORTDIR_OVERLAY=/usr/local/portage in /etc/(portage/)make.conf.

Keep in mind that the result is a black screen and (on X's stderr):

AllocatePixmap: Assertion `pScreen->totalPixmapSize > 0' failed.

However, maybe someone can go on from there on.
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-12-25 16:13:20 UTC
I applied the patch in 1.3.6-r1. The black screen issue is likely a different bug in ShadowFB code, which doesn't manifest on earlier xorg-server because the driver defaults to XAA there.
Comment 10 Kyle Evans 2012-12-26 16:02:23 UTC
Sorry for my ignorance on this topic, but that comment seems to suggest that a workaround for the black screen might be to enable XAA in the trident driver. Or do I totally misunderstand the situation?
Comment 11 Matt Turner gentoo-dev 2012-12-26 18:27:42 UTC
(In reply to comment #10)
> Sorry for my ignorance on this topic, but that comment seems to suggest that
> a workaround for the black screen might be to enable XAA in the trident
> driver. Or do I totally misunderstand the situation?

That's right. But XAA was removed from X Server 1.13, so it's not an option there.
Comment 12 Mark Dominik Bürkle 2012-12-26 20:08:20 UTC
I don't have any xaa Header files on my i686 Virtual Machine (which is the source of binpkgs for my former old-and-slow laptop with trident graphics) so I guess automake/configure/whatever is right with #undef HAVE_XAA_H.
 BTW there, xorg-server-1.13.0-r1 is masked because it doesn't work yet with xf86-video-trident...

On the real hardware (a x86_64 Gentoo Linux) I have a file named /usr/include/xorg/xaarop.h which belongs to x11-base/xorg-server-1.13.0-r1. However, this is not xaa.h -- and I don't believe this is due to the different cpu architectures, i686 vs x86_64, until sb proves sth different...

lapms-vb ~ # find / -xdev -path '*/include/*' -name '*xaa*.h'
/usr/include/xorg/xaarop.h
lapms-vb ~ #
Comment 13 Mark Dominik Bürkle 2012-12-27 10:42:51 UTC
xf86-video-trident should be keyworded ~amd64 ~ppc ~x86 since it simply doesn't work.
Most likely it was never used on those platforms, maybe compiled...
Comment 14 Matt Turner gentoo-dev 2012-12-28 00:41:50 UTC
(In reply to comment #13)
> xf86-video-trident should be keyworded ~amd64 ~ppc ~x86 since it simply
> doesn't work.
> Most likely it was never used on those platforms, maybe compiled...

It does work on X Server 1.12, doesn't it?
Comment 15 Mark Dominik Bürkle 2012-12-28 10:16:26 UTC
Yes, it worked on x11-base/xorg-server-1.12.4 with x11-drivers/xf86-video-trident-1.3.5, x11-drivers/xf86-input-keyboard-1.6.1, x11-drivers/xf86-input-mouse-1.7.2 and x11-drivers/xf86-input-evdev-2.7.0.
Comment 16 Kyle Evans 2012-12-28 19:22:23 UTC
(In reply to comment #13)
> xf86-video-trident should be keyworded ~amd64 ~ppc ~x86 since it simply
> doesn't work.
> Most likely it was never used on those platforms, maybe compiled...

amd64 & ppc I am not sure, it is impossible to tell what kind of PC a user might put a video card in. But I have two x86 laptops with trident chips that work under 1.12, so I am not sure why you would suggest keywording trident. That is not going to make things stable for someone with trident video. Maybe having trident depend on <x11-base/xorg-server-1.13, but last I knew, portage did not deal well with those kinds of back and forth dependancies. 

I know this bug is closed with the original bug being fixed, but if I use EXA, X starts ok, but goes black on exit with a dead keyboard as opposed to going black on startup. I shall add this info to a more appropriate bug when I have more time.

    Option    "AccelMethod" "EXA"
Comment 17 Kyle Evans 2012-12-28 22:34:35 UTC
Ok yea, I added "<=x11-base/xorg-server-1.13" to the RDEPEND= of the unmasked x11-drivers/xf86-video-trident/xf86-video-trident-1.3.6.ebuild and it worked beautifully, giving me a warning that it was skipping the upgrade to xorg-server-1.13.... 

ebuild RDEP: https://bugs.gentoo.org/show_bug.cgi?id=449112

upstream EXA bug: https://bugs.freedesktop.org/show_bug.cgi?id=58841