From owner-freebsd-mobile@FreeBSD.ORG Mon Jan 28 18:48:40 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9496216A418 for ; Mon, 28 Jan 2008 18:48:40 +0000 (UTC) (envelope-from drgerlists@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id 49B9E13C455 for ; Mon, 28 Jan 2008 18:48:40 +0000 (UTC) (envelope-from drgerlists@gmail.com) Received: by py-out-1112.google.com with SMTP id u52so2563485pyb.10 for ; Mon, 28 Jan 2008 10:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:organization:reply-to:to:subject:message-id:user-agent:mime-version:content-type:content-transfer-encoding; bh=A62fOv83M19VHxYak2ALT1G/6w9RKj8KKc3HmMs1gMQ=; b=feuiMYutuAByxnMAi6wEyW/RXyCTOJ7ZKzQVEajhMnaNuWDjo9mzlCWuG3Rwggr8K82CIuzP0yysUqQf1Fo5yPLr86KVKUuMLU6pX9EdWoldATa7JKhfHSX0VcgXq3JMZPvLGBRwpXPGN0vnkM3lx12pSnXk5Lx2ZpDiZwiXMCM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:organization:reply-to:to:subject:message-id:user-agent:mime-version:content-type:content-transfer-encoding; b=F4bEAqpjfhoKMqREXd7CWsSHH7CHPeUggLKHum8DmHQF//kgPR8VmGFBstvAghOHFva9+2U/q+EHr+Xc2KzfdA8mfT0qb1BnUKv1BQEV5AHZJem9i6IxS3wyeK6jKAEq24xKu2l0U5xXQ0gX9fLBN6W/imce3I3dbAfV430cWeE= Received: by 10.35.60.15 with SMTP id n15mr6741124pyk.33.1201544577076; Mon, 28 Jan 2008 10:22:57 -0800 (PST) Received: from lmrmac.uhw.utoledo.edu ( [131.183.86.111]) by mx.google.com with ESMTPS id y78sm15306770pyg.38.2008.01.28.10.22.55 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Jan 2008 10:22:56 -0800 (PST) Date: Mon, 28 Jan 2008 13:22:54 -0500 From: drgerlists@gmail.com (Dr. Gary E. RAFE) Organization: Dr. Gary E. RAFE To: freebsd-mobile@freebsd.org Message-ID: <479e1d7e.XlwPfNIXoEOaNTLkMgeWlhe4@lmrmac.uhw.utoledo.edu> User-Agent: Heirloom mailx 12.3 7/15/07 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Working: Toshiba Sat Pro 6100 and NVIDIA legacy driver at 1600x1200 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: drgerlists@gmail.com List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2008 18:48:40 -0000 The following is for the archives, in case someone might find this information useful. I had some free time between projects this weekend, so returned to the problem of getting the NVIDIA-supplied native X11 OpenGL driver to work on my (old) Toshiba Satellite Pro 6100. This notebook uses the NVIDIA GeForce4 420 Go [NV17M] graphics chipset with 16MB of video RAM and a 1600x1200 resolution flat panel display. Years ago (running 4.x-R and earlier 5.x-R), the native NVIDIA drivers "just worked" on this notebook. Then, about 5.3-R or 5.4-R, the available driver at the time stopped recognizing the full resolution of the internal flat panel display, interpreting the EDID resolution as 1588x1200, rather than the actual 1600x1200. My investigations started with the current "legacy" version of the native driver, NVIDIA-FreeBSD-x86-96.43.01. With the source patches from the Ports collection, this compiled and installed without complaint. Starting X (XFree86-4.7.0 compiled from source), however, resulted in an all-too-familiar washed-out, corrupted graphics display. The X server did start, however, and the system was still usable. Killing the X server remotely returned the previous VT console, so the situation did not seem terminal. I next took a look at the older "legacy" release, NVIDIA-FreeBSD-x86-71.86.01. Again, this compiled and installed without complaint, and started up the very first time. Unfortunately, the display was missing a 12 pixel-wide band along the right edge, as it had in my last encounter with the native driver. New research suggested that the EDID returned from the chipset/display was the culprit here. Using the native-driven X server, "XFree86 -logverbose 10 -probeonly" returned the 128-byte EDID structure, with the offending byte exactly where it was supposed to be (byte 0x38). Using bvi(1), I reconstructed a new, custom EDID binary file with the correct data in byte 0x38 (here, 0x40 to indicate 1600 pixels wide). Since the older legacy drive does not support custom-EDIDs, I reinstalled NVIDIA-FreeBSD-x86-96.43.01, configured it to use the new, custom 128-byte EDID, and it worked properly the very the first time. Performance with this legacy driver seems reasonable, as reported by glxgears(1): approx 1160 FPS, compared to 350 FPS with the (unaccelerated) XFree86 "nv" driver, but, alas, not as good the older legacy driver (1825 FPS). Some additional configuration issues: The EDID-supplied display size values are close, but not very accurate. This is fixed by *not* using the EDID-calculated DPI information. ACPI suspend/resume works, albeit, not as expected. My suspend script switches the VT to ttyv0 prior to suspend, and have /etc/rc.resume switch back to the approriate VT if X is running. Upon ACPI resume, the text console is *not* visible. The automatic VT switch in /etc/rc.resume, however, brings the display back correctly, so this is a minor issue. I did build an nvidia.ko kernal module with ACPI enabled to see if this might have an affect on the resume behavior. Using this kernel module, however, caused the ACPI suspend to fail (!). So, I can live with a working, albeit, unexpected, suspend/resume. Kernel module settings for this configuration: hw.nvidia.registry.NvAGP=1 hw.nvidia.registry.SoftEDIDs=0 hw.nvidia.registry.Mobile=2 Relevant XF86Config entries: Section "Monitor" Identifier "Monitor:builtin" VendorName "Toshiba" ModelName "Satellite Pro 6100 1600x1200 Flat Panel Display" DisplaySize 305 229 HorizSync 29.0 - 76.0 VertRefresh 40.0 - 60.0 EndSection #Monitor Section "Device" Identifier "Device:nvidia" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "NV17M [GeForce4 420 Go]" VideoRam 16384 BusID "PCI:1:0:0" Option "UseDisplayDevice" "DFP-0" Option "CustomEDID" "DFP-0:/etc/X11/edid-nvidia16m.bin" Option "UseEdidDpi" "False" Option "RenderAccel" "True" Option "DamageEvents" "True" Option "BackingStore" "True" EndSection #Device -- Dr Gary E RAFE: drgerlists at gmail dot com