# two-fold problem with my dell

## mr_bill

Okay, i've got a couple problems with my dell c800.  I just installed gentoo about 2 weeks ago, so needless to say, I'm damn new and have not much of a clue as to what I'm doing.  

The first problem is that when I close the screen, then put it back up the screen stays black instead of coming back up.  I end up havin to restart the computer to get it all working again.

So, in order to fix this problem, I went on the IRC channel for laptops, hoping to get a pretty quick answer, and also I thought it would be better since I could ask stupid questions right away.  The guy there told me that I didn't have dri installed (he was right), and that if I installed that, it would probably fix the problem.  Great!  except I couldn't get it installed right.  I followed the guide to doing it that's in the user docs portion of the website, however when I was finished, i still didn't have it working right.  Here's the text from the console that I got:

 *Quote:*   

> bash-2.05b$  glxinfo | grep rendering
> 
> Xlib:  extension "XFree86-DRI" missing on display ":0.0".
> 
> direct rendering: No
> ...

 

Okay, so the guy said I needed to set up the module for my r128.  So he told me to log out, log in and type "echo r128 >> /etc/modules.autoload"  then restart and it should all work right.  Well, I did that, and when i got back in and tried doing lsmod, I still got nothing, as well as the same problem quoted above.  I also noticed that on starting up it said that it failed to load the r128 module.

So, there are my two problems, and hopefully if i fix the second, I will fix the first as well.  So if anyone has any insight as to how I could fix either problem (though preferably both) it would be MUCH appreciated.  thanks in advance.[/quote]

----------

## eee

You've got to compile your kernel such that it includes support for your video card.  Have you read the user docs for DRI yet?  DRI HOWTO and ATI FAQ

----------

## mr_bill

 *eee wrote:*   

> You've got to compile your kernel such that it includes support for your video card.  Have you read the user docs for DRI yet?  DRI HOWTO and ATI FAQ

 

"I followed the guide to doing it that's in the user docs portion of the website, however when I was finished, i still didn't have it working right."   in short, yes, i did do that, and followed it to the letter.

----------

## eee

Try 

```
find /lib/modules/`uname -r`/video/
```

 Is the r128 module in there?  If not, you'll have to make that module.

If it's in there, then what does 

```
modprobe r128
```

 tell you?

What do you have in /etc/X11/XF86Config for Section "Module"

and Section "Device"?

Does /var/log/XFree86.0.log have any warnings (WW) or errors (EE) that give some hint as to what is going wrong?

----------

## mr_bill

 *eee wrote:*   

> Try 
> 
> ```
> find /lib/modules/`uname -r`/video/
> ```
> ...

 

here's what happens when i try the first:

 *Quote:*   

> find: /lib/modules/2.4.20-gentoo-r6/video/: No such file or directory
> 
> 

 

so, i'm assuming I'll have to make the module...  how do i go about doing that?

----------

## eee

```
cd /usr/src/linux-2.4.20-gentoo-r6/

make menuconfig
```

In the kernel configuration, select `Character devices', then find the `ATI Rage 128' item.  Type `M' to make it a module.  Then exit from both this menu and the main menu.  Save the configuration, then do:

```
make modules

make modules_install
```

You should be able to modprobe r128 at that point and, hopefully get the rest of it up and working.

----------

## mr_bill

There's no ATI rage 128 item that i dcan see in the character devices section of the config...

----------

## eee

Then you need to enable DRM by selecting ` Direct Rendering Manager (XFree86 DRI support)' and then hitting `Y'.  That should expand several options, one of which will be the r128.

I'm a little confused, I figured as a n00b, that your first gentoo install would have been with genkernel (recommended in the instructions).  If you had used genkernel, this option *should* have been enabled.

Regardless, because DRM can't be built as a module, you're going to have to recompile your kernel, install bzImage into /boot and, if you're running lilo instead of grub, re-run lilo and finally reboot.  

This is all in the install guide - section 16.5.  Also, you'll need to emerge xfree-drm if you haven't done so already.  Hope this is the right amount of info.

----------

## mr_bill

 *eee wrote:*   

> Then you need to enable DRM by selecting ` Direct Rendering Manager (XFree86 DRI support)' and then hitting `Y'.  That should expand several options, one of which will be the r128.
> 
> I'm a little confused, I figured as a n00b, that your first gentoo install would have been with genkernel (recommended in the instructions).  If you had used genkernel, this option *should* have been enabled.
> 
> Regardless, because DRM can't be built as a module, you're going to have to recompile your kernel, install bzImage into /boot and, if you're running lilo instead of grub, re-run lilo and finally reboot.  
> ...

 

i did do genkernel.  However, the direct rendering guide explicitly said that I should have direct rendering manager unselected, because the package would provide its own.  that's why i set it up that way...   so should i go ahead and try to select it?  or will doing so cause some conflicts or something of that nature...

----------

## eee

Dammit.

You're right, of course.  I've been using the 2.6 kernel for too long and I'd forgotten all that.

You need to emerge the xfree-drm package, which will install r128 for you.  Before you do that, make sure that you've got rage128 in your USE variable in make.conf.

Sincere apologies for pointing you in the wrong direction before...  Hopefully this will get you going   :Smile: 

----------

## mr_bill

 *eee wrote:*   

> Dammit.
> 
> You're right, of course.  I've been using the 2.6 kernel for too long and I'd forgotten all that.
> 
> You need to emerge the xfree-drm package, which will install r128 for you.  Before you do that, make sure that you've got rage128 in your USE variable in make.conf.
> ...

 

I tried emerging it again, made sure rage128 was in my use variables.  and it's still not working.  It still says it couldn't load the module r128 when i start up, and I get the same output in the console as my first post when i try "glxinfo | grep rendering".  argh.   this is getting a bit frustrating...

----------

## eee

Emerge gentoolkit if it's not already installed.  After that, 

```
qpkg -l xfree-drm
```

That'll list all the files installed under xfree-drm.  You're looking to verify that r128.o is installed in /lib and that it's in /lib/modules/2.4.20-gentoo-r6 (not another kernel version).

If it's in the wrong directory, then 

```
cd /usr/src

rm linux

ln -s linux-2.4.20-gentoo-r6 linux
```

Then emerge xfree-drm again.  You shouldn't need to reboot.  `modprobe r128' should work after emerging xfree-drm.

----------

## mr_bill

/lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o

that's where it is, when i did qpkg

edit:  so i tried modprobe, and it says explicitly that it cannot find that file, in that exact location.  I went to the directory, and did ls, and it showed that r128.o was in there.  that makes no sense to me that modprobe can't find the file.

----------

## eee

I'm stumped as well.  You're doing a `modprobe r128' and not `modprobe /lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o', correct?  I really can't think of much else at this point, anybody else?

----------

## mr_bill

 *eee wrote:*   

> I'm stumped as well.  You're doing a `modprobe r128' and not `modprobe /lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o', correct?  I really can't think of much else at this point, anybody else?

 

yep, just modprobe r128

----------

## eee

What does dmesg tell you immediately after modprobe r128?

----------

## mr_bill

this iswhat i get after modprobe r128 now:

 *Quote:*   

> /lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o: unresolved symbol rwsem_down_write_failed
> 
> /lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o: unresolved symbol rwsem_wake
> 
> /lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o: insmod /lib/modules/2.4.20-gentoo-r6/kernel/drivers/char/drm/r128.o failed
> ...

 

----------

## eee

Well:

```
linux-2.4.20-gentoo-r6 # find ./Documentation -type f -exec grep -i rwsem {} \; -print

- Replaced BKL with global rwsem to protect symlink data (quick and

- Replaced global rwsem for symlink with per-link refcount

- Went back to global rwsem for symlinks (refcount scheme no good)

./Documentation/filesystems/devfs/ChangeLog
```

So it would seem that you need to enable devfs under 2.4.20 (which is experimental).  To do this, cd /usr/src/linux-2.4.20-gentoo-r6 and 

```
make menuconfig
```

  Select `Code maturity level options' and hit `Y' for `Prompt for development and/or incomplete code/drivers'.  Then exit back to the main menu and select ` File systems'.  There should be an option for `/dev file system support (EXPERIMENTAL)'.  Select it with `Y'.  Then exit enitrely, saving the configuration.

You'll have to got through entire kernel build process - 

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

 and copy arch/i386/boot/bzImage to /boot and run lilo if necessary.

----------

## mr_bill

all of those options were already selected in the kernel

----------

## eee

```
mv .config ..

make mrproper

mv ../.config .

make oldconfig

make dep clean bzImage modules modules_install
```

cp bzImage to /boot, run lilo & reboot.  If that doesn't work, I give up   :Exclamation:   :Wink: 

----------

