nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA FreeBSD (http://www.nvnews.net/vbulletin/forumdisplay.php?f=47)
-   -   Blank screen on resume (http://www.nvnews.net/vbulletin/showthread.php?t=153106)

andrnlis 07-17-10 08:56 AM

Blank screen on resume

I recently got my Lenovo t510 system ( fbsd 8.1-PRERELEASE ) to actually suspend to ram. In order to do so I had to unload the nvidia kernel module.

On resume the screen remains turned off, which is a bit of a problem. Any way to have the card reposted or some such?

Best regards

zander 07-17-10 10:52 AM

Re: Blank screen on resume
I've never been able to suspend/resume FreeBSD on any mobile platform I tried to on. Power management is therefore completely untested and quite possibly broken. Does S3 work reliably on your notebook (aside from the blank screen), i.e. can you log in remotely and interact with the system?

Note that suspend/resume without the NVIDIA driver loaded and X running is not supported, since the driver has no way to actually perform power management in that configuration.

andrnlis 07-17-10 07:34 PM

Re: Blank screen on resume

I've used suspend-to-ram very reliably on an old i386 system, but as for this thinkpad yesterday was the first time I could get it to suspend at all ( didn'r really bother that much earlier ).

The two times I tried the machine did come back up so entering reboot <enter> cleanly rebooted the machine.

I did the tests from the console ( without X running at all ) and i added
kldunload nvidia to /etc/rc.suspend and kldload nvidia to /etc/rc.resume. The unloading was necessary to get the laptop to suspend at all, with the nvidia-driver loaded i got/get: acpi0: device_suspend failed.

I could boot fbsd with verbose logging turned on and post the results if that would be of any use.

Best regards

andrnlis 07-20-10 03:21 AM

Re: Blank screen on resume
I tried a bit more, with X running but that is a no go: When X is running the nvidia module cannot be unloaded and thus the computer can't suspend.


zander 07-20-10 10:05 AM

Re: Blank screen on resume
Who attempts to unload the NVIDIA kernel module? It is required to suspend/resume NVIDIA GPUs in your system.

andrnlis 07-22-10 03:28 AM

Re: Blank screen on resume
I did, just to see if I could get the computer to suspend at all.

With the nvidia-driver loaded I just get

acpi0: device_suspend failed
So it seems that the nvidia driver currently doesn't handle suspend-to-ram on fbsd.

Best regards

zander 07-22-10 11:43 AM

Re: Blank screen on resume
Does it work better if you enable the NV_SUPPORT_ACPI_PM #define in the nv-freebsd.h header file and rebuild/reload the kernel module?

andrnlis 07-23-10 01:26 PM

Re: Blank screen on resume
I checked the Makefile for the port and there was already logic in place to #define NV_SUPPORT_ACPI_PM and I was already using it ( it's the ACPI_PM option to the port ). To be exact I'm using


[ ] FREEBSD_AGP  Use FreeBSD AGP GART driver
[X] ACPI_PM      Enable support for ACPI Power Management
[X] LINUX        Build with support for Linux compatibility
[ ] WBINVD      Enable heavy-weight cache-flush logic

in the options for the port, so alas that define didn't help :(

Best regards

zander 07-25-10 12:52 PM

Re: Blank screen on resume
I took a look at this with a system I knows suspends/resumes reliably with Linux. The first problem is that in nvidia_suspend(), the ACPI-presence sanity check fails because the string literal "ACPI" should be "acpi". With that fixed, the NVIDIA driver no longer refuses to suspend. Another problem I noticed is that the X server does not appear to VT-switch out automatically in the suspend path, I had to do this manually (prior to calling `acpiconf -s 3`).

With all of the above, the system enters S3, as it does without the NVIDIA driver loaded. However, it never returns to a state in which I can interact with it (with or without the NVIDIA driver present). I tried disabling SMP, disabling networking and interaction through a serial console, but none worked.

I gave up for now, but maybe the above is helpful to you.

andrnlis 07-25-10 04:55 PM

Re: Blank screen on resume
It certainly was :) At least if the nvidia_suspend() you mentioned is in the nvidia_subr.c file.

I changed ACPI to acpi and the system suspends ( I manually switched to a vt before trying ). My system actually came back up, and seemed to be usable ( could issue ping from a vt console ). There seemed to be one other issue ( firewire-related ), so not your problem :)

All in all: Thank you very much! Hope the ACPI->acpi gets included in future releases of the driver

Best regards

zander 07-26-10 10:31 AM

Re: Blank screen on resume
Yes, I'll try to get that fixed and ACPI power management support enabled by default in future driver releases.

andrnlis 07-27-10 08:43 AM

Re: Blank screen on resume
A bit more testing indicates that there are some more problems though:

A suspend from within X gets as far as suspending the machine, but it hangs during resume.

Suspending from the console ( vt-switch from X ) suspends the machine, which does resume correctly to console where things seems ok. On a vt-switch back to X the machine hangs :(

I don't know if these problems are in the nvidia driver or the fbsd kernel though :(

Best regards

All times are GMT -5. The time now is 02:47 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.