# Trying to figure out my eth0 module

## wrs4

When building the kernel, I did the make modules_install, etc.  I didn't put the eth0 module into modules.autoload.  When I do the old 

```
cat /proc/pci |grep net
```

I get

```
    Ethernet controller: Broadcom Corporation NetXtreme BCM5702 Gigabit Ethernet (rev 2).
```

Which module does this correspond to?

----------

## dberkholz

make menuconfig:

```
Network device support  --->

Ethernet (1000 Mbit)  --->

< > Broadcom BCM5700 support
```

----------

## wrs4

I compiled it in as a module; still don't know which module to put in the autoload file though.....

----------

## dberkholz

Try

```
# grep BROADCOM /usr/src/linux/.config

CONFIG_NET_BROADCOM=m
```

Perhaps load NET_BROADCOM, or BROADCOM.

----------

## wrs4

well, there's a 'broadcom.h' header file lying around, and a broadcom directory parallel to it, so I'd guess that's what I'm looking for.  However, when I do the

```
make dep && make clean bzImage modules modules_install
```

the modules_install portion echoes lots of "nothing to do" messages, and I don't see any "broadcom.o" files present.

On top of that, lsmod returns a list of absolutely no modules at all.  I didn't see it covered in the install guide, and I don't have experience doing this, so what does it take to get the modules where I can use them?

----------

## dberkholz

lsmod only lists loaded modules. Try 

```
ls /lib/modules/`uname -r`/kernel/drivers/net/
```

That'll list all the net modules in your running kernel.

----------

## wrs4

Hmm...while I was waiting for a reply I did find . -name "*.o" -print |grep net  and used the bcm5700 one that showed up.  Did the trick nicely.   :Wink: 

Working on XFree and the agpgart issue that lots of people seem to find.  Found some info at https://forums.gentoo.org/viewtopic.php?t=46681.  Having a Matrox G450 dual vid card, I'm trying to get powerdesk going, along with the DRI stuff.  Of course, they assume you have XFree < 4.2.0, so I'm trying some tricks.  I'll probably be pestering them on their forum directly   :Very Happy:  in the near future.

You've been quite helpful.  Thank you ever so much.

----------

## dberkholz

 *wrs4 wrote:*   

> Found some info at https://forums.gentoo.org/viewtopic.php?t=46681 .... I'll probably be pestering them on their forum directly   in the near future.

 

"them", eh? More like me. =D

Good solution to your problem.

----------

## wrs4

Err...well, I might pester you too.  "Them" was my unclear (apparently) reference to "Matrox"   :Very Happy: 

----------

## dberkholz

I actually just got a Matrox card using xfree-drm, so lemme know if you have troubles.

----------

## wrs4

Will do.  I have a G450 that I've used successfully with Red Hat 7.[1-3] and 9.0 (and corresponding stock XFree86 installs).

What I've done to this point is

install drm according to your instructions on the other page (complete with kernel de-optimizations)

install the latest Matrox mga drivers tarball (which provides HAL and something else; more on this in a moment)

install the latest Matrox PowerDesk software (also more in a minute)

Copy my old XF86Config file into place

The mga drivers tarball contains code for 4.0.3 and 4.1.0.  One of the Matrox forum threads indicated that for later versions of XFree, one could cp -rp the 4.1.0 directory to the approrpiate new version (at the time, 4.2.0) and run the install script.  I did this for 4.3.0 (the version included with the latest Gentoo release).

The latest PowerDesk tarball is for 4.2.0.  I installed it as well.

Running startx flickered, went black, flickered again, and died with error messages.

There's a thread on the Matrox forum where someone indicated the existence of an ebuild for the Parhelia card (in case that helps you).  I've asked to see if there is one for the G450 (I have the same username on that forum, if you're interested).

I'll keep you posted on how things go.

----------

## wrs4

I'm going to elaborate here on what I did to get this working.  I'll update in the event that I figure out whether I actually have DRI working  :Very Happy: 

I followed the instructions at  https://forums.gentoo.org/viewtopic.php?t=46681, which helped me put DRI into my kernel.  I'll probably go narrow down the supported boards I have compiled into my kernel, since at the moment I have everything but the kitchen sink in there.

Once that was completed, I installed the Matrox G450 PowerDesk and HAL software (available here under the Millennium G450 row).  Presently, the mgadrivers.tgz tarball only contains drivers for X through 4.2.0.  To install for 4.3.0, you will have to extract the tarball and do the following:

```

# tar xvfz mgadrivers-2.0.tgz && rm -f mgadrivers-2.0.tgz

mgadrivers/

mgadrivers/install.sh

mgadrivers/README

mgadrivers/xfree86/

mgadrivers/xfree86/4.0.3/

mgadrivers/xfree86/4.0.3/drivers/

mgadrivers/xfree86/4.0.3/drivers/mga_drv.o

mgadrivers/xfree86/4.0.3/drivers/mga_hal_drv.o

mgadrivers/xfree86/4.1.0/

mgadrivers/xfree86/4.1.0/dri/

mgadrivers/xfree86/4.1.0/dri/mga_dri.so

mgadrivers/xfree86/4.1.0/drivers/

mgadrivers/xfree86/4.2.0/

mgadrivers/xfree86/4.2.0/dri/

mgadrivers/xfree86/4.2.0/dri/mga_dri.so

mgadrivers/xfree86/4.2.0/drivers/

# cd mgadrivers/xfree86

# cp -rp 4.2.0 4.3.0

# cd ..

# sh install.sh

```

When it prompts to install each module, type 'y' and hit return.

You will also need to install the PowerDesk software:

```

# tar xvfz mgapdesk-1_00-7beta_src.tgz

... extraction list edited out ...

# cd mgapdesk

# ./configure --prefix=/usr/X11R6

# make

# make install

```

Once I did that, I used the emerged xfree XF86Config.example and my previously working Red Hat 9 XF86Config to create the following XF86Config file:

```

# $XFree86: xc/programs/Xserver/hw/xfree86/XF86Conf.cpp,v 3.45 2003/02/20 04:05:12 dawes Exp $

#

# Copyright (c) 1994-1998 by The XFree86 Project, Inc.

#

# Permission is hereby granted, free of charge, to any person obtaining a

# copy of this software and associated documentation files (the "Software"),

# to deal in the Software without restriction, including without limitation

# the rights to use, copy, modify, merge, publish, distribute, sublicense,

# and/or sell copies of the Software, and to permit persons to whom the

# Software is furnished to do so, subject to the following conditions:

# 

# The above copyright notice and this permission notice shall be included in

# all copies or substantial portions of the Software.

# 

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL

# THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,

# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF

# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

# SOFTWARE.

# 

# Except as contained in this notice, the name of the XFree86 Project shall

# not be used in advertising or otherwise to promote the sale, use or other

# dealings in this Software without prior written authorization from the

# XFree86 Project.

#

# $XConsortium: XF86Conf.cpp /main/22 1996/10/23 11:43:51 kaleb $

# **********************************************************************

# This is a sample configuration file only, intended to illustrate

# what a config file might look like.  Refer to the XF86Config(4/5)

# man page for details about the format of this file. This man page

# is installed as /usr/X11R6/man/man5/XF86Config.5x 

# **********************************************************************

# The ordering of sections is not important in version 4.0 and later.

# **********************************************************************

# Files section.  This allows default font and rgb paths to be set

# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the

# file minus the extension (like ".txt" or ".db").  There is normally

# no need to change the default.

    RgbPath   "/usr/X11R6/lib/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),

# as well as specifying multiple comma-separated entries in one FontPath

# command (or a combination of both methods)

    FontPath   "/usr/X11R6/lib/X11/fonts/local/"

    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"

    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"

    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"

    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"

    FontPath   "/usr/X11R6/lib/X11/fonts/CID/"

    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"

    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"

    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"

# ModulePath can be used to set a search path for the X server modules.

# The default path is shown here.

#    ModulePath   "/usr/X11R6/lib/modules"

EndSection

# **********************************************************************

# Module section -- this is an optional section which is used to specify

# which run-time loadable modules to load when the X server starts up.

# **********************************************************************

Section "Module"

    Load   "dbe"

    Load   "dri"

    Load   "glx"

# This loads the miscellaneous extensions module, and disables

# initialisation of the XFree86-DGA extension within that module.

    SubSection   "extmod"

        Option   "omit xfree86-dga"

    EndSubSection

# This loads the Type1 and FreeType font modules

    Load   "type1"

    Load   "freetype"

EndSection

# **********************************************************************

# Server flags section.  This contains various server-wide Options.

# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is 

# received.  This may leave the console in an unusable state, but may

# provide a better stack trace in the core dump to aid in debugging

#    Option   "NoTrapSignals"

# Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence

# (where n is 1 through 12).  This allows clients to receive these key

# events.

#    Option   "DontVTSwitch"

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence

# This allows clients to receive this key event.

#    Option   "DontZap"

# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching

# sequences.  This allows clients to receive these key events.

    Option   "DontZoom"

# Uncomment this to disable tuning with the xvidtune client. With

# it the client can still run and fetch card and monitor attributes,

# but it will not be allowed to change them. If it tries it will

# receive a protocol error.

#    Option   "DisableVidModeExtension"

# Uncomment this to enable the use of a non-local xvidtune client.

#    Option   "AllowNonLocalXvidtune"

# Uncomment this to disable dynamically modifying the input device

# (mouse and keyboard) settings.

#    Option   "DisableModInDev"

# Uncomment this to enable the use of a non-local client to

# change the keyboard or mouse settings (currently only xset).

#    Option   "AllowNonLocalModInDev"

# Set the basic blanking screen saver timeout.

    Option   "blank time"   "10"   # 10 minutes

# Set the DPMS timeouts.  These are set here because they are global

# rather than screen-specific.  These settings alone don't enable DPMS.

# It is enabled per-screen (or per-monitor), and even then only when

# the driver supports it.

    Option   "standby time"   "20"

    Option   "suspend time"   "30"

    Option   "off time"   "60"

# On some platform the server needs to estimate the sizes of PCI

# memory and pio ranges. This is done by assuming that PCI ranges

# don't overlap. Some broken BIOSes tend to set ranges of inactive

# devices wrong. Here one can adjust how aggressive the assumptions

# should be. Default is 0.

# Option   "EstimateSizesAggresively" "0"

EndSection

# **********************************************************************

# Input devices

# **********************************************************************

# **********************************************************************

# Core keyboard's InputDevice section

# **********************************************************************

Section "InputDevice"

    Identifier   "Keyboard1"

    Driver   "keyboard"

# Set the keyboard auto repeat parameters.  Not all platforms implement

# this.

    Option   "AutoRepeat"   "500 5"

# Specifiy which keyboard LEDs can be user-controlled (eg, with xset(1)).

#    Option   "Xleds"   "1 2 3"

# If you'd like to switch the positions of your capslock and

# control keys, use:

#

#    Option   "XkbOptions"   "ctrl:swapcaps"

# These are the default XKB settings for XFree86

#

    Option   "XkbRules"   "xfree86"

    Option   "XkbModel"   "pc105"

#    Option   "XkbModel"   "pc101"

    Option   "XkbLayout"   "us"

EndSection

# **********************************************************************

# Core Pointer's InputDevice section

# **********************************************************************

Section "InputDevice"

# Identifier and driver

    Identifier   "Mouse1"

    Driver   "mouse"

# The mouse protocol and device.  The device is normally set to /dev/mouse,

# which is usually a symbolic link to the real device.

    Option   "Protocol"   "PS/2"

    Option   "Device"   "/dev/mouse"

    Option  "ZAxisMapping"  "4 5"

EndSection

# **********************************************************************

# Monitor section

# **********************************************************************

# Any number of monitor sections may be present

Section "Monitor"

   Identifier   "Display 1"

   VendorName   "Monitor Vendor"

   ModelName    "E90fb"

   DisplaySize  360   270

   HorizSync    30.0 - 86.0

   VertRefresh  50.0 - 150.0

   Option       "dpms"

EndSection

Section "Monitor"

   Identifier   "Display 2"

   VendorName   "Monitor Vendor"

   ModelName    "E90fb"

   DisplaySize  360   270

   HorizSync    30.0 - 86.0

   VertRefresh  50.0 - 150.0

EndSection

Section "Monitor"

   Identifier   "Display Merged"

   VendorName   "Monitor Vendor"

   ModelName    "E90fb"

   DisplaySize  360   270

   HorizSync    30.0 - 86.0

   VertRefresh  50.0 - 150.0

EndSection

# **********************************************************************

# Graphics device section

# **********************************************************************

Section "Device"

   Identifier  "MATROX CARD 1"

   Driver      "mga"

   VendorName  "Videocard vendor"

   BoardName   "Matrox Millennium G450"

   VideoRam    32768

   Option      "hw cursor" "off"

   BusID       "PCI:1:0:0"

EndSection

Section "Device"

   Identifier  "MATROX CARD 2"

   Driver      "mga"

   VendorName  "Videocard vendor"

   BoardName   "Matrox Millennium G450"

   VideoRam    32768

   Option      "hw cursor" "off"

   BusID       "PCI:1:0:0"

   Screen      1

EndSection

# **********************************************************************

# Screen sections.

# **********************************************************************

Section "Screen"

   Identifier "Display 1"

   Device     "MATROX CARD 1"

   Monitor    "Display 1"

   DefaultDepth     24

   SubSection "Display"

      Depth     24

      Modes    "1600x1200"

   EndSubSection

   SubSection "Display"

      Depth     8

      Modes    "1600x1200"

   EndSubSection

   SubSection "Display"

      Depth     16

      Modes    "1600x1200"

   EndSubSection

EndSection

Section "Screen"

   Identifier "Display 2"

   Device     "MATROX CARD 2"

   Monitor    "Display 2"

   DefaultDepth     24

   SubSection "Display"

      Depth     24

      Modes    "1600x1200"

   EndSubSection

   SubSection "Display"

      Depth     8

      Modes    "1600x1200"

   EndSubSection

   SubSection "Display"

      Depth     16

      Modes    "1600x1200"

   EndSubSection

EndSection

Section "Screen"

   Identifier "Display Merged"

   Device     "MATROX CARD 1"

   Monitor    "Display Merged"

   DefaultDepth     24

   Option      "Monitor2Position" "LeftOf"

   Option      "MergedFB"

   Option      "MetaModes" "1600x1200-1600x1200 1600x1200 "

   Option      "Monitor2HSync" "30.0-86.0 "

   Option      "Monitor2VRefresh" "50.0-150.0 "

   SubSection "Display"

      Virtual   3200 1200

      Depth     24

      Modes    "1600x1200"

   EndSubSection

EndSection

Section "DRI"

   Group        0

   Mode         0666

EndSection

# **********************************************************************

# ServerLayout sections.

# **********************************************************************

# Any number of ServerLayout sections may be present.  Each describes

# the way multiple screens are organised.  A specific ServerLayout

# section may be specified from the X server command line with the

# "-layout" option.  In the absence of this, the first section is used.

# When now ServerLayout section is present, the first Screen section

# is used alone.

Section "ServerLayout"

   Identifier     "Matrox PowerDesk configured."

   Screen      0  "Display Merged" 0 0

   InputDevice    "Mouse1" "CorePointer"

   InputDevice    "Keyboard1" "CoreKeyboard"

EndSection

```

To use X as a non-root user without X locking on load, I had to

```

# cd /dev

# chgrp users mouse

# chgrp users misc/psaux

```

Last edited by wrs4 on Wed Jun 11, 2003 8:00 pm; edited 1 time in total

----------

## dberkholz

 *wrs4 wrote:*   

> I'm going to elaborate here on what I did to get this working.  I'll update in the event that I figure out whether I actually have DRI working 

 

Nice. This could be very helpful for anyone setting up a dual-head configuration.

To figure out whether DRI is working:

```
$ glxinfo | grep render

direct rendering: Yes

OpenGL renderer string: Mesa DRI G200 20020221 AGP 1x x86/MMX
```

It should say Yes for direct rendering, and something other than Indirect for renderer string.

----------

## wrs4

direct rendering comes up as "No".

----------

## dberkholz

 *wrs4 wrote:*   

> 
> 
> ```
> Section "DRI" 
> 
> ...

 

First, get rid of the Group entry. It's meaningless in your XF86Config.

Go through and re-check your kernel config.

MTRR compiled in, AGPGART compiled in, AGP chipset compiled in, DRM not in at all. Make sure /usr/src/linux links to the right sources. Emerge xfree-drm. Try AGPGART as a module if that's all correct.

Post your XFree86.0.log if none of that works.

----------

## wrs4

```

kenobi root # lspci |grep AGP

00:01.0 PCI bridge: Intel Corp. E7000 Series Processor to AGP Controller (rev 03)

01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev 85)

kenobi root #

```

DRM is NOT compiled in, /dev/agpgart IS  compiled in, along with every video chipset under it (I'm not kidding, every chipset).  MTRR also compiled in.  /usr/src/linux points to the linux gentoo kernel sources (only ones I have).

I should note that dmesg has this to say:

```

Linux agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 816M

agpgart: Unsupported Intel chipset (device id: 2550), you might want to try agp_try_unsupported=1.

agpgart: no supported devices found.

```

Oh...and I did the emerge xfree-drm after I emerged xfree.

----------

## dberkholz

 *wrs4 wrote:*   

> 
> 
> ```
> 
> Linux agpgart interface v0.99 (c) Jeff Hartmann
> ...

 

Try agpgart as a module, and load it with 'insmod agpgart agp_try_unsupported=1'.

----------

## wrs4

Do I need all those chipsets then, based on my lspci output?

----------

## dberkholz

Honestly, I have no idea. Your AGP chipset might not be supported at all, since that seems to be what dmesg is telling you. Try searching around some.

----------

## wrs4

Well, it doesn't look like I'm going to get AGP working   :Crying or Very sad: 

Nothing on the web, converting agpgart to a module stops the dmesg warnings about it but doesn't seem to fix the problem, so I'll just deal with GL indirect rendering (I can run glxgears from a shell but can't get Xscreensaver to do it...)

I appreciate the help.  It's probably my chipset...maybe one day they'll have something for it.  Meantime, I'm going to look at the write-up I did above, revise it, and probably cross-post it to here, Matrox forums and my web site.  Maybe it will be of help to someone the way you helped me   :Cool: 

----------

## dberkholz

OK, I just want to make sure you tried loading the agpgart module with parameter agp_try_unsupported=1, because the idea of that is to get around the problem of having an unknown chipset.

----------

## wrs4

Yup...have it in my /etc/modules.autoload thusly:

```

agpgart agp_try_unsupported=1

```

No dmesg errors, but I also get

```

william@kenobi william $ glxinfo |grep render

Xlib:  extension "XFree86-DRI" missing on display ":0.0".

direct rendering: No

OpenGL renderer string: Mesa GLX Indirect

```

Should I try re-emerging xfree-drm again anyway?

----------

## dberkholz

Yeah, you have to remerge it every time you compile kernel/modules, because that erases all external modules.

----------

## wrs4

Hmm...I hadn't considered that...ok....back to re-emerge some stuff, probably to re-install HAL too.

----------

## wrs4

Well, it was worth a try, but it didn't happen; probably the chipset.  I'm in the process of a detailed write-up on what I did; where do you suggest I post it on this forum?

----------

## dberkholz

probably the Docs section. Since it's not a question...

----------

## wrs4

Check https://forums.gentoo.org/viewtopic.php?p=364951#364951

----------

## dberkholz

Where you say 'emerge lspci' you probably wanna change it to 'emerge pciutils' =) But looks great!

----------

## wrs4

Thank you for the feedback; I just updated it with the correct information.  Hopefully it will help someone else   :Very Happy: 

----------

## wrs4

By the way...it occurred to me last night that Red Hat was able to set up DRI for me when I used the video card with my Abit VP6 (before it died) and wasn't able to with the Iwill DPL-533, so now I'm 99% sure the chipset isn't going to work until someone patches the codebase.

----------

