PDA

View Full Version : Laptop power management discussion on tips and tricks.


Omni-Tom
19th July 2008, 01:38 AM
Hi guys.

I have been using fedora for a couple weeks now but have used Ubuntu for about 4 years. What is new though is that I just installed Fedora 9 -64-bit on my Dell xps 1530 laptop that I bought in January. My Ubuntu experience was on a p4-1.6ghz tower.

I am very impressed with Fedora -9 so far and chose Fedora for varios reasons such as Ubuntu has a reputation of running hot and on laptops and also 64bit on the 1530 was stated as not a recomended. So far ever thing has worked ok with 64bit in Fedora so far. Also I have 2Gigs ram and am planning on getting 4Gigs soon which 64 bit is stated as using 4Gigs better.

The main reason for this thread is to talk about laptops in Fedora and power saving tricks etc and to discuss them. What got me started on this was reading up on the disk park problem and coming across some pages on laptop power management in linux or rather power saving.

IS YOUR LAPTOP HARD DRIVE MAKING FREQUENT CLICKING NOISES?
READ THIS : laptop hdd issues with linux ? (http://forums.fedoraforum.org/forum/showthread.php?t=194560)

There is some interesting stuff out there and some if seems dated or not relavent to fedora such as a sys.conf trick but fedora uses something different.

This page is very interesting as it has some neet tricks and also some info on packages that are being worked on. lesswatts.org/tips/disks (http://www.lesswatts.org/tips/disks.php)

This thread is what got me started on the idea for this thread as there are a lot of questions here that I would like to discuss here.


First off before I forget this is a trick carried over from windows vista which was on a vista laptop trick page. In vista it was found that turning off the glass affect put less load the the gpu and therefore decreased battery load. How does scale over to fedora,, Fist tried running the battery with destop affects on and things did not look to promising at first glance,, Any ways spent a few days at the library with desktop affects off and things improved drasticly... very impressed and generally much better than vista overall,, I found this interesting in that I remember reading on the Ubuntu forum a long time ago that Ubuntu had bad charge time performance compared to windows.

also herd that the linux battery meter may be a bit misleading but found after about an hour things looked even better. Test played a dvd in Fedora and found the battery charge went down way slower than vista playing a dvd.

Now I have some questions as I was doing some reading here about "Filesystem atime, Filesystem relatime, and also nodiratime options read here. http://www.lesswatts.org/tips/disks.php
The POSIX standard requires operating systems to: keep track of the last time each file was accessed by an application or the user, and to store this timestamp as part of the filesystem data. This timestamp, called atime.,,,,,

significant downside to atime, is that every time a file is accessed, the kernel has to write a new timestamp to the disk, at least after a few seconds of activity. These disk writes will keep the disk and the link to the disk busy, and that costs both performance.,,,,,,,,,

Because few programs use atime, disabling it always and for everyone is not very practical. The Linux kernel has a feature called relatime.,,,,,,,,,,,

Another option is to use the nodiratime option instead of noatime or relatime. nodiratime will not update the atime field on directory inodes. This allows you to continue to update file access on read, for programs which require it, but prevents updates for just reading a directory, such as with ls. ,,,,,,,,,,,,,,,


More on ratime here: HTTP... (http://lwn.net/Articles/244829/)

Any ways these articles sound a bit dated so kind of stuck on what is what, what are my options for this and what is the best. Also read there might be kernel packages with more options but that was written a long time ago.

Also M4rc0 found this link on ramlog which kind of deals with the same thing though I find this interesting in that when I get 4gigs ram and with a 64bit system this might be very interesting to use. http://www.linux.com/feature/141231

Now another option and question is about sys.config options where you can mod the config file with a - option in the Use the "-" option in /etc/syslog.conf trick. Looked for the config file for a bit till I figured out fedora uses rsyslogd and googled for a bit but did not find a similar option in its config file.


I really liked this trick called The VM writeback time also on lesswatts tricks. Im quoting this one for clarity.

The VM writeback time The VM subsystem, in the Linux kernel, buffers writes to files that applications perform for a period of time. This caching allows the kernel to group consecutive writes into one big write, and to generally optimize the disk IO to be the most efficient. The kernel, by default, will start writing out data to disk after 5 seconds, so, if a power failure or kernel crash happens, at most, 5 seconds of data would be lost. If your machine has a reliable power supply (for example because you have a UPS or because your laptop has a battery) and doesn't crash much, you can increase this time so that the VM subsystem can do a better job optimizing the IO, as well as having the disk (and the SATA link when using ALPM) in lower power states for a longer period of time. You can check the current value of this writeback time with this command:
# cat /proc/sys/vm/dirty_writeback_centisecs 500
This example shows that the timeout on this system was 500 centiseconds (or 5 seconds in human terms). To increase the timeout to 15 seconds, you can issue this command:
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

I have been using this one and did some figuring I did not push it to 15 seconds as about but rather thought id tri 9=900 to 10=1000 secs for now

There are other performance tricks such as turning off pic thumbnail previews etc in the file manager but being an artist found this sucked in vista. Would really like to have the ability to do this on the fly like open the manager one way and get file names and open it another and the thumbnails.

Also another trick is not of a not to which consists of not installing beagle - Beagle indexes files on your desktop. This is also a trick in vista that consists of disabling indexing which sounds like the same thing.

More to come later..


EDIT: Posting information: Please but a title for your ticks with font size 2:
Also I can put individual post links with post numbers to important information.

Omni-Tom
19th July 2008, 02:23 AM
Cooling trick: not all makes and models

I kind of learnt this by accident in that I have a Dell XPS 1530 and it came with a 9cell battery that sticks down about an inch and props the bottom of the laptop off the table a bit. The nice thing about this is that it has cooling vents on the bottom of the laptop so being proped up like this helps cool the laptop.

So this can be used on all laptops with vents on the bottom. You might not have a 9 cell to prop it up but generally anything even possibly a small book can prop your laptop up a little near the top of the laptop. This will allow for better airflow under the laptop and make any vents on the bottom more affective. Not quit a cooling pad but may help a bit on hot days :)

Omni-Tom
19th July 2008, 10:00 PM

LapTop Mode in Linux.

Hi found a really good article that explains laptop mode. I did the laptop mode check and mine came back with a 0 which means laptop mode is off. I would like to find some more info on the pertaining to fedora and why my laptop mode is off by default.

The page is here Linux Jernal: HTTP: (http://www.linuxjournal.com/article/7539)

How It Works Let's take a look at what Laptop Mode does to get that kind of I/O behaviour. To create periods without disk activity, we need to do as much as we can during the active periods. After that, we need to hold off disk I/O for as long as possible. During active periods, we do a couple of extra things. First, we perform some read-ahead; if that data actually is needed during the inactive period, we've saved a spinup. Laptop Mode sets the read-ahead to 4MB by default. Second, we sync everything to disk at the end of every active period. This keeps your data safe; when the drive has spun down, you can be sure that everything done up to the spindown is stored safely. During an inactive period, writes are the only kind of disk I/O we can hold off. We can keep the unwritten data in memory for as long as we like or until we're out of memory. Unfortunately, this was not so easy for us to implement, because Linux submits write requests from many places. We needed to tweak all those places to hold off their writes. The first and most important tweak has to do with modified or dirty data. Normally, when a cached disk page has been modified more than 30 seconds ago, it expires, and the pdflush dæmon writes it to disk. Fortunately, the expiry interval is configurable through /proc/sys/vm/dirty_expire_centisecs. Laptop Mode sets it to ten minutes so that changes stay in memory for up to ten minutes before they're written to disk. Because every active period is ended with a sync, the inactive period starts without any dirty pages. Therefore, during the first ten minutes of an inactive period, we can be sure that no pages are written back because they expire. The second tweak concerns journaling filesystems, which do a lot of disk I/O themselves. On most of the journaling filesystems supported by Laptop Mode, a change to the filesystem triggers a write operation within five seconds. For instance, in the ext3 filesystem, a filesystem transaction has a maximum lifetime before it is automatically committed, and committing means writing to disk. This maximum lifetime can be configured using the commit mount option. By remounting the filesystem with this option set to ten minutes, we stop ext3 from committing transactions during an inactive period. Again, we start every inactive period with a sync, so no transactions are open when the inactive period starts. Laptop Mode extends a similar treatment to the other supported filesystems, ReiserFS and XFS. The final tweak occurs in Linux's memory management. If a lot of memory is allocated during an inactive period, the memory manager eventually has to select some memory pages that need to be dropped. It is possible to select a page that needs to be written to disk before it can be dropped, for instance a modified disk page or a page that needs to be written to swap space. But then, it has to spin up the drive to perform that write, and we don't want that to happen. Andrew Morton tweaked the memory manager so that when we're running in Laptop Mode, the memory manager first tries to select pages that don't require a write. Using these tweaks, Laptop Mode can create up to ten minutes without disk activity

This deals with a lot of hard drive tweeks so I am very interested in a number of features pertaining to this. I have a 5400rpm drive so I am hoping tweeking the above stuff may make my hard drive access better in both battery mode and also in performance mode.

Omni-Tom
6th August 2008, 01:33 AM
Hi Guys

There seems to a sound problem with some laptops where there is no sound this is fixable buy opening volume control and adding surround and unmuting it. This is a known case on dell XPs laptops so far.