OVERVIEW: When I run startx, the (X) server can't load the vesa driver and without a working driver, X fails to start. The log indicates that ioBase can't be found in vesa_drv.so but I can see it defined in vesa.h which vesa.c includes. STEPS TO REPRODUCE: 1) Tell xorg to use the vesa driver (the radeon driver doesn't seem to be available for PowerPC) $ cat /usr/local/etc/X11/xorg.conf.d/driver-radeon.conf # https://www.freebsd.org/doc/handbook/x-config.html#x-config-video-cards-file # http://mac.linux.be/content/g4-emac-1ghz-radeon Section "Device" Identifier "ATI Technologies Inc Radeon RV200 QW [Radeon 7500]" # Driver "radeon" Driver "vesa" BusID "PCI:0:16:0" EndSection 2) As a user (i.e. not root), run `startx` Note I've tried building xorg from ports as well as using prebuilt packages from https://joshcummings.net/pub/FreeBSD/FreeBSD%3a10%3apowerpc/2016Q1/All/ which were apparently built using Poudriere. ACTUAL RESULTS: (stdout) $ startx xauth: file /home/damonz/.serverauth.887 does not exist xauth: (argv):1: bad display name "emac.local:0" in "list" command xauth: (stdin):1: bad display name "emac.local:0" in "add" command X.Org X Server 1.17.4 Release Date: 2015-10-28 X Protocol Version 11, Revision 0 Build Operating System: FreeBSD 10.2-RELEASE powerpc Current Operating System: FreeBSD emac.local 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 05:18:20 UTC 2016 ro ot@releng1.nyi.freebsd.org:/usr/obj/powerpc.powerpc/usr/src/sys/GENERIC powerpc Build Date: 22 March 2016 06:14:55PM Current version of pixman: 0.32.8 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. 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: Wed Jul 27 19:41:47 2016 (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d" (EE) Fatal server error: (EE) no screens found(EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error xauth: (argv):1: bad display name "emac.local:0" in "remove" command feel sad (/var/log/Xorg.0.log) [ 396.980] X.Org X Server 1.17.4 Release Date: 2015-10-28 [ 396.981] X Protocol Version 11, Revision 0 [ 396.981] Build Operating System: FreeBSD 10.2-RELEASE powerpc [ 396.981] Current Operating System: FreeBSD emac.local 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 05:18:20 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/powerpc.powerpc/usr/src/sys/GENERIC powerpc [ 396.982] Build Date: 22 March 2016 06:14:55PM [ 396.982] [ 396.982] Current version of pixman: 0.32.8 [ 396.982] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 396.982] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 396.983] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Jul 27 19:41:47 2016 [ 397.071] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d" [ 397.102] (==) ServerLayout "Default Layout" [ 397.102] (**) |-->Screen "Screen0" (0) [ 397.102] (**) | |-->Monitor "Monitor[0]" [ 397.103] (**) | |-->Device "ATI Technologies Inc Radeon RV200 QW [Radeon 7500]" [ 397.103] (==) Automatically adding devices [ 397.103] (==) Automatically enabling devices [ 397.103] (==) Not automatically adding GPU devices [ 397.257] (==) FontPath set to: /usr/local/share/fonts/misc/, /usr/local/share/fonts/TTF/, /usr/local/share/fonts/OTF/, /usr/local/share/fonts/Type1/, /usr/local/share/fonts/100dpi/, /usr/local/share/fonts/75dpi/ [ 397.257] (==) ModulePath set to "/usr/local/lib/xorg/modules" [ 397.257] (II) The server relies on devd to provide the list of input devices. If no devices become available, reconfigure devd or disable AutoAddDevices. [ 397.257] (II) Loader magic: 0x1a2001c [ 397.258] (II) Module ABI versions: [ 397.258] X.Org ANSI C Emulation: 0.4 [ 397.258] X.Org Video Driver: 19.0 [ 397.258] X.Org XInput driver : 21.0 [ 397.258] X.Org Server Extension : 9.0 [ 397.258] (WW) xf86EnableIO -1 [ 397.258] (II) xf86EnableIO: ffffffff [ 397.258] (WW) Can't map IO space! [ 397.259] (--) PCI: (0:0:16:0) 1002:5157:1002:5157 rev 0, Mem @ 0x98000000/134217728, 0x90000000/65536, I/O @ 0x00000400/256, BIOS @ 0x????????/65536 [ 397.259] (II) "glx" will be loaded by default. [ 397.259] (II) LoadModule: "int10" [ 397.277] (II) Loading /usr/local/lib/xorg/modules/libint10.so [ 397.282] (II) Module int10: vendor="X.Org Foundation" [ 397.282] compiled for 1.17.4, module version = 1.0.0 [ 397.282] ABI class: X.Org Video Driver, version 19.0 [ 397.282] (II) LoadModule: "vbe" [ 397.283] (II) Loading /usr/local/lib/xorg/modules/libvbe.so [ 397.285] (II) Module vbe: vendor="X.Org Foundation" [ 397.285] compiled for 1.17.4, module version = 1.1.0 [ 397.285] ABI class: X.Org Video Driver, version 19.0 [ 397.285] (II) LoadModule: "glx" [ 397.286] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so [ 397.332] (II) Module glx: vendor="X.Org Foundation" [ 397.332] compiled for 1.17.4, module version = 1.0.0 [ 397.332] ABI class: X.Org Server Extension, version 9.0 [ 397.333] (==) AIGLX enabled [ 397.333] (II) LoadModule: "vesa" [ 397.333] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so [ 397.338] (EE) Failed to load /usr/local/lib/xorg/modules/drivers/vesa_drv.so: /usr/local/lib/xorg/modules/drivers/vesa_drv.so: Undefined symbol "ioBase" [ 397.338] (II) UnloadModule: "vesa" [ 397.338] (II) Unloading vesa [ 397.338] (EE) Failed to load module "vesa" (loader failed, 7) [ 397.338] (EE) No drivers available. [ 397.338] (EE) Fatal server error: [ 397.338] (EE) no screens found(EE) [ 397.338] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 397.339] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 397.339] (EE) [ 397.339] (EE) Server terminated with error (1). Closing log file. EXPECTED RESULTS: xorg starts and displays twm and xterm BUILD DATE & HARDWARE: I have an Apple eMac. $ uname -a FreeBSD emac.local 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 05:18:20 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/powerpc.powerpc/usr/src/sys/GENERIC powerpc # pciconf -lcv hostb0@pci0:0:11:0: class=0x060000 card=0x00000000 chip=0x002d106b rev=0x00 hdr=0x00 vendor = 'Apple Inc.' device = 'UniNorth 1.5 AGP' class = bridge subclass = HOST-PCI cap 02[80] = AGP 4x 2x 1x SBA disabled vgapci0@pci0:0:16:0: class=0x030000 card=0x51571002 chip=0x51571002 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]' device = 'RV200 [Radeon 7500/7500 LE]' class = display subclass = VGA cap 02[58] = AGP 4x 2x 1x SBA disabled cap 01[50] = powerspec 2 supports D0 D1 D2 D3 current D0 ... # dmesg | grep cpu cpu0: Motorola PowerPC 7455 revision 3.3, 1000.26 MHz cpu0: Features 9c000000<PPC32,ALTIVEC,FPU,MMU> cpu0: HID0 8450c0bc<EMCP,TBEN,NAP,DPM,ICE,DCE,SGE,BTIC,LRSTK,FOLD,BHT> cpulist0: <Open Firmware CPU Group> on ofwbus0 cpu0: <Open Firmware CPU> on cpulist0 ADDITIONAL NOTES: In spite of the ports manual I don't know enough about patching ports yet to change the code and print things out. When I try to make changes to /usr/ports/x11-drivers/xf86-video-vesa/work/xf86-video-vesa-2.3.4/src/vesa.c, make install clobbers them. Let me know if I can provide other details. Thank you, - d
I'm still stuck but I tried to make some progress on my own. Right now I'm thinking an include is missing or something similar to that. I reinstalled 10.3, changed my /etc/make.conf to: 1 DEVELOPER=yes 2 3 WITH_CTF=1 4 WITH_DEBUG=yes and rebuilt x11 ports (xorg-server, xauth, xinit, xf86-video-vesa, jwm). I still see the same issue but I at least have debugging symbols now. 1) Does objdump verify that ioBase is in fact defined or not? When I do: cd /usr/local/lib/xorg/modules/drivers objdump --dynamic-syms vesa_drv.so I can see ioBase is undefined 122 00000000 D *UND* 00000000 VBEBankSwitch 123 00007c1c g DF .text 0000000c Base _restgpr_30 124 00007b90 g DF .text 0000004c Base _restfpr_14 125 00007bf0 g DF .text 00000038 Base _restgpr_19 126 00000000 D *UND* 00000000 xf86DPMSInit 127 00000000 D *UND* 00000000 miGetDefaultVisualMask 128 00000000 D *UND* 00000000 ioBase 129 00007b1c g DF .text 00000028 Base _savefpr_23 130 00007b2c g DF .text 00000018 Base _savefpr_27 131 00007b58 g DF .text 00000038 Base _savegpr_19 132 00007bc4 g DF .text 00000018 Base _restfpr_27 133 00007c10 g DF .text 00000018 Base _restgpr_27 134 00007cb4 g DF .text 00000024 Base _restgpr_27_x I know a little bit of C but I'm pretty much out of my depth here. I'm guessing that the error message is right and .so really doesn't have ioBase defined or what's calling it needs to know about ioBase but it doesn't. http://www.sourceware.org/binutils/docs/binutils/objdump.html says UND means the symbol is referenced but not defined here. I see it defined in /usr/ports/x11-drivers/xf86-video-vesa/work/xf86-video-vesa-2.3.4/src/vesa.h: 80 typedef struct _VESARec 81 { 82 vbeInfoPtr pVbe; 83 EntityInfoPtr pEnt; 84 CARD16 major, minor; ... 112 Bool accessEnabled; 113 OptionInfoPtr Options; 114 unsigned long ioBase; 115 Bool ModeSetClearScreen; 116 void *shadow; 117 ShadowUpdateProc update; 118 ShadowWindowProc window; 119 } VESARec, *VESAPtr; and vesa.c includes it. 2) How can I see what loads vesa_drv.so get in gdb? I know I can do ldd to see the libraries a binary links to. So that a config can be used to set the driver, I know I won't see vesa_drv.so when I look at xorg: $ ldd /usr/local/bin/Xorg /usr/local/bin/Xorg: libcrypto.so.7 => /lib/libcrypto.so.7 (0x41b3b000) libpciaccess.so.0 => /usr/local/lib/libpciaccess.so.0 (0x41cfd000) libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x41d17000) libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x41d28000) libXfont.so.1 => /usr/local/lib/libXfont.so.1 (0x41fa9000) libXau.so.6 => /usr/local/lib/libXau.so.6 (0x4200e000) libxshmfence.so.1 => /usr/local/lib/libxshmfence.so.1 (0x42022000) libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x42035000) librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x4204c000) libm.so.5 => /lib/libm.so.5 (0x42065000) libc.so.7 => /lib/libc.so.7 (0x4209b000) libthr.so.3 => /lib/libthr.so.3 (0x42234000) libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x4226b000) libz.so.6 => /lib/libz.so.6 (0x42359000) libfontenc.so.1 => /usr/local/lib/libfontenc.so.1 (0x4237d000) libbz2.so.4 => /usr/lib/libbz2.so.4 (0x42396000) I can't do the reverse though and see what loads a library. I installed gdb 7.10. But I don't see how to step into the code that tries to load vesa_drv.so. I basically get one line of code to execute and that's not helpful at all: # gdb710 --tui --args Xorg -conf /root/xorg.conf.new ┌──stubmain.c────────────────────────────────────────────────────────────────────────────────┐ │26 int dix_main(int argc, char *argv[], char *envp[]); │ │27 │ │28 /* │ │29 A default implementation of main, which can be overridden by the DDX │ │30 */ │ │31 int │ │32 main(int argc, char *argv[], char *envp[]) │ │33 { │ │34 return dix_main(argc, argv, envp); │ │35 } │ ┌────────────────────────────────────────────────────────────────────────────────────────────┐ │0x181c518 <main> stwu r1,-32(r1) │ │0x181c51c <main+4> mflr r0 │ │0x181c520 <main+8> stw r31,24(r1) │ │0x181c524 <main+12> stw r0,36(r1) │ │0x181c528 <main+16> mr r31,r1 │ │0x181c52c <main+20> stw r3,8(r31) │ │0x181c530 <main+24> stw r4,12(r31) │ │0x181c534 <main+28> stw r5,16(r31) │ │0x181c538 <main+32> lwz r3,8(r31) │ │0x181c53c <main+36> lwz r4,12(r31) │ │0x181c540 <main+40> lwz r5,16(r31) │ └────────────────────────────────────────────────────────────────────────────────────────────┘ exec No process In: L?? PC: ?? and "show warranty" for details. This GDB was configured as "powerpc-portbld-freebsd10.3". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from Xorg...done. (gdb) start Temporary breakpoint 1 at 0x181c538: file stubmain.c, line 34. Starting program: /usr/local/bin/Xorg -conf /root/xorg.conf.new Temporary breakpoint 1, main (argc=3, argv=0xffffd840, envp=0xffffd850) at stubmain.c:34 (gdb) n [Inferior 1 (process 73001) exited with code 01] (gdb) This video has some things I haven't tried so I'll give that a shot: https://youtu.be/713ay4bZUrw?t=43m. 3) I can use truss where I can see the error happen but I'd really like to see the code: # truss -fo truss-xorg-conf-root-xorg-new Xorg -config /root/xorg.conf.new 478 73041: stat("/usr/local/lib/xorg/modules/drivers/vesa_drv.so",{ mode=-rwxr-xr-x ,inode=2411937,size=92916,blksize=32768 }) = 0 (0x0) 479 73041: stat("/usr/local/lib/xorg/modules/drivers/fbdev_drv.so",{ mode=-rwxr-xr-x ,inode=2412710,size=73167,blksize=32768 }) = 0 (0x0) 480 73041: getdirentries(0x4,0x42880000,0x1000,0x4287f084) = 0 (0x0) 481 73041: close(4) = 0 (0x0) 482 73041: write(2,"List of video drivers:\n",23) = 23 (0x17) 483 73041: clock_gettime(4,{ 20379.720870973 }) = 0 (0x0) 484 73041: write(0,"[ 20379.720] ",13) = 13 (0xd) 485 73041: write(0,"List of video drivers:\n",23) = 23 (0x17) 486 73041: write(2,"\tvesa\n",6) = 6 (0x6) 487 73041: clock_gettime(4,{ 20379.722989227 }) = 0 (0x0) 488 73041: write(0,"[ 20379.722] ",13) = 13 (0xd) 489 73041: write(0,"\tvesa\n",6) = 6 (0x6) 490 73041: write(2,"\tfbdev\n",7) = 7 (0x7) 491 73041: clock_gettime(4,{ 20379.724856510 }) = 0 (0x0) 492 73041: write(0,"[ 20379.724] ",13) = 13 (0xd) 493 73041: write(0,"\tfbdev\n",7) = 7 (0x7) 494 73041: write(2,"\tmodesetting\n",13) = 13 (0xd) 495 73041: clock_gettime(4,{ 20379.726715322 }) = 0 (0x0) 496 73041: write(0,"[ 20379.726] ",13) = 13 (0xd) 497 73041: write(0,"\tmodesetting\n",13) = 13 (0xd) 498 73041: clock_gettime(4,{ 20379.727474425 }) = 0 (0x0) 499 73041: write(0,"[ 20379.727] ",13) = 13 (0xd) 500 73041: write(0,"(II) LoadModule: "vesa"",23) = 23 (0x17) 501 73041: write(0,"\n",1) = 1 (0x1) 502 73041: open("/usr/local/lib/xorg/modules/freebsd/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,01) ERR#2 'No such file or directory' 503 73041: open("/usr/local/lib/xorg/modules/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,01) = 4 (0x4) 504 73041: fstatfs(4,{ fstypename=ufs,mntonname=/,mntfromname=/dev/ada0s3,fsid=57b68b44ee2d35c7 }) = 0 (0x0) 505 73041: getdirentries(0x4,0x42880000,0x1000,0x4287f0b4) = 276 (0x114) 506 73041: stat("/usr/local/lib/xorg/modules/drivers/",{ mode=drwxr-xr-x ,inode=2412429,size=512,blksize=32768 }) = 0 (0x0) 507 73041: open("/usr/local/lib/xorg/modules/drivers/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,00) = 5 (0x5) 508 73041: fstatfs(5,{ fstypename=ufs,mntonname=/,mntfromname=/dev/ada0s3,fsid=57b68b44ee2d35c7 }) = 0 (0x0) 509 73041: getdirentries(0x5,0x42881000,0x1000,0x4287f0e4) = 96 (0x60) 510 73041: stat("/usr/local/lib/xorg/modules/drivers/modesetting_drv.so/",0xffffc898) ERR#20 'Not a directory' 511 73041: stat("/usr/local/lib/xorg/modules/drivers/vesa_drv.so/",0xffffc898) ERR#20 'Not a directory' 512 73041: close(5) = 0 (0x0) 513 73041: close(4) = 0 (0x0) 514 73041: clock_gettime(4,{ 20379.731177120 }) = 0 (0x0) 515 73041: write(0,"[ 20379.731] ",13) = 13 (0xd) 516 73041: write(0,"(II) Loading /usr/local/lib/xorg"...,61) = 61 (0x3d) 517 73041: __sysctl(0xffffcb44,0x2,0x41b30d80,0xffffcb4c,0x0,0x0) = 0 (0x0) 518 73041: __sysctl(0xffffcb44,0x2,0x41b30e80,0xffffcb4c,0x0,0x0) = 0 (0x0) 519 73041: __sysctl(0xffffcb44,0x2,0x41b30f80,0xffffcb4c,0x0,0x0) = 0 (0x0) 520 73041: __sysctl(0xffffcb44,0x2,0x41b31080,0xffffcb4c,0x0,0x0) = 0 (0x0) 521 73041: __sysctl(0xffffcb44,0x2,0x41b31180,0xffffcb4c,0x0,0x0) = 0 (0x0) 522 73041: openat(AT_FDCWD,"/usr/local/lib/xorg/modules/drivers/vesa_drv.so",O_CLOEXEC,00) = 4 (0x4) 523 73041: fstat(4,{ mode=-rwxr-xr-x ,inode=2411937,size=92916,blksize=32768 }) = 0 (0x0) 524 73041: mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,4,0x0) = 1102221312 (0x41b29000) 525 73041: mmap(0x0,102400,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 1111265280 (0x423c9000) 526 73041: mmap(0x423c9000,36864,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,4,0x0) = 1111265280 (0x423c9000) 527 73041: mmap(0x423e1000,4096,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,4,0x8000) = 1111363584 (0x423e1000) 528 73041: munmap(0x41b29000,4096) = 0 (0x0) 529 73041: close(4) = 0 (0x0) 530 73041: munmap(0x423c9000,102400) = 0 (0x0) 531 73041: clock_gettime(4,{ 20379.735593770 }) = 0 (0x0) 532 73041: write(0,"[ 20379.735] ",13) = 13 (0xd) 533 73041: write(0,"(EE) Failed to load /usr/local/l"...,144) = 144 (0x90) 534 73041: clock_gettime(4,{ 20379.736342239 }) = 0 (0x0)
I just wanted to add that I'm facing the same problem on my iBook G4. Like the OP said, the radeon driver isn't an option (building x11-drivers/xf86-video-ati says "xf86-video-ati-7.5.0,1 is only for i386 amd64, while you are running powerpc"), so I'm basically left with the vesa driver (or maybe fbdev? which doesn't work either; that one says "Module fbdevhw does not have a fbdevhwModuleData data object"). This laptop has a Radeon 9550 card.
In https://github.com/FreeBSDDesktop/freebsd-ports/tree/zeising/xf86-driver-update there's an update of the vesa driver. Can you please try it out? Regrards -- Niclas
Feedback timeout. Please test with updated ports, if this is still an issue, re-open the PR or open a new one.