Bug 19356 - DPMS does not turn off LCD backlight on NV34M [GeForce FX Go5200]
Summary: DPMS does not turn off LCD backlight on NV34M [GeForce FX Go5200]
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: PowerPC Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-01 04:26 UTC by Markus Tacker
Modified: 2010-08-21 14:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (33.16 KB, text/plain)
2009-01-02 02:52 UTC, Markus Tacker
no flags Details
Xorg.0.log from Xorg 1.5.3 (18.76 KB, text/plain)
2009-01-02 06:24 UTC, Markus Tacker
no flags Details
xorg.conf in use (2.79 KB, text/plain)
2009-01-03 03:28 UTC, Markus Tacker
no flags Details
mac backlight (1.92 KB, patch)
2009-01-05 06:58 UTC, Danny
no flags Details | Splinter Review
backlight patch (2.56 KB, patch)
2009-01-08 06:17 UTC, Danny
no flags Details | Splinter Review

Description Markus Tacker 2009-01-01 04:26:30 UTC
Expected:
$ xset -display :0 dpms force off
should turn off LCD backlight

Actual Result:
Screen is black, but LCD backlight stays on

Workaround:
Use nv driver, which handles the powersaving correctly.

Extract vom Xorg.0.log:
(II) Loading extension DPMS
(II) NOUVEAU(0): DPMS capabilities: Off; RGB/Color Display
(**) Option "dpms" "true"
(**) NOUVEAU(0): DPMS enabled
(II) NOUVEAU(0): Setting dpms mode 3 on tmds encoder (output 0)
(II) NOUVEAU(0): Setting dpms mode 3 on CRTC 0

Using gentoo ebuilds from 
http://svn.hboeck.de/nouveau-overlay (r60)
Comment 1 Danny 2009-01-01 18:56:23 UTC
Can you post full logs? It works fine for me with recent git on the same type of powerbook.

danny
Comment 2 Markus Tacker 2009-01-02 02:52:16 UTC
Created attachment 21626 [details]
Xorg.0.log
Comment 3 Markus Tacker 2009-01-02 06:24:46 UTC
Created attachment 21630 [details]
Xorg.0.log from Xorg 1.5.3
Comment 4 Danny 2009-01-02 19:48:16 UTC
Interesting. I suspected you had a 12" powerbook because those contain nv34m, but your logs show you are using a pp64 kernel and your flatpanel is an external one. So I guess you are on a G5 with an nv34m? Can you describe your setup? I thought those machines had nv4x only. Some assumptions in the driver may not hold. 

Since nv works correctly, it should be fixable though. Maybe we need another quirk. What is your exact pci id (nvclock can tell you) it seems with the recent removal of all the debug stuff from the logging there is hardly anything useful in the log now...



Comment 5 Markus Tacker 2009-01-03 03:28:07 UTC
(In reply to comment #4)
> Can you describe your setup?

It's a third generation iMac (Rev A aka G5).

cpuinfo:
processor	: 0
cpu		: PPC970FX, altivec supported
clock		: 1800.000000MHz
revision	: 3.0 (pvr 003c 0300)
timebase	: 33333333
platform	: PowerMac
model		: PowerMac8,1
machine		: PowerMac8,1
motherboard	: PowerMac8,1 MacRISC4 Power Macintosh 
detected as	: 338 (iMac G5)
pmac flags	: 00000000
L2 cache	: 512K unified
pmac-generation	: NewWorld

> What is your exact pci id

Does this help?

# nvclock -i
-- General info --
Card:           nVidia GeForce FX 5200 (Mac)
Architecture:   NV34 B1
PCI id:         0x329
GPU clock:      261.000 MHz
Bustype:        AGP

-- Memory info --
Amount:         64 MB
Type:           128 bit DDR
Clock:          513.000 MHz

-- AGP info --
Status:         Disabled
Rate:           0X
AGP rates:      4X 8X
Fast Writes:    Disabled
SBA:            Disabled
Comment 6 Markus Tacker 2009-01-03 03:28:33 UTC
Created attachment 21641 [details]
xorg.conf in use
Comment 7 Danny 2009-01-03 08:44:59 UTC
Lets first check the ppc specific hack we have now. Can you install radeontool:

git clone git://people.freedesktop.org/~airlied/radeontool
git checkout origin/nvidia
make (if there's problems with the asm/page.h include, comment it out)

then examine the contents of the following 2 regs:
./radeontool regmatch 0x0060081c
./radeontool regmatch 0x000010f0

under both nv and nouveau, with panel off and panel on (to get the reg during panel off you can try an ssh connection from another machine, or maybe xset dpms force off;sleep 5; ./radeontool regmatch 0x000010f0
or something like that.

d.
Comment 8 Markus Tacker 2009-01-04 04:33:53 UTC
(In reply to comment #7)
> then examine the contents of the following 2 regs:
> ./radeontool regmatch 0x0060081c
> ./radeontool regmatch 0x000010f0

++ nouveau

dpms force on

(changes between those two)
0x0060081c      0x22265055 (572936277)
0x0060081c      0x22265051 (572936273)

0x000010f0      0x83e60535 (-2082077387)

dpms force off

(changes between those two)
0x0060081c      0x22265055 (572936277)
0x0060081c      0x22265051 (572936273)

0x000010f0      0x83e60535 (-2082077387)

++ nv

dpms force on

(changes between those two)
0x0060081c      0x22265055 (572936277)
0x0060081c      0x22265051 (572936273)

0x000010f0      0x83e60535 (-2082077387)

dpms force off

0x0060081c      0x22265050 (572936272)

0x000010f0      0x03e60535 (65406261)
Comment 9 Danny 2009-01-04 21:34:27 UTC
thanks. This looks good, it is not working as expected. Later today I will try to figure out why.

danny
Comment 10 Danny 2009-01-05 06:58:22 UTC
Created attachment 21686 [details] [review]
mac backlight

Can you try attached patch? I did it rather quickly so I am not sure it will work at all.

If it fails, can you check the regs again with the patch applied?

danny
Comment 11 Stuart Bennett 2009-01-06 13:38:06 UTC
only armchair coding here, but that probably wants to lose the "static" keyword from the line

+static void backlightenable(ScrnInfoPtr pScrn, int mode)

and the following line added as a function prototype in nv_proto.h:

void backlightenable(ScrnInfoPtr pScrn, int mode);
Comment 12 Danny 2009-01-07 20:58:24 UTC
Stuart is completely right of course. I was lazy and assumed the compiler would pick up the method anyway, but it is necessary to make those changes otherwise X won't start. I'll post an updated patch later.

Danny
Comment 13 Danny 2009-01-08 06:17:57 UTC
Created attachment 21805 [details] [review]
backlight patch

Updated patch

d.
Comment 14 Danny 2009-02-06 04:21:45 UTC
Markus,
didn't hear from you in a while. I wonder if it is possible  you can give the patch a try? 

Danny
Comment 15 Markus Tacker 2009-02-06 04:53:11 UTC
(In reply to comment #14)
> Markus,
> didn't hear from you in a while. I wonder if it is possible  you can give the
> patch a try? 
> 
> Danny
> 

Yes, I'll try it this weekend.
Comment 16 Markus Tacker 2009-02-08 02:24:29 UTC
Hm, I managed to patch the git sources, but autogen.sh fails on Gentoo.
Any hint on how to manually build the driver on Gentoo?


checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBDRM_NOUVEAU... configure: error: Package requirements (libdrm_nouveau) were not met:

No package 'libdrm_nouveau' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBDRM_NOUVEAU_CFLAGS
and LIBDRM_NOUVEAU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Comment 17 Ingmar Vanhassel 2009-02-08 03:16:22 UTC
(In reply to comment #16)
> Hm, I managed to patch the git sources, but autogen.sh fails on Gentoo.
> Any hint on how to manually build the driver on Gentoo?
> 
> 
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for LIBDRM_NOUVEAU... configure: error: Package requirements
> (libdrm_nouveau) were not met:

Your drm package is out of date, rebuild it with something newer than this commit: http://cgit.freedesktop.org/mesa/drm/commit/?id=225e7e274f49d5e01fa1ad3fbbb9f1499865fe67
Comment 18 Danny 2009-02-08 05:03:24 UTC
yes, last comment is correct. If we have little time: There is no need to update nouveau to test this, some big changes were introduced a few days ago.

danny
Comment 19 Vlado Plaga 2010-08-19 23:51:50 UTC
I just opened bug #29685 with the same problem on a different iMac.
Comment 20 Francisco Jerez 2010-08-21 14:53:18 UTC
Closing this bug because the fix for bug #29685 probably fixed this one too and there's been no response from the reporter in more than a year.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.