Bug 218153 - x11-drivers/xf86-video-intel Undefined symbol "fbPolySegment"
Summary: x11-drivers/xf86-video-intel Undefined symbol "fbPolySegment"
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 (Nobody)
Depends on:
Reported: 2017-03-27 01:57 UTC by Mikhail T.
Modified: 2017-12-27 20:40 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)

xorg.conf (2.84 KB, text/plain)
2017-03-27 19:01 UTC, Mikhail T.
no flags Details
log file with the error (4.98 KB, text/plain)
2017-03-27 19:08 UTC, Mikhail T.
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2017-03-27 01:57:00 UTC
After a full portupgrade today, Xorg will not start-up:

 [  5903.171] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[  5903.171] (EE) Failed to load /usr/local/lib/xorg/modules/drivers/intel_drv.so: /usr/local/lib/xorg/modules/drivers/intel_drv.so: Undefined symbol "fbPolySegment"
[  5903.171] (II) UnloadModule: "intel"
[  5903.171] (II) Unloading intel
[  5903.171] (EE) Failed to load module "intel" (loader failed, 7)
[  5903.171] (EE) No drivers available.
[  5903.171] (EE)  
Fatal server error:
[  5903.171] (EE) no screens found(EE)  
[  5903.172] (EE)


The problem is about month-old, judging by this buzz out there:


Attempting to recreate the xorg.conf again with "Xorg -configure" fail with the same error:

[  2133.610] (II) LoadModule: "modesetting"
[  2133.610] (II) Loading /opt/lib/xorg/modules/drivers/modesetting_drv.so
[  2133.610] (EE) Failed to load /opt/lib/xorg/modules/drivers/modesetting_drv.s
o: /opt/lib/xorg/modules/drivers/modesetting_drv.so: Undefined symbol "shadowUpd
[  2133.610] (II) UnloadModule: "modesetting"
[  2133.610] (II) Unloading modesetting
[  2133.610] (EE) Failed to load module "modesetting" (loader failed, 7)
[  2133.610] (II) LoadModule: "intel"
[  2133.610] (II) Loading /opt/lib/xorg/modules/drivers/intel_drv.so
[  2133.610] (EE) Failed to load /opt/lib/xorg/modules/drivers/intel_drv.so: /op
t/lib/xorg/modules/drivers/intel_drv.so: Undefined symbol "fbPolySegment"
[  2133.610] (II) UnloadModule: "intel"
[  2133.610] (II) Unloading intel
[  2133.610] (EE) Failed to load module "intel" (loader failed, 7)
[  2133.610] No devices to configure.  Configuration failed.

Please, advise.
Comment 1 Mikhail T. 2017-03-27 02:06:27 UTC
Ok, I recovered the use of this computer by adding the following two lines to the "Module" section of /etc/X11/xorg.conf (which was in use, unmodified, for several years):

        Load  "fb"
        Load  "vgahw"

I don't think, it is reasonable to leave such a trick to a _regular_ user to figure out on their own...
Comment 2 Jan Beich freebsd_committer 2017-03-27 03:02:16 UTC
Can you show full contents of xorg.conf and Xorg.0.log? 

- modesetting DDX already[1] loads "shadow" module
- intel DDX already[2] loads "fb" module for UXA while SNA has its own fbPolySegment[3]

[1] https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/driver.c?id=xorg-server-1.18.4#n962
[2] https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/uxa/intel_driver.c?id=78d7a09b0343#n600
[3] https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/sna/fb/fbline.c?id=78d7a09b0343#n156
Comment 3 Matthew Rezny freebsd_committer 2017-03-27 14:47:52 UTC
(In reply to Mikhail T. from comment #0)

If you get those error with no xorg.conf file then I suspect there was a problem with your build. Did portupgrade rebuild all xf86-* ports after xorg-server?

Xorg -configure is known broken for a long time. That is an upstream issue. I have considered patching xorg-server to either disable the option or at least print a big warning stating it doesn't work and recommending no config or very minimal files in xorg.conf.d.
Comment 4 Mikhail T. 2017-03-27 19:01:19 UTC
Created attachment 181240 [details]
Comment 5 Mikhail T. 2017-03-27 19:08:15 UTC
Created attachment 181241 [details]
log file with the error

Here are the requested files. The "fb" and "vgahw" modules are mandatory for the "intel" driver to load without -- regardless of the config-option (UXA or SNA) it was compiled with.

> SNA has its own fbPolySegment

Yes (the sfbPolySegment). But the shared object would not load without "fb" -- because the fbPolySegment symbol will be unresolved anyway.

> Did portupgrade rebuild all xf86-* ports after xorg-server?

Not sure about the order of the upgrade, but all were upgraded. And then I manually rebuilt both xf86-video-intel (with different options) and xorg-server by hand.

Of all the binaries in xorg-server's WRKSRC, the symbol fbPolySegment is only provided by libfb.so -- it really is not that hard to confirm. So the module needs to be loaded... I guess, it was implied before, and needs to be explicit now :-/

I am surprised, you can not reproduce this problem locally...
Comment 6 Mikhail T. 2017-03-27 20:08:55 UTC
> The "fb" and "vgahw" modules are mandatory for the "intel" driver
> to load without

Scratch the "without" part... Sorry for any confusion...
Comment 7 Niclas Zeising freebsd_committer 2017-12-16 20:30:03 UTC
Is this still an issue?
Comment 8 Mikhail T. 2017-12-16 21:47:11 UTC
No idea. I no longer have that computer.
Comment 9 Niclas Zeising freebsd_committer 2017-12-16 21:52:49 UTC
Then I'm closing this for now.  If the issue comes up again, please reopen this, or submit a new PR.
Comment 10 gebhart 2017-12-26 15:25:25 UTC
Yes, this is still an issue. I have the same problem with an i945GM/GMS integrated graphics card. 
For me the solution with adding "fb" and "vgahw" did not help anything.
And yes, I recompiled everything from scratch several times with different options and settings.
No matter if it under 10.3, 10.4 or 11.1 , always the same error with the undefined symbol.
Comment 11 Greg V 2017-12-26 19:33:02 UTC
(In reply to gebhart from comment #10)
Have you tried the modesetting DDX instead of intel?
Comment 12 Johannes Lundberg 2017-12-26 20:59:37 UTC
I use modesetting myself which works better than intel but unfortunately it suffers from tearing a lot. Until modesetting has tearfree support I don't want to recommend that as a "fix". 

Personally I'm hoping to switch to sway (wayland) full time soon to get a nice tearfree desktop...

Would be nice if we could fix the intel ddx though, unless it is ready for the grave. Kind of feels like it's on life support atm.
Comment 13 Jan Beich freebsd_committer 2017-12-27 20:40:02 UTC
Can you check if bug 224621 improved anything? I don't use modesetting due to subpar performance with GL clients.