LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   nvidia hang on resume - agpgart (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/nvidia-hang-on-resume-agpgart-545764/)

danielph 04-13-2007 09:55 AM

SOLVED: nvidia hang on resume - agpgart
 
I have a Dell Inspiron 8500 laptop with an Nvidia GeForce4 4200 Go card running on debian etch. With nv drivers all works well, however with either debian nvidia drivers installed or the latest (96xx for this machine) I get a black screen on resume and looks like CPU is 100% (the fan is going crazy). The machine is completely locked up.

As part of troubleshooting this there are others that get this problem and there has been some suggestion of not using agpgart (using nvagp instead). What I would like to try is to disable agpgart, but I cannot seem to remove it (rmmod or modprobe -r) as it is in use. I have tried disabling it in /etc/modprobe.conf/blacklist but this is ignored. I can stop the nvidia module loading and this will do it, but thats no good.

So, first question - has anyone come across this problem and second, how do I get rid of agpgart?

GrapefruiTgirl 04-13-2007 11:30 AM

To answer the question, 'No, I haven't experienced this'.
As for removing/correcting the issue:
I Could be wrong, but I think *some form* of AGPGART is required for AGP. Nvidia recommends an nvagp setting of 3, which will try using kernel agpgart first, then hardware agpgart. If you set it to 0, this tells the driver to use NO agpgart (disabling AGP):
Quote:

Originally Posted by nvidia-readme-file
Option "NvAGP" "integer"

Configure AGP support. Integer argument can be one of:
Value Behavior
0 disable AGP
1 use NVIDIA's internal AGP support, if possible
2 use AGPGART, if possible
3 use any AGP support (try AGPGART, then NVIDIA's AGP)

Please note that NVIDIA's internal AGP support cannot work if AGPGART is either statically compiled into your kernel or is built as a module and loaded into your kernel. Please see Appendix F, Configuring AGP for details. Default: 3.

So, if you could perhaps try both agpgarts in turn, with the kernel configured as recommended here, maybe you could determine which agpgart is giving the problem (if it is indeed the problem)?
Remember, modprobe-blacklisting probably won't stop the nvidia driver from loading agpgart.

Also, you are using a laptop; I wonder if something to do with the actual ACPI/APM system is contributing to the lockup. It wouldn't be the first time ACPI acted up on a laptop.

danielph 04-13-2007 03:43 PM

Hey GrapefruiTgirl thanks for the info. I have tried these settings in xorg and they are not making a difference. I have tried not using AGP (0) and forcing the use of NvAGP (1), and using AGPGPART but the problem persists. I see in the Xorg log that the option has been requested and that AGP is detected, this applies for NvAGP and AGPGPART.

The thread I was following indicated that the problem was when using AGPGPART and that the option in xorg.conf was not enough and that the module had to be stopped. Using blacklist was suggested, but as you have pointed out and I have found out this is not possible as nvidia wakes it up and ignores the blacklist. My next step was to try get round this and stop AGPGPART loading at all, but I seem stuck as it always loads.

ACPI could be an issue, but the system works peachy with nv driver, so I was looking around the nvidia arena.

Maybe I am barking up the wrong tree here, it wouldn't be the first time :)

GrapefruiTgirl 04-13-2007 05:07 PM

is your AGPGART kernel module Compiled in, or is it a module? Look thru the folders in /lib/modules/<your-kernel-version>/ and see if you can locate the nvidia agpgart module, if it IS a module. Rename it something else temporarily. Then set the nvagp=0 and try everything.
This should guarantee that there is no agpgart to be loaded.
Also, in your BIOS, is there a setting for the AGP multiplier (2,4,8) ?? If it's 8, try setting it to 4.

danielph 04-13-2007 06:08 PM

To disable the agpgart module in etch I had to place in the blacklist file
Quote:

install agpgart /bin/true
. Renaming the module also worked. There is also a kernel option "agp=off". I tried all 3 and got the same results. Without AGPGART the nvidia module refused to load. It even refused to load manually. There would appear to be a dependency on agpgart somewhere. I did notice the nvidia agp module sitting in the same folder as the agpgart module, but this is not getting loaded.

I checked the wiki and my AGP chipset Intel 845 ("Brookdale") is supported and recommended for use with NvAGP, so at least I feel like I maybe going in the right direction, maybe not at full speed :), but hey ho.

As for the BIOS, no options, but I did notice that AGP gets loaded at 4x in the X logs, so AGP seems to be working OK, but resume is not.

Found some other threads with the same issue and they also say you need to get rid of agpgart before nvagp loads, but how to load nvidia without agpgart?

GrapefruiTgirl 04-13-2007 06:30 PM

Sheesh.. Good queston, that last one; the answer is "you don't".. without an AGPgart, there's no AGP.
I also have the same i845 chipset as you :) how 'bout that! And yes, it runs at 4x because thats the max of the AGP slot in our PC's, even though the card may be 8x capable.
Sheesh, I don't know what else to suggest, other than *maybe* triple checking that it is the correct driver for you, but generally the installer will tell you if it's not.
I'll be sure to add anything if I think of it.. :( Good luck...

PS - y'know, if your AGPgart **is** a module, you could try compiling it into the kernel static, instead... Might work..

danielph 04-14-2007 10:15 AM

Hey GrapefruiTgirl thanks for your help. Getting some input is always a bonus, I would have given up a lot earlier I think. I am going to try installing Ubuntu on the laptop and see why that works (it was running this before and working), checking config and versions and what modules are loaded, then go back to Debian armed with more ammo. I tried Archlinux on there this afternoon and this has gives me a slightly different problem - resume is with a black screen but it is not hanging and no CPU 100%.

Glad we have the same chipsets in common :)

samstar 04-16-2007 11:23 PM

Hi, I just came across this thread, and thought I'd drop my 2 cents. I have a few nvidia cards, so naturally, I've messed around with settings quite a bit.

First, which kind of resume are we coming from, a suspend, or hibernate? I've read somewhere that suspend is still very buggy, and people should avoid it when possible.

If Ubuntu works on the laptop, where other distros don't, it could be a kernel version and a different version of agpgart that you are using each time, that could affect the system in different ways.

Also, try not using the latest nvidia drivers. Sometimes, when nvidia comes out with a new driver, it breaks compatibility with older hardware.

Nvidia also has a troubleshooting section in the driver's manual and a forum, I think. Your solution might be in there.

Only other thing I can suggest is to grab a latest kernel, compile it, and see if the problem persists using that one. There are some howto's for this on the net.

Alternately as a workaround, I've heard it possible to switch into console mode (ctrl+alt+F1), and entering hibernate (or suspend) from there. Then when you resume, there will not be any graphics screen to load up, just the console. That's when you re-enter the graphics screen (ctrl+alt+F7).

Hope this helps,
Sam

danielph 04-17-2007 09:36 AM

nvidia resume
 
Hey samstar thanks. There are some good suggestions there.

Firstly I should have mentioned earlier that we are playing with suspend to ram. I tried with Ubuntu and this was also failing to work (AAAAHHHH). I know Dell's can be hard to get this working. I read this maybe down to acpi tables not conforming. I just watched a video of Matthew Garret on Ubuntu and suspend and he reckons it is nearly always drivers, sometimes kernels which rings true here. At the moment I do not have it working with nv driver or nvidia, so I have taken a step back. Looks like I need to take another one!

I think I am going to have to compile my own kernel and go from there as I suspend is something I use regularly on the laptop. I have chucked a few distributions at this and none seem to be working, so I am going to have to go the manual route. Shame as it was working out of the box before, but hey ho, c'est la vive.

With a fresh install of Debian now, suspend to ram works out of the box with Gnome, without nvidia driver. XFCE suspend wasn't working for some reason so that suggests some package missing or configuration difference. If anyone comes up with more suggestions to get it to work with nvidia I'd be happy to try them.

samstar 04-18-2007 01:26 AM

Have you tried suspend from the console yet, using the nvidia drivers? I'm kinda interested if it works, since resuming to a framebuffer console should be much easier for the laptop. From there, it's easy to switch back to your X server. It wouldn't be a solution, but perhaps a means in the interim?

Sam

samstar 04-18-2007 03:01 AM

Me again.

I just stumbled on this totally by accident. I know you're using debian, not suse, but perhaps these instructions will point you in the right direction.

http://en.opensuse.org/NVidia_Suspend_HOWTO

danielph 04-18-2007 04:55 AM

Quote:

Originally Posted by samstar
Have you tried suspend from the console yet, using the nvidia drivers? I'm kinda interested if it works, since resuming to a framebuffer console should be much easier for the laptop. From there, it's easy to switch back to your X server. It wouldn't be a solution, but perhaps a means in the interim?

Sam

When you say console you are talking about a separate TTY session without X? Well this is OK. I can get suspend / resume working it is only with Nvidia the problem rears its ugly head.

Quote:

Me again.

I just stumbled on this totally by accident. I know you're using debian, not suse, but perhaps these instructions will point you in the right direction.

http://en.opensuse.org/NVidia_Suspend_HOWTO
Tried this, if you look at the first post you can see why it doesnt work for me. It is strange, I cannot get the system to use NvAGP it insists on using agpgart. It's not just with Debian this happens. If I blacklist AGPGART nvidia will not start. This fixes the resume problem :) but not really what I was looking for. As I say it looks like this is an Nvidia issue and down to maybe trying some older drivers and following it up with nvidia. The card here is getting a little old now (in computer terms that is more than a year) and it is also an integrated AGP chipset and integrated video (and a laptop) which doesn't help.

samstar 04-18-2007 05:35 AM

Yeah, I meant a tty console. I just keep forgetting what they're called. That way, the nvidia driver is running in the background memory, but not active on the screen. I hadn't tried it, and my nvidia system is miles away.

Sorry about the link. It is late and I forgot what the earlier posts were about. Impulsiveness and late hours ;)

danielph 04-18-2007 06:43 PM

Yep I know where your coming from with the late hours. Thought I would update my findings today as this is turning into a bit of an obsession. I compiled the latest kernel today and at the same time took a lot of modules into the kernel and tidied it up a bit. What I did manage to achieve is what I was trying to achieve at the beginning and separate out agpgart. I now get NvAGP in use, but this not make any difference to the problem, so all that barking was indeed up the wrong tree. I stepped back a few versions of driver with mixed results as many didn't work and those that did failed resume. I also petitioned nvidia to Open Source there drivers (see sig).

Found a couple of useful links Suspend to Ram on Dell 8600c laptop (Gentoo) and Dell patches (apply to 8600 apparently). Not sure how relevant these are, but I am going to follow them up.

I just noticed that the Suse link was using v7167 of the driver which they got working, I will give that one a go too.

samstar 04-19-2007 02:02 AM

What do you mean by "many didn't work and those that did failed resume"? You mean some of the nvidia drivers didn't allow the laptop to enter suspend?

I hope you have better luck with suse. Two guys from the link I posted with Inspiron 8600's got theirs to work. If you get it to work, you might be able to port the solutions to the distro you prefer.

Power to you for petitioning Nvidia!

Sam


All times are GMT -5. The time now is 10:33 PM.