You are not logged in.

#1 2009-10-14 11:44:14

Mazur
Member
Registered: 2009-06-10
Posts: 103
Website

Listening Music on Netbook and Power Saving!

Hello,

    I am happy user of Arch Linux and Samsung - NC10 since month and all works really flawlessely. Now I am using Gnome for `normal` computing but I would like to install another Arch Linux next to this one for one thing: Listening to Music for the whole day. I was thinking about using MPD and installing ALSA only from daemons. There will be no X.org, HAL or any other deamon. Since I do not have music player like iPod so I would like to save as much battery on my netbook as possible, any ideas how can I do it? Is it possible to listen to music for 12h or even more? Did anybody done something like that before? On my Gnome with KMS and Birghtness 100% - full battery is max 3h ... I hope you understand what do I mean.

Thank you,
Mazur.

Offline

#2 2009-10-14 17:43:53

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Listening Music on Netbook and Power Saving!

First off, I'd say you don't need to set up a new Arch install for it.  If you're using a login manager (gdm, kdm, slim, etc.) just add/create a new session (for gdm/kdm it's in /usr/share/xsessions) and modprobe -r all the modules you don't need, etc. and make it into a script, which then ends with the line "exec xterm -e mpd" and it'll open a basic x org window with mpd running in an xterm.  I'd set things like display brightness, CPU scaling, remove the modules for usb, etc. and it might get you about 7-8 hours (I'm not sure, just estimating here).  But essentially I advise you to do this:  Make a script for your "media login" and create a session for it that you can choose on login.  It'll be a lot easier to do than installing another Arch system.  It also allows for "easy switching" into the other window manager (as long as you write a script to run on logout/login of the other window manager restoring all functionality you removed when you logged in).

Hope that helps and is clear enough,
Lswest


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#3 2009-10-14 19:05:56

Mazur
Member
Registered: 2009-06-10
Posts: 103
Website

Re: Listening Music on Netbook and Power Saving!

I understand but I wanted to create new Arch Linux installation because I was thinking about compiling kernel without modules I do not need. I think I am going to try your solution too when I will find some time, Thank you!

Offline

#4 2009-10-15 08:25:54

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Listening Music on Netbook and Power Saving!

No problem!  If you do decide to custom-compile a kernel and add a second install of Arch, you'll probably find it necessary to have a script to disable/enable wireless, bluetooth, etc.  After all, I do suspect you'd want to update arch from time to time?  Wifi and bluetooth can cause quite a few wake-ups and drain battery life, so it's probably a good idea to prepare a list of things you want and will need to turn off when you don't require them.

Hope that helps,
Lswest


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#5 2009-10-15 09:12:28

elliott
Member
Registered: 2006-03-07
Posts: 296

Re: Listening Music on Netbook and Power Saving!

Mazur wrote:

I understand but I wanted to create new Arch Linux installation because I was thinking about compiling kernel without modules I do not need. I think I am going to try your solution too when I will find some time, Thank you!

I don't see any reason you can't do that too, just add another entry to GRUB with your custom kernel. You can even do different init scripts for that one, just add init=/path/to/script to that GRUB entry, something like finit-arc from AUR for faster booting.

Last edited by elliott (2009-10-15 09:14:11)

Offline

#6 2009-10-15 12:01:13

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Listening Music on Netbook and Power Saving!

First off, I highly doubt that compiling a custom kernel would help in any way - the default arch kernel has everything (that can) compiled as modules - so if you don't load the module, it's as if it's compiled without it.

Second, as elliott wrote, you don't need a second installation, you can use a grub parameter to set the preferred mode of use. However I would advice against using init=/custom/script, since then *a lot* of things that you're used to won't work (e.g. commands like reboot). I suggest having a runlevel that would be used to listen to music (say 4); then booting to that runlevel is achieved by adding '4' to the grub entry (see runlevels on the wiki).

Also, you definitely don't need X running, for managing mpd there are excellent command line utils (mpc) or curses progs (ncmpcpp or others). So, if X starts on runlevel 5, using 4 for listening to music automatically avoids starting X.

Offline

#7 2009-10-15 14:43:51

Mazur
Member
Registered: 2009-06-10
Posts: 103
Website

Re: Listening Music on Netbook and Power Saving!

#bender02
I know that I can manage mpd from console line so this is why I am not going to install X.org. Anybody know how can I manage power from console? For example to look how many battery left etc.

Offline

#8 2009-10-15 18:40:18

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Listening Music on Netbook and Power Saving!

battery info: acpi -V (gives all the info, try other switches for partial info)

Offline

#9 2009-10-15 21:44:17

Mazur
Member
Registered: 2009-06-10
Posts: 103
Website

Re: Listening Music on Netbook and Power Saving!

So in conclusion gnome-power-manager is using ACPI?

Offline

#10 2009-10-16 08:22:26

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Listening Music on Netbook and Power Saving!

Mazur wrote:

So in conclusion gnome-power-manager is using ACPI?

Probably not. All the info you get using acpi or any other "power management" program is extracted from the info that kernel writes to various places - either somewhere in /proc/acpi or somewhere in /sys. For instance, on my computer the file /proc/acpi/battery/BAT1/info has various info about the battery and how charged it is.

Offline

Board footer

Powered by FluxBB