FreeBSD on the PowerMac G-series

FreeBSD on Alpha, PC98, PowerPC or Sparc64. This forum is also for questions related to porting FreeBSD to new architectures.

FreeBSD on the PowerMac G-series

Postby sossego » 03 May 2010, 00:55

[ Post number 30 in this thread contains new insights and should be read as the first post in this thread -> http://forums.freebsd.org/showthread.php?p=124420#post124420 - Mod. ]

FreeBSD is a rich and robust operating system with its origins in UNIX which was began when Dennis Ritchie decided to port a game called Space Traveler to a PDP7. From here, he, Ken Thomson, and Rudd Carnady would develop a hierarchal system that would define the computing industry. Forty-one years have passed since that decision was made and UNIX has branched off into different operating systems. It has become a standard within itself.
FreeBSD was born from a project based on AT&T UNIX and has developed into a stable and trustworthy operating system. With a kernel and userland bound together as a single system, FreeBSD can be installed on anything from routers to supercomputers, from Desktops to laptops, and from PDAs to embedded devices. It is used by all walks of life. From the research scientist to the cafe owner, from government agencies to small cafes, FreeBSD is available as an Open and Free operating system in many languages.
In the early nineteen nineties, Apple, IBM, and Motorola formed an alliance into which the creation of the POWER architecture became one of the first RISC processors to be used by the general public for personal use. The load-store mechanism of the Power cpu allows it to "predict" the next set of commands, making it efficient in executing code. It is no wonder why Apple, Genesi, IBM, and others have preferred this chip in previous and/or current products.
Today, we shall combine the efficiency of this processor with the stability of FreeBSD by installing FreeBSD 9.0 PowerPC SNAPSHOT on a Blue & White G3.You will need the following equipment.
1) An Apple G3 or G4 with New World Open Firmware, a 60G ATA hard disk, 386M RAM, a working CD-RW/DVD-ROM, and the rest of the tower plus monitor, mouse, and keyboard.
2) A Debian PowerPC Install disk. The Net install image or business card will do.
3) An Ubuntu PPC live CD. "Hoary Hedgehog" 5.0x is what I used. There are also live images available from the Debian live project if you wish to use one.
4) Disc 1 of 9.0 PowerPC SNAPSHOT.
5) Lots of patience.
Let us begin, shall we.
Start by burning all three discs with your favorite CD burning program. My preference is to use k3b. Either with the G3/4 or on another computer, place the SNAPSHOT Disc 1 in the tray and close it. Do not let the disc be autmoatically mounted. You are going to create a directory and mount the disc through the command line.
Open a terminal and issue the following commands.
Code: Select all
 $mkdir /home/$USER/cdrom
$su
Password:
# mount -t cd9660 -o ro /dev/$CDROM /home/$USER/cdrom

Copy the hfs1.boot image to your home directory and change the permissions.
Code: Select all
 # cp /home/$USER/cdrom/path/to/hfs1.boot /home/$USER && chmod 0666 /home/$USER/hfs1.boot
# cd
# umount /dev/$CDROM
# rmdir /home/$USER/cdrom
# exit
$ exit


Email yourself the hfs1.boot file. You will need it later during the exercise.

Place the Debian install cd into the drive of the G3/4 and reboot the computer while holding down the Option and Alt buttons. Immediately press the O and F buttons while still holding down the others until you see the white background of the Open Firmware Forth prompt. Issue the following commands.
Code: Select all
 > setenv boot-device cd:0
> mac-boot

let the system boot and fill in all applicable data until you arrive at the partitioning screen. Choose the following: Whole disk, automatic partitioning, and all files in one partition. Now look at the table and delete the / and swap partitions. You should be left with the APM and New World Boot Block areas. Create the following partitions with the following values. Use ext3 as the default non-swap areas.
a) 2600M mounted as /
b) 1G as swap
c) 2200M mounted as /tmp
d) 2200M mounted as /var
e) 25G mounted as /usr
f) the remaining area mounted as /home.
Commit the changes to the disk and let Debian begin downloading the distribution. Immediately shutoff the computer and restart it in the Open Firmware Forth prompt. Remove the Debian CD and place the SNAPSHOT disc 1 into the tray. Issue the same commands to set the cd as the first boot device followed by the
Code: Select all
 >mac-boot
command. let the CD load and fill in all applicable data. When you come to the root menu, set the networking up first. You may need to add a value to hostname. For mine, I chose "tima.tiza." After setting this value and bringing up your network, return to the root menu and choose the fixit option. Enter this submenu and choose the shell. Immediately switch over to tty4 and begin by issuing the following commands.

Code: Select all
 gpart show ad0
Notice that / is the second and not first partition. Issue the following commands.
Code: Select all
 gpart modify -i2 -t freebsd ad0
gpart modify -i3 -t freebsd-swap ad0
gpart modify -i4 -t freebsd ad0
gpart modify -i5 -t freebsd ad0
gpart modify -i6 -t freebsd ad0
gpart modify -i7 -t freebsd ad0

Anytime during this you may check the partitions with
Code: Select all
 gpart show ad0

When you are finished exit and return to the root menu. Use disklabel to edit the names of the partitions. You must choose a partition with C and then give it a value. Your list should be in the following order: /, swap, /tmp, /var, /usr, /home. Now you will choose the distribution set. Choose minimum and the CD(media) as the source. When you have finished installing, set up all srvices as usual, create a user with wheel privileges, enter the root password and finish. Do not install the ports system, that will come later. REboot the G3/4 and enter the Open Firmware Forth prompt again. Remove the SNAPSHOT disc 1 and place in the livecd. Let it boot and the Desktop come up. Open firefox and guide yourself to the email where you had uploaded the hfs1.boot file. Download it to the Desktop and quit the browser. Open a terminal and issue the following sets of commands.
Code: Select all
$ sudo -s
# ls /dev
(hdc is the hard disk)
# fdisk /dev/hdc
p:
(/dev/hdc2 is the boot partition.)
q:
# dd if=/home/ubuntu/Desktop/hfs1.boot of=/dev/hdc2
# exit
$ exit


Reboot the computer and be sure to remove the disk.
Let the system start and log in as the normal user. You will create a directory from which the rest of the system can be obtained. Place the SNAPSHOT disc 1 into the drive, close it, and issue the following commands.
Code: Select all
 $ mkdir cdrom
$ su
Password:
# mount -t cd9660 -o ro /dev/acd0 cdrom/
# cd 9*
(Here you can either enter each directory and install or use the following. Do not reinstall the base set or kernel.)
# sh $DIRECTORY/install.sh
Be sure to cd to / and unmount the disc. Remove it.
Because you are using another processor architecture, you must set the flags in make.conf. I have a G3/750 so a few of these values will be different. Look for the proper flags for your G4.
Code: Select all
 vi /etc/make.conf
(Add the following values under the decleration of the PERL version)
CPUTYPE?=powerpc
CFLAGS= -mcpu=G3 -Os -mmultiple -mstring -fno-strict-aliasing -pipe

You will now setup Xorg. Pciutils mustbe installed first.
Code: Select all
 # cd /usr/ports/sysutls/pciutils
# make install clean

You are going to setup Xorg. Remember that when it comes to drivers for your card, choose only the card that you have installed.
Code: Select all
 # cd /usr/ports/x11/xorg && make install clean

Now you must "turn off" the frame buffer.
Code: Select all
 sysctl hw.ofwfb.relax_mmap=1

Set up the database.
Code: Select all
 /usr/libexec/locate.updatedb

Set up subversion.
Code: Select all
 # cd /usr/ports/devel/subversion
# make install clean

Setting up the actual xorg.conf file takes a few tweaks.
Code: Select all
 # cd
# Xorg -configure -retro

Use vi to edit the new xorg.conf.new file in your /root directory. Add the following values to the Server Layout Section.
Code: Select all
 Option "UseFBDev" "False"
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 03 May 2010, 00:55

Copy xorg.conf.new to xorg.conf
Code: Select all
 # cp /root/xorg.conf.new /etc/X11/xorg.conf

Edit May 5, 2010: Wait on the following to be in ports.
{Now we will setup firefox and install libxul to be used later.
Code: Select all
 # cd /usr/ports/www/libxul
# rm -rf *
# svn co https://trillian.chruetertee.ch/svn/freebsd-gecko/branches/experimental/www/libxul-devl
# cd libxul-devel
# make -j 2 && make install && make clean

The build took between eight and nine hours. I fell asleep waiting. You may want to do something else during this time. Once the build has fin ished, return to the G3/4 and install firefox.
Code: Select all
 # cd /usr/ports/www/firefox
# rm -rf *
# svn co https://trillian.chruetertee.ch/svn/freebsd-gecko/trunk/www/firefox/
# cd firefox
# make -j2


This will take a few hours. You can take it easy. Return to the G3/4. Firefox needs to be "set up" before you can install it.
Code: Select all
 cd work/moz*/browser
# sh confvars.sh
# cd /usr/ports/www/firefox/firefox
# make -j2 && make install && make clean
}

Edit May 5, 2010: The above was built with an experimental build. I will add according to ports status.

Reboot your computer and do a system check.
When the boot menu comes up, hit the spacebar and enter the following at the prompt:
Code: Select all
 boot -s

Run fsck over each partition that is UFS2.
Code: Select all
 # fsck -y /dev/ad0s3
# fsck -y /dev/ad0s5
# fsck -y /dev/ad0s6
# fsck -y /dev/ad0s7
# fsck -y /dev/ad0s8
# exit


Login as your regular user and startx.
Until it is fixed, please remember the following.
1) You are limited to only using TWM.
2) You cannot switch ttys after starting your X session.
3) The mouse must remain in the firefox window while using firefox. If it leaves, it can get "caught" in a terminal and you will have to do a hard reboot.
4) There is a firmware issue which has not yet been resolved. When you leave an X session you must switch to another tty then switch back to tty0. there will be no working monitor but still type in the following commands.
Code: Select all
 $ su
Password:
# halt -p
(Or if you want to reboot)
# reboot
.

I had some problems with firefox, so I rewrote this howto using vi on the G3.


I would like to thank the FreeBSD developers- especially FreeBSD-gecko and the FreeBSD PowerPC team- along with the BSD communities for their help, patience, and understanding through this project.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 03 May 2010, 00:57

Xorg.conf if someone wants to use it.
Code: Select all
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
        Option         "AllowEmptyInput"    "Off"
        Option          "UseFBDev"  "False"
EndSection

Section "Files"
   ModulePath   "/usr/local/lib/xorg/modules"
   FontPath     "/usr/local/lib/X11/fonts/misc/"
   FontPath     "/usr/local/lib/X11/fonts/TTF/"
   FontPath     "/usr/local/lib/X11/fonts/OTF"
   FontPath     "/usr/local/lib/X11/fonts/Type1/"
   FontPath     "/usr/local/lib/X11/fonts/100dpi/"
   FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
   Load  "extmod"
   Load  "record"
   Load  "dbe"
   Load  "glx"
   Load  "dri"
   Load  "dri2"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver      "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "auto"
   Option       "Device" "/dev/sysmouse"
   Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "Monitor Vendor"
        HorizSync    30-85
        VertRefresh  48-160
   ModelName    "StudioDsply1"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"               # [<bool>]
        #Option     "SWcursor"              # [<bool>]
        #Option     "Dac6Bit"               # [<bool>]
        #Option     "Dac8Bit"               # [<bool>]
        #Option     "DMAForXv"              # [<bool>]
        #Option     "ForcePCIMode"          # [<bool>]
        #Option     "CCEPIOMode"            # [<bool>]
        #Option     "CCENoSecurity"         # [<bool>]
        #Option     "CCEusecTimeout"        # <i>
        #Option     "AGPMode"               # <i>
        #Option     "AGPSize"               # <i>
        #Option     "RingSize"              # <i>
        #Option     "BufferSize"            # <i>
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "Display"               # <str>
        #Option     "PanelWidth"            # <i>
        #Option     "PanelHeight"           # <i>
        #Option     "ProgramFPRegs"         # [<bool>]
         Option     "UseFBDev"                   "False"   
        #Option     "VideoKey"              # <i>
        #Option     "ShowCache"             # [<bool>]
        #Option     "VGAAccess"             # [<bool>]
   Identifier  "Card0"
   Driver      "r128"
   VendorName  "ATI Technologies Inc"
   BoardName   "Rage 128 RE/SG"
   BusID       "PCI:0:16:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   SubSection "Display"
      Viewport   0 0
      Depth     1
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection



uname -a
Code: Select all
FreeBSD tima.tiza 9.0-20100418-SNAP FreeBSD 9.0-20100418-SNAP #0: Sun Apr 18 06:51:02 UTC 2010     root@dynode.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  powerpc
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 04 May 2010, 09:40

We are going to add a window manager, a faster browser, and a text editor.
Code: Select all
 $ su
Password:
# cd /usr/ports/www/dillo2
# make  -j 1 && make install && make clean
# cp /usr/local/etc/dillo/dillorc /home/$USER/.dillo/
# chown $USER dillorc

Now for the editor.
Code: Select all
 # cd /usr/ports/editors/scite
# make -j 1 && make install && make clean

Time for the window manager.
Code: Select all
 # cd /usr/ports/x11-wm/enlightenment
# make -j 1 && make install && make clean

Time to set it all up. The default resolution is 1600x1200.
You are going to want to edit a few lines in dillorc.
Code: Select all
 # exit (It's about time we left root.)

Let's enter X and begin the editing process.
Code: Select all
 $ cd $ /usr/local/bin/startx

Do not choose the login term to do this.
Code: Select all
 $ cd /home/$USER/.dillo $ SciTE
(Use the drop down menu and choose "All files".

Suggestions for values in dillorc:
Font size from 10 to 20.
Font size factor leave at 1.
Send http referrer heading as none. Privacy is a must.
Download directory.
Code: Select all
 $ mkdir /home/$USER/dillo_downloads

Set the download directory to the value above.
Set all other values to what you want.
You'll have to save the file as dillorc2.
Now let's apply our changes
Code: Select all
 $ pwd (Should be /home/$USER/.dillo)
$ rm dillorc $ mv dillorc2 dillorc

We will "pre-start" enlightenment.
Code: Select all
 $ /usr/local/bin/enlightenment_start

It's going to die but that's okay.
Let's set it up to be started much easier.
Code: Select all
 $ SciTE

You are going to create a new file.
Enter the following values.
Code: Select all
 /usr/local/bin/startx /usr/local/bin/enlightenment_start

Save the file as gui.sh .

When next you turn on your G3/4, you can use

Code: Select all
 $ sh gui.sh


to start your X session.

Just remember what I mentioned earlier about X and the firmware.
Even though you can't see it,
the commands can still be and will still be enabled once you hit enter.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 05 May 2010, 09:45

Note May 5, 2010: If you are having troubles building firefox because svn doesn't allow access, then wait. The howto will be updated and noted according to ports. The update and edit dates will be noted for each change. Older entries will be in brackets followed by before and after edit/update changes.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 05 May 2010, 11:32

Note May 5, 2010: I have libxul-devel and xulrunner if you need them. You may ask me for my BSD/Linux only email and I will give it to you.
Write me from the address you want the items sent to and I will reply within a day or two.
I also have the firefox 3.6.3,1 build from earlier if you need that.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 21 Jun 2010, 04:26

You can install kde4 on the PowerPC with a few exceptions.
Do not install kdeedu because ocaml is x86 dependent.
You may also need to set the path for kdelibs when installing kde3.x.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 14 Dec 2010, 04:05

Note that agp has issues and that such a system run great as a server. Until it is dealt with, try to remain with pci graphics. If you do decide to use agp and wish to build the modules- There is some trouble with drm, check the mailing lists for discussions.- use the 9.0 snapshot.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 12 Jan 2011, 18:10

If you are using the PowerPC snapshot 9 for the 32 bit architecture, you will need to update your ports tree to the latest version.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 16 Jan 2011, 23:36

Here goes.

On Powermacs with agp graphics cards.

Code: Select all
# cd /usr/src/sys/modules/agp
# make install clean
# kldload agp


Edit /boot/defaults/loader.conf
Code: Select all
agp_load="NO"

should be
Code: Select all
agp_load="YES"


Try making the resolution as high as possible. I'm not sure if multiple modes are able.

Oh, and thanks to tingo for the encouragement.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 17 Jan 2011, 06:28

I currently am running lxde on the machine.
Current problems are:
The mouse pointer will go to the upper left corner of the screen when I physically lift the mouse.
Xxxterm would not completely exit.

Since neither of these occured on the previous- make that a few hours ago- run with fluxbox,
I'll say that lxde may not be the desktop you want to try.
After kazehakase finishes building, I'll try another wm/desktop session manager.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby tingo » 17 Jan 2011, 16:29

Just one small correction: you shouldn't edit files in [FILE]*/defaults/*[/FILE] directories; instead, edit the correct file. so for [FILE]/boot/defaults/loader.conf[/FILE], that would be [FILE]/boot/loader.conf[/FILE]. If such a file doesn't exist, create it. Hope this helps.
Torfinn
tingo
Member
 
Posts: 948
Joined: 16 Nov 2008, 22:02
Location: Oslo, Norway

Postby sossego » 17 Jan 2011, 18:25

He's right on that one.

For installing bash, there may be a break in the build.
When this happens, do the following:
Code: Select all
# cd work/bash*
# ./configure
# gmake && gmake install clean
# cd /usr/ports/shells/bash
# make install clean
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 17 Jan 2011, 22:44

If any port build breaks, try the following:
1) Cd to the work directory then to the application directory.
Code: Select all
# cd work/<application name>

2) Configure with gmake.
Code: Select all
# ./configure && gmake && gmake install clean

3) Return to the port parent directory.
Code: Select all
# cd .. && cd ..

4) Rerun make
Code: Select all
# make install clean

5) Update the system.
Code: Select all
# /usr/libexec/locate.updatedb


I've borked the kazehakase install process somewhere.


Since the kernel of the snapshot has witnessed enabled, you may want to rebuild it with that option disabled.
Be sure to:
1) Have the kernel parameters in /boot/defaults/loader.conf set to the defaults.
2) Follow the handbook instructions for rebuilding the kernel.
3) Backup the old kernel.

After it finishes, you will need to reboot. Before you do, write down the exact location of the new kernel.

4) Reboot the machine.
5) Halt the boot process by hitting the space bar.
6) Type "help" at the console.
7) Look for the option for loading the kernel.
8) Follow the directions.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby tingo » 21 Jan 2011, 22:55

sossego wrote:Here goes.

On Powermacs with agp graphics cards.

Code: Select all
# cd /usr/src/sys/modules/agp
# make install clean
# kldload agp


Question: when you [CMD="#"]kldload agp[/CMD], do you get output related to that on console and / or in /var/log/messages?
I just tried on my PowerMac G4 (which now runs 8.2-prerelease), and I didn't get any output after loading agp, and [CMD="#"]Xorg -configure -retro[/CMD] still hangs the machine. :-/
Torfinn
tingo
Member
 
Posts: 948
Joined: 16 Nov 2008, 22:02
Location: Oslo, Norway

Postby sossego » 21 Jan 2011, 23:14

Add the Modelines.

Give me a sec to login from the G4.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby sossego » 21 Jan 2011, 23:19

Here is my /etc/X11/xorg.conf from the G4. Use it as a guide to compare it with your own.

It built for me using the snapshot 9 that I constantly mention.

I'll need to edit .xinitrc to use fluxbox because Xfce4 and lxde are strange.
Once I do, I'll post the full dmesg here.
Hold on again.

Code: Select all
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   InputDevice    "Mouse0" "CorePointer"
   InputDevice    "Keyboard0" "CoreKeyboard"
        Option         "UseFBDev"  "False"
        Option         "AllowEmptyInput"  "Off"
EndSection

Section "Files"
   ModulePath   "/usr/local/lib/xorg/modules"
   FontPath     "/usr/local/lib/X11/fonts/misc/"
   FontPath     "/usr/local/lib/X11/fonts/TTF/"
   FontPath     "/usr/local/lib/X11/fonts/OTF"
   FontPath     "/usr/local/lib/X11/fonts/Type1/"
   FontPath     "/usr/local/lib/X11/fonts/100dpi/"
   FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Module"
   Load  "extmod"
   Load  "record"
   Load  "dbe"
   Load  "glx"
   Load  "dri"
   Load  "dri2"
EndSection

Section "InputDevice"
   Identifier  "Keyboard0"
   Driver      "kbd"
EndSection

Section "InputDevice"
   Identifier  "Mouse0"
   Driver      "mouse"
   Option       "Protocol" "auto"
   Option       "Device" "/dev/sysmouse"
   Option       "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "DELL"
   ModelName    "D1025TM"
        HorizSync    30.0-85.0
        VertRefresh  50.0-120.0
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"               # [<bool>]
        #Option     "SWcursor"              # [<bool>]
        #Option     "Dac6Bit"               # [<bool>]
        #Option     "Dac8Bit"               # [<bool>]
        #Option     "BusType"               # [<str>]
        #Option     "CPPIOMode"             # [<bool>]
        #Option     "CPusecTimeout"         # <i>
        Option     "AGPMode"                    "4"   
        #Option     "AGPFastWrite"          # [<bool>]
        Option     "AGPSize"                   "64"   
        #Option     "GARTSize"              # <i>
        #Option     "RingSize"              # <i>
        Option     "BufferSize"                 "2"   
        #Option     "EnableDepthMoves"      # [<bool>]
        #Option     "EnablePageFlip"        # [<bool>]
        #Option     "NoBackBuffer"          # [<bool>]
        #Option     "DMAForXv"              # [<bool>]
        #Option     "FBTexPercent"          # <i>
        #Option     "DepthBits"             # <i>
        #Option     "PCIAPERSize"           # <i>
        #Option     "AccelDFS"              # [<bool>]
        #Option     "IgnoreEDID"            # [<bool>]
        #Option     "CustomEDID"            # [<str>]
        #Option     "DisplayPriority"       # [<str>]
        #Option     "PanelSize"             # [<str>]
        #Option     "ForceMinDotClock"      # <freq>
        Option     "ColorTiling"           "True"
        #Option     "VideoKey"              # <i>
        #Option     "RageTheatreCrystal"    # <i>
        #Option     "RageTheatreTunerPort"    # <i>
        #Option     "RageTheatreCompositePort"    # <i>
        #Option     "RageTheatreSVideoPort"    # <i>
        #Option     "TunerType"             # <i>
        #Option     "RageTheatreMicrocPath"    # <str>
        #Option     "RageTheatreMicrocType"    # <str>
        #Option     "ScalerWidth"           # <i>
        #Option     "RenderAccel"           # [<bool>]
        #Option     "SubPixelOrder"         # [<str>]
        #Option     "ClockGating"           # [<bool>]
        #Option     "VGAAccess"             # [<bool>]
        #Option     "ReverseDDC"            # [<bool>]
        #Option     "LVDSProbePLL"          # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "DRI"                   # [<bool>]
        #Option     "ConnectorTable"        # <str>
        #Option     "DefaultConnectorTable"    # [<bool>]
        #Option     "DefaultTMDSPLL"        # [<bool>]
        #Option     "MacModel"              # <str>
        #Option     "TVDACLoadDetect"       # [<bool>]
        #Option     "ForceTVOut"            # [<bool>]
        #Option     "TVStandard"            # <str>
        #Option     "IgnoreLidStatus"       # [<bool>]
        #Option     "DefaultTVDACAdj"       # [<bool>]
        #Option     "Int10"                 # [<bool>]
        #Option     "EXAVSync"              # [<bool>]
        #Option     "ATOMTVOut"             # [<bool>]
        #Option     "R4xxATOM"              # [<bool>]
        #Option     "ForceLowPowerMode"     # [<bool>]
        #Option     "DynamicPM"             # [<bool>]
        #Option     "NewPLL"                # [<bool>]
        #Option     "ZaphodHeads"           # <str>
   Identifier  "Card0"
   Driver      "ati"
   VendorName  "ATI Technologies Inc"
   BoardName   "Radeon RV200 QW [Radeon 7500]"
   BusID       "PCI:0:16:0"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   SubSection "Display"
      Viewport   0 0
      Depth     1
                Modes      "1024x768" "1280x1024"
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     4
                Modes      "1024x768" "1280x1024"
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     8
                Modes      "1024x768" "1280x1024"
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     15
                Modes      "1024x768" "1280x1024"
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     16
                Modes      "1024x768" "1280x1024"
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Depth     24
                Modes      "1024x768" "1280x1024"
   EndSubSection
EndSection


Maybe it will help you some.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby tingo » 21 Jan 2011, 23:20

Or perhaps the problem is that my G4 doesn't have an AGP gfx card?
Code: Select all
root@kg-g4# pciconf -lv | grep -A4 vga
vgapci0@pci0:0:16:0:   class=0x030000 card=0xa5b80208 chip=0x011010de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'NVIDIA GeForce2 MX/MX 400 (NV11)'
    class      = display
    subclass   = VGA


As long as running Xorg hangs my machine, editing xorg.conf will never help.
Torfinn
tingo
Member
 
Posts: 948
Joined: 16 Nov 2008, 22:02
Location: Oslo, Norway

Postby sossego » 21 Jan 2011, 23:35

Use pastebinit to upload your xorg.conf.new from /root and I'll see if there is anything that i can do to help further.
You may also want to post a pastebinit of /var/log/Xorg.0.log, dmesg, and /root/xorg.conf.new to the ppc mailing lists.

You can rerun with
Code: Select all
/usr/local/bin/Xorg -logverbose -9 -verbose 9 -logfile <make a logfile in /root or /home/$USER> -config -retro


or test your output with
Code: Select all
-config /root/xorg.conf.new
instead of the retro option.

I know that it is a *beep**beep**beep**beep**beep* to get it working. Trust me, it took a while for the G3 to work and just a few days ago for the G4 to work.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby tingo » 22 Jan 2011, 00:02

There is nothing to see; Xorg never wrote anything to the xorg.conf.new file:
Code: Select all
root@kg-g4# ls -l /root/xorg.conf.new
-rw-r--r--  1 root  wheel  0 Jan 21 23:43 /root/xorg.conf.new
That is the problem; Xorg hangs to machine (locks it hard) when it is started; there isn't even any output in /var/log/messages.
Torfinn
tingo
Member
 
Posts: 948
Joined: 16 Nov 2008, 22:02
Location: Oslo, Norway

Postby wblock@ » 22 Jan 2011, 00:35

tingo wrote:There is nothing to see; Xorg never wrote anything to the xorg.conf.new file:
Code: Select all
root@kg-g4# ls -l /root/xorg.conf.new
-rw-r--r--  1 root  wheel  0 Jan 21 23:43 /root/xorg.conf.new
That is the problem; Xorg hangs to machine (locks it hard) when it is started; there isn't even any output in /var/log/messages.


Add
Code: Select all
Option "Log" "sync"

to the ServerLayout section.
User avatar
wblock@
Old Fart
 
Posts: 10227
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby sossego » 22 Jan 2011, 01:19

Tingo, install pastebinit from the ports and then
Code: Select all
$ /usr/local/bin/pastebinit -b http://slexy.org -i /var/log/Xorg.0.log


Output dmesg to a file on the user's home directory and send it.

Code: Select all
$ cd
$ dmesg|tee dmesg-output.txt
$ /usr/local/bin/pastebinit -b http://slexy.org -i dmesg-output.txt


Run the initial Xorg from root once more and then log it.

Code: Select all
# cd
# /usr/local/bin/Xorg -config -retro


I adjusted the flags for the card because I searched for whatever would make it properly work. Your card will have different flags.

Look to see if agp is in your kernel directory.

Post the kldstat here.

When you restart the machine. Hit the space bar and type boot -s at the command prompt.
Follow that with
Code: Select all
fsck -y && exit


When X hangs, the system still works.
Hold down ctrl + alt + f1 an then hit ctrl + c.
Xorg will be stopped. For assurance, hit ctrl + c once more.
Type in reboot and then enter.

It will reboot.

Post the slexy view links here and we'll try to work through it with you.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby tingo » 22 Jan 2011, 18:49

wblock, sossego - you make good suggestions. There is only one problem; the machine is locked hard. As soon as I press enter on the Xorg... command line, the machine locks up. It doesn't even switch to another vty first. Hard, as in "completely unresponsive". It doesn't react to input at all. I have ssh'ed in from another machine; that shell is dead. I've tried ctrl-alt-f1 (and the others) even if the first console is still visible; no reaction. The /var/log/Xorg.log file isn't even created, and nothing is written in /var/log/messages (not even if I boot verbose). dmesg output for both normal and verbose is available at: http://sites.google.com/site/tingox/powermac_g4_freebsd
Torfinn
tingo
Member
 
Posts: 948
Joined: 16 Nov 2008, 22:02
Location: Oslo, Norway

Postby sossego » 22 Jan 2011, 19:09

Code: Select all
boot -s


Code: Select all
fsck -y && exit


Don't start Xorg.
Code: Select all
dmesg|tail


Post the possible error here. Your disk may be locking up or a possible board error.

Also, since I am not running FreeBSD right now, look at the man pages for Xorg and related to see if there is still the probe only option and then use it.
You underestimate what each person can do. You believe that status equals ability. I'm here to prove you wrong.
∞√(ω)/{R}
User avatar
sossego
Senior Member
 
Posts: 1410
Joined: 03 Mar 2009, 05:11
Location: qualquer na ontem da amanhã

Postby tingo » 22 Jan 2011, 19:37

No; if I don't try to run Xorg, the machine works fine (in fact it is running portupgrade right now). I will try the Xorg -probeonly later, but I guess that it will lock the machine too.
Torfinn
tingo
Member
 
Posts: 948
Joined: 16 Nov 2008, 22:02
Location: Oslo, Norway

Next

Return to Other Architectures

Who is online

Users browsing this forum: No registered users and 0 guests