You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

This is a completely fresh installation. I chose the "install everything" option. The only thing I've done is install the kernel source package. Here's what happens when I trying to install the ATI drivers.

I've converted fglrx-glc22-4.3.0-2.9.8.i586.rpm to fglrx-glc22-4.3.0-2.9.8.i586.tgz, untarred it, and copied everything to the right place.

root@darkstar://lib/modules/fglrx# ./make_install.sh
*** WARNING ***
Tailored kernel module for fglrx not present in your system.
You must go to /lib/modules/fglrx/build_mod subdir
and execute './make.sh' to build a fully customed kernel module.
Afterwards go to /lib/modules/fglrx and run './make_install.sh'
in order to install the module into your kernel's module repository.
(see readme.txt for more details.)

As of now you can still run your XServer in 2D, but hardware acclerated
OpenGL will not work and 2D graphics will lack performance.

As you can see agpgart is not loaded. The first thing I tried was to uncomment the line in rc.modules while I was doing the same for my nic and sound card. During bootup I see a message flash by about it failing to load the module. Here's what happens when I try it manually;

root@darkstar://# modprobe agpgart
/lib/modules/2.4.20/kernel/drivers/char/agp/agpgart.o.gz: init_module: No such device
/lib/modules/2.4.20/kernel/drivers/char/agp/agpgart.o.gz: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
/lib/modules/2.4.20/kernel/drivers/char/agp/agpgart.o.gz: insmod /lib/modules/2.4.20/kernel/drivers/char/agp/agpgart.o.gz failed
/lib/modules/2.4.20/kernel/drivers/char/agp/agpgart.o.gz: insmod agpgart failed

All the folders/files are where they should be. I double checked and everything is there.

I'm getting other strange problems now. I also see this message during boot (along with a whole heap of other ones that unfortunately I miss)

insmod: /lib/modules/2.4.20/kernel/drivers/net/8139cp.o.gz failed.

But, it appears to be loaded afterall. If I do modprobe 8139too it says it's already there. The problem is that I can't get my network up. It's unreachable. The last time I installed slack 9.0 I got it working perfectly.

For example if I do /sbin/dhcpcd -t 10 -d eth0 it returns the machine address but then seems to hang and then time out before it gives me everything else.

Wow, this is too much hassle. I'll spend some time researching this but not too much time. I don't expect anyone to figure it all out for me, but if something obvious occurs to anyone please say so! Linux is a mystery sometimes. You can do 2 identical installations on the same machine and you get different issues, lol. Well, most of the time it's all fun

Thanks

btw, I've read through the readme that comes with the drivers and what it does mention is this (under requirements);

"The OpenGL implementation that comes with the driver can
of use the ISSE commandset extensions of some current x86 cpus.
So you should run a Linux kernel that can handle the respective
register extensions at the task switches to make use of them."

It seems that you only need to recompile your kernel if you are using 2.2.x because it mentions this;

"Note: You may skip the information in this section in the following cases:
(1) You have Kernel 2.4.xx: Kernel 2.4.xx and most current distributions come with ISSE support built-in,
(2) Your CPU does not have ISSE support at all."

Forgive me for not pasting more and putting it all in context but I figured you could check it out if you wanted to.

It says that 2.4.xx kernels have ISSE support built in, and it also implies that you don't need it anyway. The drivers will benefit if it's present, but run without it if they need to.

A little precision here, agpgart _and_ DRI must _not_ be built into the kernel.
Obviously agpgart you absolutely need, so it has to be a module, but DRI you can do without so it can either be a module [...that won't get loaded anyway] or not compiled at all.

Just a guess, if modprobe is still looking for .o.gz modules, could it be that you're using the default Slack kernel? [...hint: built for i386]
If so, as DaOne already said, you need a kernel built for i586 or higher, ...as in compile your own.

cyberia_2ooo was right. modprobe agpgart agp_try_unsupported=1 worked. I will take more notice of what Linux tells me in future I have an SIS655 chipset. Pretty new and obviously unsupported.

I've got the drivers installed now. But (and I hate to say this) I'm having another problem. When I try to startx I get this;

Failed to load module "fglrx" (module does not exist, 0)

But when I do lsmod it's there. Then I read this in the ATI readme that came with the drivers;

==============================================
12. Linux kernels with built-in dri/drm support
Some Linux kernel sources provide XFree86 kernel modules for miscellaneous
graphics adapters.
(1) These files are not compatible with ATI drivers.
(2) These files might prevent ATI modules from beeing searched or found.
(3) These files are not required for running the FireGL 8700/8800 with its
drivers.

As of today, there is no perfect implementation of the XFree86 kernel
driver loading process. If you have multiple kernel drivers selected and
compiled directly into your Linux kernel, XFree86 may not start the
respective ATI kernel module automatically. XFree86 scans all present dri
devices and concludes that dri is active but there is no suitable driver.
Thus the required kernel module is not loaded.

Solutions for the above scenario:
- don't compile any dri/drm devices hard into your Linux kernel,
if you need other modules than provided by ATI: use modules.
- manually load the ATI kernel modules before starting your XServer.
This will force the ATI modules to get loaded and properly detected.
==============================================

Like you said Untamed

But I DID try loading the ATI modules manually and it didn't help. In any case, how do I check if DRI is built into my kernel? I'm using the bare kernel off the Slackware CD btw.

Also everyone keeps saying you need to recompile the kernel for i586, but the ATI readme says that isn't really neccessary. Recommended, but not neccessary. One of the reasons for this is that the 2.4.xx kernel has built in support for the instructions anyway. It's in there if you want to look.

If you think I'm just trying to get out of compiling my kernel, you're right. I've never done it before. I would like to eventually, but I'd really like to get a working system before I try the hardcore stuff. If it's absolutely neccessary, I'll do it now.

This is part of your problem...as UnTamed stated, you need to recompile your kernel, including DRI and agpgart as modules, and while you're in there, it is recommended (by me of course) to add the proper support for your processor. See the kernel compile guide in this forum...you can't go wrong.

Listen, I haven't run a default kernel in ages, it's the first thing I do on a fresh install so my info on "you need i586+" might be outdated.
I know for a fact though that the early FireGL drivers I installed on Slack 8.1 were looking for "cmpxchg" which is a feature enabled only on i586 or better, and there was no way around it.

Now if you wanna see what is built as modules, there's usually 2 ways.
All your modules are in /lib/modules/<version>, for example;
/lib/modules/2.4.21-rc1/kernel/drivers/char/agp/agpgart.o
/lib/modules/2.4.21-rc1/kernel/drivers/char/drm/radeon.o
...but I'm 99% sure Slack has none of those built-in the kernel and thus you should find both modules where they belong.

The other way, will tell you a lot more on the way your kernel is built. Look into /boot for a "config-ide-2.4.20" or something like that, my Slack 9 is a Slack-current I installed way back and kept updated, so it's not totally kosher and I can't say for sure, but it should be obvious.
That's the configuration of your default bare.i, look into it for:
CONFIG_AGP=m
CONFIG_DRM_RADEON=m
...among other things

Wanna build a kernel the easy way? Use DaOne's tutorial posted on this board but copy that config file in your sources tree before running "make menuconfig". This way you'll have the config of your default kernel as a starting point.
So if you change only a couple things there's very little chance that anything will go wrong and if it does it's quite easy to backtrace, just take note of what you changed.

>Failed to load module "fglrx" (module does not exist, 0)

...as I already said you need to build the module before you can actually use it

Go to the build_mod dir. and run the "make.sh" script and pay attention to the info it returns, you'll know right there if you need to rebuild your kernel.

Alright, I do it (compile my own kernel). I'll let you know how it goes

Untamed, I have built the module. I followed all the steps in the readme. If you look at my first post you'll see. The problem is that for someone who has never done this before, I didn't see any messages that made me think anything had really gone wrong. I wasn't forgetting to do it, it's just that it didn't work. Once I got agpgart loaded however, the module built fine and it installed perfectly.

I then did modprobe fglrx and it loaded fine. That doesn't stop X from chucking as wobbly and complaining that it's not actually there though (when it is). Yes, I did configure X with fglrxconfig.

you can confirm with lsmod that fglrx is loaded before you startx and it still complains the module can't be found?

That's exactly right :/

I'm assuming it's got something to do with dri/drm support preventing the module from being recognized. I don't really know what I'm talking about here but ATI says something about it.

==============================================
12. Linux kernels with built-in dri/drm support
Some Linux kernel sources provide XFree86 kernel modules for miscellaneous
graphics adapters.
(1) These files are not compatible with ATI drivers.
(2) These files might prevent ATI modules from beeing searched or found.
(3) These files are not required for running the FireGL 8700/8800 with its
drivers.

As of today, there is no perfect implementation of the XFree86 kernel
driver loading process. If you have multiple kernel drivers selected and
compiled directly into your Linux kernel, XFree86 may not start the
respective ATI kernel module automatically. XFree86 scans all present dri
devices and concludes that dri is active but there is no suitable driver.
Thus the required kernel module is not loaded.

Solutions for the above scenario:
- don't compile any dri/drm devices hard into your Linux kernel,
if you need other modules than provided by ATI: use modules.
- manually load the ATI kernel modules before starting your XServer.
This will force the ATI modules to get loaded and properly detected.
==============================================

I've been busy with stuff today, but later tonight I'm going to take the plunge and compile my own kernal without DRI built in (as a module instead). Hopefully it will make all the difference

Well that has certainly given me a bit of confidence. I've successfully compiled my own kernel and booted with it! Thanks for the guide DaOne. I followed it to the letter and I didn't have a single problem

It was relatively painless, and I was quite impressed with the menuconfig. Even has HELP which tells you what everything is and sometimes, in what circumstances you should or shouldn't do things. That was fun! lol

I compiled for Pentium 4 and I included a few small things in the kernel like emu10k1 support. I realized right in the middle of doing this that I need a few questions answered, but I went ahead anyway for the experience

At this point I would love to say everything is working but it's not. When I boot up the fglrx module is not loaded. I do modprobe fglrx, confirm that it's loaded with lsmod and then startx. It still complains about it not existing.

Rather than troubleshoot this anymore right now I'm going to do a reinstall. Then the first thing I am going to do is install the kernel source and compile again. After that I am going to try installing the drivers once more and see if it helps. But I need to get this right.

Hopefully one of you guys can help with 2 questions.

What do I have to do to make sure than no dri/drm devices are built into my kernel? Is it just a matter of removing support for every graphics adapter listed?

Where do I choose to build agpgart as a module? I can't see it referenced anywhere in menuconfig.

Thanks again everyone. Hopefully I'll be able to stop bugging you guys soon.

> What do I have to do to make sure than no dri/drm devices are built into my kernel? Is it just a matter of removing support for every graphics adapter listed?

>Where do I choose to build agpgart as a module? I can't see it referenced anywhere in menuconfig.

Look under "Character devices", you'll find both.

Did you find a kernel config file in /boot and did you use it? I hope DaOne's tut mentioned it coz I realize that my explanation was not very thorough ...you need to rename it to .config in your source tree /usr/src/<kernel-version>, or /usr/src/linux where linux is a symlink to <kernel-version>. Producing a viable .config file is the main part of kernel compiling ...but I digress.

Back on topic, I highly doubt a default Slack kernel would have any DRI-kernel drivers built into it, same goes for agpgart.

If you didn't notice them when you menuconfig'ed but still wanna see how they are set, look directly into that .config file or see the output of this, in a console ...if your lazy like me

Code:

>cat /usr/src/linux/.config | grep DRM
CONFIG_DRM=y
# CONFIG_DRM_OLD is not set
CONFIG_DRM_NEW=y
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I810_XFREE_41 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
>cat /usr/src/linux/.config | grep AGP
CONFIG_AGP=m
CONFIG_AGP_INTEL=y
# CONFIG_AGP_I810 is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD_8151 is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_SWORKS is not set

Don't let it confuse you, CONFIG_DRM=y doesn't mean DRI is built in, answering yes here only provides option to pick specific driver that you can either build into or as module.
And CONFIG_AGP_INTEL=y doesn't mean it's built into since it's already established with CONFIG_AGP=m that agpgart will be a module
...