Problem with Trisquel 6.0 and pm-powersave

14 réponses [Dernière contribution]
aliasbody
Hors ligne
A rejoint: 09/14/2012

Hello everyone,

A long time as passed since I posted my last comment on this website, but I'm back again :D

I have a problem with Trisquel 6.0 (which comes from Trisquel 5.5) with my MSI GX720 and the pm-powersave tool.

The problem is the fallowing :

--> When the charger is connected the OS is fast. But, when it isn't, then Trisquel becomes impossible to use because of it slowness.

After searching and asking on this same forum in the past, I've managed (thanks to the help of some of you) to find the "sudo pm-powersave false" command which would bring speed into my computer. The problem here is that, by doing this, I am also disabling the Hibernate and Suspend features, and because of that, if I let the computer suspend it won't turn on again.

My question is : How can I solve this problem in order to continue working normally ? (I am trying to avoid changing my distro because I am working on some Software that I would love to see working - if not integrated - into Trisquel, and since Trisquel is so outdated it is kind of hard to create anything that would work in Trisquel with a more updated distribution).

Best Regards,
Luis Da Costa

grimlok
Hors ligne
A rejoint: 04/16/2013

Luis,

If it is an Intel-based chipset you may be able to go into the BIOS and disable the "SpeedStep" option which should take care of it. The only thing about this is say good bye to battery life.

Grimlok

aliasbody
Hors ligne
A rejoint: 09/14/2012

Hello grimlok, thank for your help. But it doesn't solve the problem, enabled or disabled the problem is still here.

freeme
Hors ligne
A rejoint: 10/10/2012

sudo aptitude install cpufrequtils

sudo aptitude install indicator-cpufreq

then run

indicator-cpufreq

An applet will appear in the system tray, providing two categories of information. (I only see these options in KDE when I right click on the applet):

CPU speed - mine show:

2.60 GHz
1.90 GHz
1.40 GHz
0.80 GHz

The second category will show the cpu frequency governor presently set on the system. One of the following will be selected. Mine shows 'ondemand' already selected:

Conservative
Ondemand
Powersave
Performance

I tested this on Toutatis. I haven't changed the defaults. If you read up on which cpu governor will suit your needs the best, it might be better to select the governor you wish to run at boot, although I haven't looked into how to do that yet myself.

Hope this helps

aliasbody
Hors ligne
A rejoint: 09/14/2012

Hello there ! Thank you for the help. But it didn't help at all, even in the performance mode or directly at 2,40ghz the problem still persists. I don't think that it has anything to do with the CPu Speed at all since the problem stops (even at 800mhz) when the mouse is in top of another window. So I'm pretty sure this is a GPU Powersaving related problem. Now I just need to find how to solve this.

lembas
Hors ligne
A rejoint: 05/13/2010

Maybe it would work if you add pm-powersave true to the suspend and hibernate scripts?

(no need for sudo in the scripts, those are run as root)

man pm-action for more info

aliasbody
Hors ligne
A rejoint: 09/14/2012

Well this is actually something I could try, but how to ?

lembas
Hors ligne
A rejoint: 05/13/2010

Edit a file with filename starting with 00 in /etc/pm/sleep.d as suggested by the mentioned manual page

Put in the command I suggested above there, that way it will be run just before suspend and hib and the other command last after waking up.

Look at the other files in there to see how you'll want to write the file to achieve this.

aliasbody
Hors ligne
A rejoint: 09/14/2012

So, let me see if I understood it well :

1 - I create a file starting with 00 (like 00_MsiPowerSuspend) in the /etc/pm/sleep.d with something like this :


#!/bin/sh

pm-powersave true

Until now this works, I can now Suspend with the "pm-powersave false" option selected. Now I need to find a way to enable this option by default and everytime the computer comes out of suspend and hibernate state. Where is the best place for those kind of scripts ?

lembas
Hors ligne
A rejoint: 05/13/2010

Yeah. This content should do the trick.

#!/bin/sh

case "$1" in
   suspend|hibernate)
        pm-powersave true;;
   resume|thaw)
        pm-powersave false;;
esac
aliasbody
Hors ligne
A rejoint: 09/14/2012

This worked like a charm :D

Just another question, where is the best place to put the initial script ? - In order to boot with the "pm-powersave false" option before the GDM Window. Since it becomes slow even at that time).

lembas
Hors ligne
A rejoint: 05/13/2010

Glad to hear that. I'll let you figure this one out by yourself. Suggest you start by reading /etc/rc2.d/README

(2 is the default runlevel on Debian based distros)

If the INIT INFO part seems hard (does for me) use some other script as a template.

I guess it might not work if it's run too early... or too late. Trial and error ahead, fun times!

aliasbody
Hors ligne
A rejoint: 09/14/2012

I remember working with the runlevels when I was on arch. But I never found and easy way (as the arch way was) to do that in Debian based systems (the same with daemons and modules), but I will eventually find out :D

Thanks for the information !

aliasbody
Hors ligne
A rejoint: 09/14/2012

Hello again,

Thank you for all your help I will try that as soon as possible :D I've been testing other Ubuntu 12.04 based distributions to see if the problem was here as well (like Elementary OS that I've found to be a gorgeous distribution to be honest but I will talk about this in a different post for different reasons), and I've noticed that none of this applied to those distributions.... only for Trisquel !

I will try to see the scripts code and the version of the pm-utils software in order to see what changes. But I've noticed one thing tho : This problem isn't there in KDE with Trisquel (haven't tested with others), and better than that, if I boot with the "nomodeset" option in the Kernel then I don't have this problem at all on any DE in Trisquel.

So it is possible to be a Nouveau related problem, but until then I will have to solve this by trying your tweaks. (I also need to understand why the HDMI is detected - since it detects the screen connected to it - but not usable, since no image appears on the screen).

aliasbody
Hors ligne
A rejoint: 09/14/2012

I've found something important. This only happens with Gnome or associated, I've tried Gnome Shell, Unity, Gnome Classic (Trisquel default), Xfce, Openbox and KDE and the only ones which the problem is existent is with the Gnome Versions (Gnome Shell, Unity and Gnome Classic) and with gnome Software.

But if I run the same applications on the terminal they take the normal time to load. Example :

- Gimp + Charger + Click = 1 Second
- Gimp + Battery + Click = 30 Seconds to 1 Minute

- Gimp + Charger + Terminal = 1 Second
- Gimp + Battery + Terminal = 1 Second

But then if I remove the "StartupNotify=true" line from the desktop file the result will be a very fast boot time from anywhere (even on Gnome if the bottom launcher is not used).

Can this by due to a Ubuntu default setting ?