Power Manger Suspend and File Operations

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
JayBird707
Level 2
Level 2
Posts: 69
Joined: Sat Jan 30, 2016 9:56 pm

Power Manger Suspend and File Operations

Postby JayBird707 » Wed Jan 11, 2017 12:35 pm

Mint 18 Xfce
I needed to transfer files from a 1TB external usb drive to a new 4TB external usb drive because the 1TB was getting full. I started the file transfer use Thunar and as expected it was going to take hours. I checked the computer awhile later and found it in suspend mode.

I was confused because I thought the system would recognize the file transfer process and not enter suspend mode.

I went to the power manager settings and set System > Plugged In to Never.

I checked the computer awhile later and found it in suspend mode.

Now I'm really confused. Any and all advice deeply appreciated.

Oh, I love Mint and I just did an install for a friend and am trying to spread the word.
Dell Studio 1737 - Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz; 8GiB RAM
Kernel : Linux 4.4.0-57-generic (x86_64) Distribution: Linux Mint 18 Sarah: XFCE 4
HDA-Intel - HDA ATI HDMI

User avatar
WharfRat
Level 19
Level 19
Posts: 9492
Joined: Thu Apr 07, 2011 8:15 pm

Re: Power Manger Suspend and File Operations

Postby WharfRat » Wed Jan 11, 2017 3:22 pm

JayBird707,

What might be happening is the BIOS is in charge of power management for this particular computer and not the kernel.

What you can try is adding the pci=noacpi or acpi=off kernel parameter to see if it's of any help.

Another alternative is to try disabling ACPI in the BIOS.

Good luck :wink:
Image ImageImage

JayBird707
Level 2
Level 2
Posts: 69
Joined: Sat Jan 30, 2016 9:56 pm

Re: Power Manger Suspend and File Operations

Postby JayBird707 » Thu Jan 12, 2017 8:54 am

I checked my BIOS and there is no setting for acpi. Where would I add the other suggestions
pci=noacpi or acpi=off kernel
?

The other thing I did was some research and based on a script I found I wrote a script as a work around. The only problem with the script is the initial test of the If statement doesn't work consistently. For example the initial condition is the screensaver is active and the power manager system suspend on AC is 1 hour the first time I run the script and it goes into 'then' portion of the statement. I'll run the test portion of the If statement in a terminal at get a 0 result. Based on the 0 result the If statement should have gone into the 'else' portion of the statement. Then with no changes to the initial conditions I'll run the script again and it works correctly. And after this first initial burp then the script works fine.

Thanks for your help and all advice is always appreciated!

Code: Select all

#!/bin/bash
#
#query dpms with xset and switch status, also exit and restart xscreensaver
#
if xset -q | grep DPMS| grep -c Disabled; then
     xset +dpms
   xscreensaver &
     xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 60
   notify-send -i gtk-dialog-info "DPMS & Screensaver Enabled with 60 Minute Suspend"
else
   xset -dpms
   xscreensaver-command -exit
   xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 0
   notify-send -i gtk-dialog-info "DPMS & Screensaver Disabled with No System Suspend"
fi
Dell Studio 1737 - Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz; 8GiB RAM
Kernel : Linux 4.4.0-57-generic (x86_64) Distribution: Linux Mint 18 Sarah: XFCE 4
HDA-Intel - HDA ATI HDMI

User avatar
grumpy_geek
Level 2
Level 2
Posts: 80
Joined: Tue Jan 03, 2017 3:50 am
Contact:

Re: Power Manger Suspend and File Operations

Postby grumpy_geek » Thu Jan 12, 2017 10:33 am

JayBird707 wrote:Where would I add the other suggestions?


How about http://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter ...?

User avatar
WharfRat
Level 19
Level 19
Posts: 9492
Joined: Thu Apr 07, 2011 8:15 pm

Re: Power Manger Suspend and File Operations

Postby WharfRat » Thu Jan 12, 2017 11:23 am

JayBird707,

Here's a recent post setting up a kernel parameter for a different reason, but the procedure is the same.

viewtopic.php?f=90&t=236951&sid=bdbd795c452978d12ff7c611e7580041#p1263374
Image ImageImage

JayBird707
Level 2
Level 2
Posts: 69
Joined: Sat Jan 30, 2016 9:56 pm

Re: Power Manger Suspend and File Operations

Postby JayBird707 » Mon Jan 23, 2017 11:32 am

Here's an update: I did more extensive testing with Kodi. When Kodi is running the screensaver with function but suspend is inhibited by Kodi. I'm guessing some sort of dbus message.

As far as the file transfer issue I still have more work to do on that.

Anyone who looked at the script I previously posted here's an updated version because I found the original did not obtain consistent results for dpms. Also I found out to inhibit suspend the setting must be at 14 not 0 for proper results.

Code: Select all

#!/bin/bash
#
#query dpms with xset and switch status, also exit and restart xscreensaver
#
variableA=$( xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac )
if [ "$variableA" == "14" ]
then
     xset +dpms
   xscreensaver &
     xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 60
   notify-send -i gtk-dialog-info "DPMS & Screensaver Enabled with 60 Minute Suspend"
else
   xset -dpms
   xscreensaver-command -exit
   xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 14
   notify-send -i gtk-dialog-info "DPMS & Screensaver Disabled with No System Suspend"
fi
Dell Studio 1737 - Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz; 8GiB RAM
Kernel : Linux 4.4.0-57-generic (x86_64) Distribution: Linux Mint 18 Sarah: XFCE 4
HDA-Intel - HDA ATI HDMI


Return to “Newbie Questions”

Who is online

Users browsing this forum: Mute Ant and 9 guests