Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Laptop Battery Issue
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Mon Apr 16, 2012 7:33 pm    Post subject: Reply with quote

If you are using laptop_mode, maybe it is changing any parameter that does the fail. As I have seen, laptop_mode changes several parameters that you can change manually without that tool (like in the script I am doing). Did you try to unplug without the laptop_mode service enabled?
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Tue Apr 17, 2012 6:23 pm    Post subject: Reply with quote

I have done another test with more parameters in my script, but the time is half an hour less, so nevermind.
Anyway, there is still one last thing I would like to test. All the test until now were with the computer idle. That's the best way to do always the test in the same conditions but I think that's not a real test, I mean, a test in real conditions. Not only that, but also the last parameters I tried were all concerning the processor, so maybe the battery life in idle is a little less, but with load is more.

So now I would like to do a couple of test with load, but I would like to do all the test with the same load, some kind of moderate load concerning all the systems, processor, WiFi, hard drive... The best way to do all of that stuff is a script, so it's time to think about a script that could do the work. I was thinking about something like this:

Code:

- Open emacs
- Open xterm
- Do some kind of complex or long mathematic operation (maybe a loop with multiplications or powers)
- Wait 30 seconds (to avoid the fan as much as possible)
- Compress a video, maybe an episode of any show, with ffmpeg
- Wait 30 seconds
- Delete the compressed video
- Wget with some file, maybe a linux kernel. It's not too small, it's not too big.
- Wait 30 seconds
- Delete the downloaded kernel
- Open glxgears
- Wait 30 seconds
- Kill glxgears
- Kill xterm
- Kill emacs
- Restart script


What do you think? Would you add or remove anything?
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 110

PostPosted: Wed Apr 18, 2012 5:44 am    Post subject: Reply with quote

looks good to me, let me know how the test goes.

i noticed you mention powertop before but i forgot to look into it until today. i installed and ran it, it gave recommendations for kernel settings which i did, and offered to edit some files for power saving features which i let it, and it seems to have extended my battery life considerably. i also installed irqbalance which supposedly helps keep interrupts low. my wakeups-from-idle while i let my system idle are around 45 and when i browse the web it's around 250. the i915 is still the culprit for the largest number of interrupts. how do these numbers compare to yours?

after all was said and done i let my system idle with the screen completely dimmed and i had an estimated 8 hour battery life.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Wed Apr 18, 2012 6:40 am    Post subject: Reply with quote

xtx wrote:
looks good to me, let me know how the test goes.

i noticed you mention powertop before but i forgot to look into it until today. i installed and ran it, it gave recommendations for kernel settings which i did, and offered to edit some files for power saving features which i let it, and it seems to have extended my battery life considerably. i also installed irqbalance which supposedly helps keep interrupts low. my wakeups-from-idle while i let my system idle are around 45 and when i browse the web it's around 250. the i915 is still the culprit for the largest number of interrupts. how do these numbers compare to yours?

after all was said and done i let my system idle with the screen completely dimmed and i had an estimated 8 hour battery life.


In my case, the amount of wakeups are very similar to yours, 20-30 when idle, 100-300 right now, with chrome and gentoo forum opened (id depend's if I'm using the trackpad or not, if I'm typing or not...).
I'll try with irqbalance and then I'll do the test with load. When I'm finished, I'll let you know the results.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Wed Apr 18, 2012 3:16 pm    Post subject: Reply with quote

I have just tried with irqbalance, but I think it's not a real improvement in my system when idle. Anyway, I'll post right now the test I'm going to do with load, and then I'll post the result of each test when I do it.
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 110

PostPosted: Wed Apr 18, 2012 3:59 pm    Post subject: Reply with quote

any tips for lowering the wakeups? what DE do you run? i'm wondering if mine is higher since i'm using kde
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Wed Apr 18, 2012 6:16 pm    Post subject: Reply with quote

I'm using KDE too. I don't have any other hint to lower the wakeups. Anyway, I think that as it is, it's a quite good performance. I've been searching for more possibilities, but I didn't find any other. If I find another thing I'll let you know.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Thu Apr 19, 2012 7:50 am    Post subject: Reply with quote

Added test 1 results with load.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Thu Apr 19, 2012 9:39 pm    Post subject: Reply with quote

Added test, results with irqbalance. Obviosly better, almost an hour more.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Fri Apr 20, 2012 7:29 am    Post subject: Reply with quote

Added test 3, slightly worse results. Configuration discarded.
Back to top
View user's profile Send private message
Xytovl
Tux's lil' helper
Tux's lil' helper


Joined: 15 Mar 2009
Posts: 91

PostPosted: Fri Apr 20, 2012 9:51 am    Post subject: Reply with quote

In recent kernels (I am testing 3.4-rc) i915 has more values for rc6.
Do modinfo i915 to check if it is on/off or multivalues.

Code:
i915_enable_rc6:Enable power-saving render C-state 6. Different stages can be selected via bitmask values (0 = disable; 1 = enable rc6; 2 = enable deep rc6; 4 = enable deepest rc6). For example, 3 would enable rc6 and deep rc6, and 7 would enable everything. default: -1 (use per-chip default) (int)
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Fri Apr 20, 2012 9:24 pm    Post subject: Reply with quote

Added test 4. Same results than in best test until now, but since last upgrade, the brightness levels have changed, so I need to repeat the best test, just to have a proper reference.

Xytovl I am using a 3.2.12 kernel, so for now I don't have those options.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Sat Apr 21, 2012 12:56 pm    Post subject: Reply with quote

Added test 5. No difference.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Sat Apr 21, 2012 4:26 pm    Post subject: Reply with quote

Added test 6. Slightly better, but irrelevant.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Sat Apr 21, 2012 7:05 pm    Post subject: Reply with quote

Added test 7. No changes.
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 110

PostPosted: Sun Apr 22, 2012 5:38 am    Post subject: Reply with quote

you're doing awesome work. somebody should document your results (somewhere more permanent than this thread) so that laptop gentoo users can know what options do and do not affect battery life. it wasn't long ago both of us were getting 2 hours battery unloaded.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Sun Apr 22, 2012 7:39 am    Post subject: Reply with quote

xtx wrote:
you're doing awesome work. somebody should document your results (somewhere more permanent than this thread) so that laptop gentoo users can know what options do and do not affect battery life. it wasn't long ago both of us were getting 2 hours battery unloaded.


I'm not sure that the final configuration would help, because it depends a lot on your particular hardware. I think that everybody should do the tests to check each configuration in their own system. Anyway, yes, it would be a good idea to have all the possible configurations to do the tests.

Added test 8. Irrelevant.

I think I'm doing a test 11 with that configurations that seem irrelevant, but maybe a couple of minutes of one and a couple of minuts in the other can get a good improvement if used together.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Sun Apr 22, 2012 1:18 pm    Post subject: Reply with quote

Added test 9, slight improvement.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Sun Apr 22, 2012 9:04 pm    Post subject: Reply with quote

Added test 10. Slightly worse.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Mon Apr 23, 2012 6:48 am    Post subject: Reply with quote

Added test 11. Worse.
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Wed May 02, 2012 7:16 pm    Post subject: Reply with quote

I have a doubt regarding this issue.
OK, if I configure the i915 module as a module in the kernel, and if I set that configuration to the grub kernel parameter, it is configured and it works. Now, if I configure it embedded in kernel, not as a module, and I keep that grub parameters, do they work the same way?
Back to top
View user's profile Send private message
Baer
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 96
Location: Munich, Germany

PostPosted: Mon May 28, 2012 7:24 am    Post subject: Reply with quote

Thanks for this great article. I try to build Gentoo for my UX31 atm and can't replay some of the problems

* Exactly where comes the nvidia-driver into play? As far as I know there's no nvidia hardware built into this box.
* hdparm fails for me, when trying to set up "-B 1" :
Code:
# hdparm -B1 /dev/sda

/dev/sda:
 setting Advanced Power Management level to 0x01 (1)
 HDIO_DRIVE_CMD failed: Input/output error
 APM_level   = not supported

Is there any quick way to fix this?

I'm currently using gentoo-sources 3.3.5 from standard portage.

Regs
Baer
_________________
Life is like a roll of toilet paper, when the end is near we panic!
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Mon May 28, 2012 7:30 am    Post subject: Reply with quote

If your box has no nvidia hardware, then you don't need to worry about it. In my case, I have two graphics cards, so I need to deactivate the nvidia card if I want the battery to last longer.

It seems your hard drive doesn't support the powersave mode, so you can't use it. What do you get with hdparm -i /dev/sda?
Back to top
View user's profile Send private message
Baer
Tux's lil' helper
Tux's lil' helper


Joined: 11 Sep 2003
Posts: 96
Location: Munich, Germany

PostPosted: Mon May 28, 2012 10:41 am    Post subject: Reply with quote

Ah ok, i'm pretty sure the UX31 doesn't have nvidia hardware in it, so let's simply close this topic. :)

The output from hdparm looks like this:
Code:
# hdparm -i /dev/sda

/dev/sda:

 Model=SanDisk SSD U100 256GB, FwRev=10.01.02, SerialNo=114433301341
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=1, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=500118192
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-4,5,6,7

 * signifies the current active mode

_________________
Life is like a roll of toilet paper, when the end is near we panic!
Back to top
View user's profile Send private message
candamil
Tux's lil' helper
Tux's lil' helper


Joined: 19 Mar 2012
Posts: 84

PostPosted: Mon May 28, 2012 11:15 am    Post subject: Reply with quote

Yep, as you can see, your hard drive doesn't support the powersave parameter:

AdvancedPM=no

So you can't use it :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum