*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: 1 ... 25 26 27 [28] 29 30 31 ... 37
Print
Author Topic: Beyond the Ubuntu Installation  (Read 415417 times)

#405 Re: Beyond the Ubuntu Installation

hoogee
New

Posts: 3


October 12, 2008, 09:03:34 AM

I hate to be a pain, but I was looking through the thread and couldn't find the newest release/directions for your ubuntu install method. Could I trouble you to repost the newest version with directions/a link to directions? That would be extremely helpful.

Oh also, would it be an overload on your servers if you posted the files not in a torrent? I would try to use the torrents whenever possible, but I can't for a week or two.
Logged

#406 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 14, 2008, 07:17:23 AM

After long and occasionaly frustrating development process, I made a new set of scripts for XO suspend/resume in Ubuntu. It's the next version of the scripts I have posted in http://olpcnews.com/forum/index.php?topic=2240.msg25964#msg25964 , however this time I they include much less guesswork and much more use of existing interfaces and infrastructure.

If you have previous version installed and working, new one should be easy to install on top of the old configuration. The only change to reverse manually is .xbindkeysrc file -- before installing the new version remove three lines starting from "#suspend".

To install:

1. As I mentioned before, make sure that you have new (from build 760 or later) kernel,  xscreensaver and pm-utils packages installed.
2. Additionally install, if you didn't have it before, patch package.
3. If you didn't do it before, modify /etc/sudoers file to include

Code:
%sudo ALL=(root)        NOPASSWD: /usr/sbin/pm-suspend

line, and make sure that /etc/group file lists your username in sudo group.

5. In terminal run:

sudo -s
wget -O- http://mars.illtel.denver.co.us/~abelits/software/olpc/power-management/xo-power-management-0.2.tar.gz | tar xvz -C /
cd /
patch -p1 < tmp/gdm-scripts.patch

The last line should modify etc/gdm/Init/Default and etc/gdm/PostSession/Default files. Additionally tarball should extract etc/gdm/PostLogin/Default file into the same directory tree under /etc/gdm It adds entries to start and stop xo-pm-input-monitor script.

The rest of files in tarball are scripts actually involved in suspend/resume process.

By default closing and opening the lid while at the login screen suspends and resumes in the same manner as in Sugar, except wireless is always turned off. Power button does nothing (probably should make it run shutdown).

When logged in, both lid and power button suspend and resume, however password timeout only happens if XO is awakened by some other event. When XO is awakened by pressing power button, or by opening the lid if it was suspended by closing that lid, there is no timeout for re-suspend. Password prompt is still there, however now it's optional -- you can create a directory
.xo-suspend (with leading dot) under your home directory, and presence of files in it disables password prompts:

.xo-suspend/lid-without-password disables password prompt if laptop was suspended by closing the lid

.xo-suspend/without-password disables all password prompt after suspend/resume -- screensaver still runs, however it exits after tapping a key or moving the pointer at.

Content of the files does not matter, I usually create them zero-length using touch utility.

Suspend script should shut down the computer if battery charge goes below 5% while suspended (the value, charge in percents plus one, is in /usr/bin/xo-suspend script on the line 27).

Again, those scripts went only through minimal testing on my XO while I was working on it.
« Last Edit: October 14, 2008, 10:13:54 AM by teapot » Logged

#407 Re: Beyond the Ubuntu Installation

hoogee
New

Posts: 3


October 14, 2008, 01:39:56 PM

so this suspend script wouldn't work with 711? isnt that the newest stable?
Logged

#408 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 14, 2008, 01:50:50 PM

so this suspend script wouldn't work with 711? isnt that the newest stable?
I only tested this on Ubuntu installed with kernel from 760. Earlier versions might work, but just  as well may be broken.
Logged

#409 Re: Beyond the Ubuntu Installation

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


October 14, 2008, 01:58:18 PM

Quote
Again, those scripts went only through minimal testing on my XO while I was working on it.

My minimal testing confirms that works as advertised Grin
Supper
Now, where are these sounds (for the suspend and the new one from gdm that appears in this version) and how could they be eliminated/changed/volume adjusted is someone wishes to?...

PS energy consumption while in suspension remains very low at the range of 2.5% per hour in an 8h suspension test. This would be almost 2 days on a charged battery!
Also the suspend state looks pretty robust and safe. My son hard-shutdown the XO from the power button while in suspension -he prefers Sugar- and nothing happened! Rebooted fine without any problems. I can not guarantee about removing the battery though.... Grin

« Last Edit: October 15, 2008, 03:09:34 AM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#410 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 14, 2008, 04:06:07 PM

Now, where are these sounds (for the suspend and the new one from gdm that appears in this version) and how could they be eliminated/changed/volume adjusted is someone wishes to?...

They are defined near the top of /usr/bin/xo-suspend (SOUND_SUSPEND, SOUND_WAKEUP and SOUND_RESUME). There is no separate volume control, however you can call mixer from the script, ex: before aplay lines:

Code:
MASTERVOLUME=`amixer cget name="Master Playback Volume" | egrep "^  : values=" | cut -d= -f2`
amixer -q cset name="Master Playback Volume" 10,10

and after them, to restore the volume:

Code:
amixer -q cset name="Master Playback Volume" "${MASTERVOLUME}"

That method always gives the same volume, and does not affect your regular settings, what may or may not be the best for this purpose, however to make it completely predictable you have to do that for both "Master Playback Volume" and "PCM Playback Volume", what can be rather cumbersome.

An easier solution is use some audio editor (ex: audacity) to make a version of the file with volume scaled to the desired level ("Amplify" effect with negative value, then export). Then volume of the sound will be scaled with the currently set volume.
Logged

#411 Re: Beyond the Ubuntu Installation

Rao
Contributor
*
Posts: 71


October 15, 2008, 02:43:44 PM

Now, my next problem is to be able to connect the Internet via the WEP Wifi (which was working with sugar).  I tried by entering the passphrase (after selecting the my network which showed up) in the network manager  but didn't connect to the internet.

Can suggest where I should start for this?

WEP key (either ASCII or hex) is not the same as passphrase, Most likely your router uses keys, so choose key instead of passphrase in authentication dialog.

with Build 711 I was able to connect to my  Wifi network (WEP).
After updating  my OLPC to Build 767, I cannot connect to the wifi nework in Ubuntu (I can in Sugar, though).  The Network Manager keeps on trying unsuccessfully even before my entering the Ascii Key!
Also, my network appears twice in the available networks.

During the booting process, I noticed a message which said "Journal needs recovery." 

Can you  please help?
Logged

#412 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 15, 2008, 05:36:13 PM

After updating  my OLPC to Build 767, I cannot connect to the wifi nework in Ubuntu (I can in Sugar, though).  The Network Manager keeps on trying unsuccessfully even before my entering the Ascii Key!
Also, my network appears twice in the available networks.

During the booting process, I noticed a message which said "Journal needs recovery." 

Can you  please help?


Have updated kernel in Ubuntu after upgrading Sugar? If not, the problem is not related to the upgrade.
Logged

#413 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 16, 2008, 01:59:16 AM

I have uploaded a new version of the power management scripts at

http://mars.illtel.denver.co.us/~abelits/software/olpc/power-management/xo-power-management-0.3.tar.gz

Installation procedure is the same (included patch file is the same, so it only should be applied once). After installation you can remove /etc/sudoers entry for pm-suspend -- it's now handled by HAL layer, so this version has more things done "the right way". Log out and log in again (or reboot) to restart the scripts.

New functionality:

1. .xo-suspend/lid-disable file disables auto-suspend on closed lid. Screen is turned off, however laptop continues running in its normal mode. This is useful when laptop is used as a music player.
2. Power button pressed at the login screen shuts laptop down.
3. set-powersave-mode script switches to power-saving mode with dimmed backlight and disabled networking. Dim backlight can be easily reversed with backlight keys. Script switches back to regular mode if called with argument "off".
4. Sound now plays at the constant volume, and can be configured in /usr/bin/xo-suspend file
5. VERY EXPERIMENTAL, disabled by default, aggressive power-saving. Similar to Sugar, XO suspends after half a minute of inactivity while still keeping display (and radio unless turned off already in power-saving mode) on, and transparently resumes on any input or network packet. Playing sound does not count as "inactivity", so music and video players prevent this mode from triggering.

To enable that mode:

As root:
1. Add the line /usr/bin/xo-pm-interrupts-monitor to /etc/rc.local file before "exit 0" line.
2.
mkdir /etc/xo-suspend
touch /etc/xo-suspend/aggressive
/usr/bin/xo-pm-interrupts-monitor

Original suspend mode works better (improved timing and scripts), power-saving mode is usable (except for the obvious fact that it relies on turning the radio off), aggressive mode did not trash my XO, however not much is known beyond that. There are two mildly annoying peculiarities in this mode:

1. Closing the lid while in this "suspended" mode does not suspend -- you should open the lid and close it again. Real suspend always produces a sound, so if you closed the lid, and laptop is silent, open and close it again.

2. Moving USB mouse does not wake up the laptop from this mode -- if it suspended while working with external mouse, touch keyboard or touchpad, then continue using the external mouse.
Logged

#414 Re: Beyond the Ubuntu Installation

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


October 16, 2008, 03:29:50 AM

Great! but let me clarify few things so I do not mess-up...
First of all you do not need the previous versions, correct? and this one can be installed on the top of the previous ones (with the indicated changes), yes?
Then
Quote
Installation procedure is the same (included patch file is the same, so it only should be applied once).

This means
Code:
sudo -s
wget -O- http://mars.illtel.denver.co.us/~abelits/software/olpc/power-management/xo-power-management-0.3.tar.gz | tar xvz -C /
correct?
 but the
Code:
cd /
patch -p1 < tmp/gdm-scripts.patch
is not needed if version 0.2 was previously installed, but is required if only version 0.1 was installed. Correct? Is there a problem if is done again so there is a uniform set of instructions for old and new users?
The line to be removed from the /etc/sudoers is the
Code:
%sudo ALL=(root)        NOPASSWD: /usr/sbin/pm-suspend
and applies to both previous versions.
I would guess if only version 0.1 is installed the
Code:
# suspend
"xo-suspend"
 c:222
should be removed from the .xbindkeysrc file in the user's home directory.
Quote
New functionality:

1. .xo-suspend/lid-disable file...
This would be a user generated empty file  in the .xo-suspend directory in the user's home directory that should also be generated in not already there, correct? In this case the XO suspends only with the power button (or the EXPERIMENTAL) and if not there the XO suspends by closing the lid as in version 0.2?

What about the files:
Quote
.xo-suspend/lid-without-password disables password prompt if laptop was suspended by closing the lid

.xo-suspend/without-password disables all password prompt after suspend/resume -- screensaver still runs, however it exits after tapping a key or moving the pointer at.
from the version 0.2 are they still valid?

Quote
3. set-powersave-mode script switches to power-saving mode with dimmed backlight and disabled networking. Dim backlight can be easily reversed with backlight keys. Script switches back to regular mode if called with argument "off".
I missed that. This is on by default? How long of inactivity before it kicks in? How do you change the time? and is deactivated by the command
Code:
./set-powersave-mode off
at the terminal? should it be done every time you login or it remembers is if you do it once? and finally what is "regular mode"? The XO just stays on ignoring any length of inactivity?
« Last Edit: October 16, 2008, 03:37:02 AM by mavrothal » Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#415 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 16, 2008, 05:32:39 AM

Great! but let me clarify few things so I do not mess-up...
First of all you do not need the previous versions, correct? and this one can be installed on the top of the previous ones (with the indicated changes), yes?
Right. Eventually I will release this as a .deb, so transitions between versions will be handled automatically, however at this point the rate of changes is too high.
Quote
Then
Quote
Installation procedure is the same (included patch file is the same, so it only should be applied once).

This means
Code:
sudo -s
wget -O- http://mars.illtel.denver.co.us/~abelits/software/olpc/power-management/xo-power-management-0.3.tar.gz | tar xvz -C /
correct?
Right.
Quote
but the
Code:
cd /
patch -p1 < tmp/gdm-scripts.patch
is not needed if version 0.2 was previously installed, but is required if only version 0.1 was installed. Correct? Is there a problem if is done again so there is a uniform set of instructions for old and new users?
Yes. patch utility will complain if someone tries to apply the same patch twice, and will ask if you really want to do that. If such a thing happened, there will be obviously duplicated lines in the scripts that can be removed in a text editor.
Quote
The line to be removed from the /etc/sudoers is the
Code:
%sudo ALL=(root)        NOPASSWD: /usr/sbin/pm-suspend
and applies to both previous versions.
Yes. Previous versions ran that utility directly, however its intended purpose is to be called through hal/dbus, so access control is set using policykit utilities instead of sudo.
Quote
I would guess if only version 0.1 is installed the
Code:
# suspend
"xo-suspend"
 c:222
should be removed from the .xbindkeysrc file in the user's home directory.
Yes. Code that should be executed on behalf of the user runs from the main monitor script, so both power button and lid switch can initiate the suspend.
Quote
Quote
New functionality:
1. .xo-suspend/lid-disable file...
This would be a user generated empty file  in the .xo-suspend directory in the user's home directory that should also be generated in not already there, correct?
Yes.
Quote
In this case the XO suspends only with the power button (or the EXPERIMENTAL) and if not there the XO suspends by closing the lid as in version 0.2?
yes
Quote
What about the files:
Quote
.xo-suspend/lid-without-password disables password prompt if laptop was suspended by closing the lid

.xo-suspend/without-password disables all password prompt after suspend/resume -- screensaver still runs, however it exits after tapping a key or moving the pointer at.
from the version 0.2 are they still valid?
Yes -- they are the same.
Quote
Quote
3. set-powersave-mode script switches to power-saving mode with dimmed backlight and disabled networking. Dim backlight can be easily reversed with backlight keys. Script switches back to regular mode if called with argument "off".
I missed that. This is on by default? How long of inactivity before it kicks in? How do you change the time? and is deactivated by the command
Code:
./set-powersave-mode off
at the terminal?
Without leading "./" -- the script is installed in /usr/bin
Quote
should it be done every time you login or it remembers is if you do it once? and finally what is "regular mode"? The XO just stays on ignoring any length of inactivity?
Only experimental mode works by timeout -- regular power-saving mode and full-power mode are now switched manually, and for now the only differences are wireless and default backlight brightness. Presence of now-experimental auto-suspend and other power management parameters can be added later. Once this is tested, and parameters confirmed to be usable, it will make sense to make a "smart" mode-changing by timeout (for example, network will be disabled if specifically network is unused). Experimental mode is supposed to be nearly invisible to the user -- laptop switches to it by timeout and switches back whenever anything happens with inputs or network. It should be only noticeable by power light turning off and a small delay before accepting a keystroke or touchpad movement that switches this mode off. It imitates behavior of ohm power manager in Fedora/Sugar.
« Last Edit: October 16, 2008, 05:36:49 AM by teapot » Logged

#416 Re: Beyond the Ubuntu Installation

Rao
Contributor
*
Posts: 71


October 16, 2008, 06:55:30 AM

After updating  my OLPC to Build 767, I cannot connect to the wifi nework in Ubuntu (I can in Sugar, though).  The Network Manager keeps on trying unsuccessfully even before my entering the Ascii Key!
Also, my network appears twice in the available networks.

During the booting process, I noticed a message which said "Journal needs recovery." 

Can you  please help?


Have updated kernel in Ubuntu after upgrading Sugar? If not, the problem is not related to the upgrade.



Thanks for the promptr reply.  It seems the Network Manager is slow and "hit and miss"  compared to the corresponding thing in Sugar.  I kept trying and it finally connected to my Wifi network after I enterd the key.
After I used the Ubuntu for a while I noticed that the Xfce4 menu icon (at the top) disappered (memory overwritten?) and I had to reinstall it.

I just want to confirm, is the following the right procedure to update the Ubuntu kernel after Sugar update?

==================
cd /media/OLPCRoot
rm boot/*.zip boot/vmlinuz boot/olpcrd.img
cp -ia /boot/* boot/ < /dev/null
cp -a /lib/modules/* lib/modules/
cp -a /lib/firmware lib/firmware/
reboot
==========

Logged

#417 Re: Beyond the Ubuntu Installation

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


October 16, 2008, 07:06:46 AM

Quote
Quote
Quote
3. set-powersave-mode script switches to power-saving mode with dimmed backlight and disabled networking. Dim backlight can be easily reversed with backlight keys. Script switches back to regular mode if called with argument "off".
I missed that. This is on by default? How long of inactivity before it kicks in? How do you change the time? and is deactivated by the command
Code:
./set-powersave-mode off
at the terminal?
Without leading "./" -- the script is installed in /usr/bin
Quote
should it be done every time you login or it remembers is if you do it once? and finally what is "regular mode"? The XO just stays on ignoring any length of inactivity?
Only experimental mode works by timeout -- regular power-saving mode and full-power mode are now switched manually, and for now the only differences are wireless and default backlight brightness.

Sorry but I'm still confused about the set-powersave-mode  Embarrassed
Is it on by default? or you need to enter in terminal set-powersave-mode (or make a luncher button) to activate it?
If the latter, does it exit by sensing some computer activity or is just the scripted version of manually dimming the light and disconnecting the network?
If the latter can you reinstate backlight and network manually or should use the set-powersave-mode off ?
Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )

#418 Re: Beyond the Ubuntu Installation

teapot
OLPC News Forum Expert
****
Posts: 662



WWW
October 16, 2008, 07:32:07 AM

If the latter, does it exit by sensing some computer activity or is just the scripted version of manually dimming the light and disconnecting the network?
Yes -- plus powering down the radio instead of just keeping it inactive. It uses hal infrastructure and is intended to be called when appropriate by timeout later, however for now it's just a way to run a script to reduce power consumption by slightly above 25%.
Quote
If the latter can you reinstate backlight and network manually or should use the set-powersave-mode off ?
Yes.
Logged

#419 Re: Beyond the Ubuntu Installation

mavrothal
Administrator
OLPC News Forum Expert
*****
Posts: 1289


October 16, 2008, 08:24:45 AM

Quote
Quote
If the latter can you reinstate backlight and network manually or should use the set-powersave-mode off ?
Yes.
Yes which one? Smiley
or yes both?
Logged

XO-1: Is never going to run Flash, but is certainly flashy!
(If you want Flash, get an XO-1.5 running OLPC 11.2.0 or XOpup Grin )
Pages: 1 ... 25 26 27 [28] 29 30 31 ... 37
Print
Jump to:  

Members
Total Members: 2405
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 23
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 20
Total: 20