Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 197470 - x11-drivers/ati-drivers-8.40.4: ati-powermode.sh doesn't work
Summary: x11-drivers/ati-drivers-8.40.4: ati-powermode.sh doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-29 23:15 UTC by Jan Breuer
Modified: 2009-04-03 18:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
this solve both problems (ati-powermode.sh.who.patch,1002 bytes, patch)
2007-10-29 23:17 UTC, Jan Breuer
Details | Diff
replacement(!) for ati-powermode-opt-path.patch in portage (ati-powermode-opt-path.patch,1.11 KB, patch)
2007-11-24 04:46 UTC, Bernd Steinhauser
Details | Diff
Replace 'finger' with 'who'. (ati-drivers-who-ebuild.patch,465 bytes, patch)
2007-11-24 04:53 UTC, Bernd Steinhauser
Details | Diff
Fix ati-powermode-opt-path-1.patch (ati-powermode-opt-path-1.patch,1.02 KB, patch)
2007-12-02 13:37 UTC, Bernd Steinhauser
Details | Diff
fixed patch (ati-powermode-opt-path-1.patch,1.02 KB, patch)
2007-12-04 14:06 UTC, Bernd Steinhauser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Breuer 2007-10-29 23:15:34 UTC
Script /etc/acpi/ati-powermode.sh don't work correctly. It should switch power mode, but it do nothing. There are known problems with default power state and using finger command.

Reproducible: Always

Steps to Reproduce:
1. emerge ati-drivers
2. unplug ac-adapter
3. nothing happened



Expected Results:  
Should switch ATI card to power save mode.
Comment 1 Jan Breuer 2007-10-29 23:17:46 UTC
Created attachment 134664 [details, diff]
this solve both problems
Comment 2 Bernd Steinhauser 2007-11-24 04:45:06 UTC
Ok, I think I understood now what happened here.
There is/was already a patch for this in portage. 
(See ati-drivers/files/ati-powermode.sh.patch.)
This got replaced because aticonfig moved from 
/opt/ati/bin/ to /opt/bin.
(New name for the patch is ati-powermode-opt-path.sh.patch.)

With that move the rest of the patch got lost.
Here is a replacement, that should fix this issue.
That "who"->"finger" should be done via sed, I guess.
Comment 3 Bernd Steinhauser 2007-11-24 04:46:25 UTC
Created attachment 136854 [details, diff]
replacement(!) for ati-powermode-opt-path.patch in portage

This replaces ati-powermode-opt-path.patch and should fix again.
Comment 4 Bernd Steinhauser 2007-11-24 04:53:48 UTC
Created attachment 136856 [details, diff]
Replace 'finger' with 'who'.

This adds a sed statement to the ebuild that replaces finger with who in ati-powermode.sh.
In addition with the above patch this should fix this bug.
Comment 5 Jeffrey Gardner (RETIRED) gentoo-dev 2007-11-26 15:21:09 UTC
8.433 is in the tree
Comment 6 Jan Breuer 2007-12-02 12:58:56 UTC
The patch "ati-powermode-opt-path.patch" from Bernd Steinhauser still doesn't work correctly.

There is wrong detection of default power state. 

Steps to reproduce:
1. unplug AC-adapter - it works and card is now in low power state
2. plug AC-adapter - nothing happens and card is still in low power mode 
   just run "aticonfig --lsp" in some X terminal to check this

Command "aticonfig --lsp" must be run by the user who is logged in X. If you run it as another user, you will get output like:

with current ati-powermode.sh from ati-driwers 8.433 the command is executed like here (you can try it from vt1):
root ~ # aticonfig --lsp
Error: Unable to open display `'.

so I correct this by adding environment variable DISPLAY, but still getting error:
root ~ # DISPLAY=:0 aticonfig --lsp
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Error: Unable to open display `:0'.


In my first patch it works, because I run this command in environment where both user and DISPLAY are correct.
Comment 7 Bernd Steinhauser 2007-12-02 13:15:28 UTC
(In reply to comment #6)
> In my first patch it works, because I run this command in environment where
> both user and DISPLAY are correct.
> 

For me this does work, if I run it as root as well as a normal user.

But I see what you mean.
Comment 8 Bernd Steinhauser 2007-12-02 13:37:08 UTC
Created attachment 137532 [details, diff]
Fix ati-powermode-opt-path-1.patch

So maybe something like this is what you are suggesting?

Removing the --effective=now as well, that will just print an error, that it is ignored.
Comment 9 Jan Breuer 2007-12-02 14:15:48 UTC
(In reply to comment #8)
> So maybe something like this is what you are suggesting?
> 

Yes, this works. Thank you.
Comment 10 Bernd Steinhauser 2007-12-04 14:06:21 UTC
Created attachment 137712 [details, diff]
fixed patch

Previous patch didn't apply for some reason.
This one should.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2008-01-05 03:41:54 UTC
Fixed in >=8.443.1