xfce-power-manager

Post here if you are a new Porteus member and you're looking for some help.
kultex
Black ninja
Black ninja
Posts: 71
Joined: 30 Dec 2015, 12:11
Distribution: Porteus 4.0 XFCE
Location: Austria

xfce-power-manager

Post#1 by kultex » 12 May 2019, 13:55

Sorry, I have another newbe question - how the energy-settings in xfce are working .
  • 1. Question: how can I change the settings of xfce4-power-manager - I can change the values in the graphical interface, but it has no effect - same thing if I change the values in .config/xfce4/xfconf/xfce-perchannel-xml/xfce2-power-manager.xml.
    It does always the same thing - shut doqn, if I press the power button - suspends, when I close the lid -etc. etc.
  • 2. Question: Hibernation - it wants to hibernate on inactivity. but it does not, because of not finding the swapfile - there is a swapfile, but it recognices it as swsuspend - normally hibernation should work with this filetype, but ok it does not - so I swapon - and now hibernation works

    Code: Select all

    root@porteus:/home/guest# cat /etc/fstab
    # Do not edit this file as fstab is recreated automatically during every boot.
    # Please use /etc/rc.d/rc.local or sysvinit scripts if you want to mount/unmount
    # drive, filesystem or network share.
    
    # System mounts:
    aufs / aufs defaults 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs defaults 0 0
    devtmpfs /dev devtmpfs defaults 0 0
    devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
    
    # Device partitions:
    /dev/mmcblk0p1 /mnt/mmcblk0p1 ntfs-3g noatime,nodiratime,suid,dev,exec,async 0 0
    /dev/mmcblk0p1 /mnt/mmcblk0p1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    /dev/mmcblk0p2 /mnt/mmcblk0p2 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    /dev/mmcblk1p1 /mnt/mmcblk1p1 vfat users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show,umask=0,check=s,utf8 0 0
    /dev/mmcblk1p2 /mnt/mmcblk1p2 swsuspend users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    /dev/sda1 /mnt/sda1 ext4 users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    
    # Hotplugged devices:
    root@porteus:/home/guest# swapon /dev/mmcblk1p2
    
    swapon: /dev/mmcblk1p2: Software-Ruhezustandsdaten entdeckt. Die Auslagerungssignatur wird neu geschrieben.
    
    root@porteus:/home/guest# cat /etc/fstab
    # Do not edit this file as fstab is recreated automatically during every boot.
    # Please use /etc/rc.d/rc.local or sysvinit scripts if you want to mount/unmount
    # drive, filesystem or network share.
    
    # System mounts:
    aufs / aufs defaults 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs defaults 0 0
    devtmpfs /dev devtmpfs defaults 0 0
    devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
    
    # Device partitions:
    /dev/mmcblk0p1 /mnt/mmcblk0p1 ntfs-3g noatime,nodiratime,suid,dev,exec,async 0 0
    /dev/mmcblk0p1 /mnt/mmcblk0p1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    /dev/mmcblk0p2 /mnt/mmcblk0p2 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    /dev/mmcblk1p1 /mnt/mmcblk1p1 vfat users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show,umask=0,check=s,utf8 0 0
    /dev/mmcblk1p2 none swap sw,pri=1 0 0
    /dev/sda1 /mnt/sda1 ext4 users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0
    
    # Hotplugged devices:
    root@porteus:/home/guest# 
    
    but how to make it persistent - because on every boot, the swappartition is all the time recogniced as swsuspend
  • 3. Question - how to resume from hibernation. I run Porteus from USB-Stick. My syslinux Porteus config is like this:

    Code: Select all

    LABEL GRAPHICAL
    MENU LABEL Graphics mode
    KERNEL /boot/syslinux/vmlinuz
    INITRD /boot/syslinux/initrd.xz
    APPEND changes=/porteus resume=/dev/mmcblk1p2 
    TEXT HELP
    but it does not resume - it boots fresh
sorry - I have no more ideas

kultex
Black ninja
Black ninja
Posts: 71
Joined: 30 Dec 2015, 12:11
Distribution: Porteus 4.0 XFCE
Location: Austria

xfce-power-manager

Post#2 by kultex » 13 May 2019, 07:22

ok - I think found first solution:

add swapon /mnt/mmcblk1p2/Porteus.swap to /etc/rc.d/rc.local should make swap persistent - not working

but swapon /dev/mmcblk1p2 does it

maybe change the faq http://www.porteus.org/faq.html#twenty

kultex
Black ninja
Black ninja
Posts: 71
Joined: 30 Dec 2015, 12:11
Distribution: Porteus 4.0 XFCE
Location: Austria

xfce-power-manager

Post#3 by kultex » 13 May 2019, 20:47

I checked the xfce power manager with xfce4-powermanager --debug and everything seems ok

so I think something overrules the power manager, but what is it???? - acpid does not have any values - the same with pm-utils

?????

kultex
Black ninja
Black ninja
Posts: 71
Joined: 30 Dec 2015, 12:11
Distribution: Porteus 4.0 XFCE
Location: Austria

xfce-power-manager

Post#4 by kultex » 14 May 2019, 09:08

it is xset - default xset dpms settings are: 300 0 600 - setting dpms to 300 0 0 works - but again, the dpms settings are overwritten on every boot

add xset dpms 600 0 0 to /etc/rc.d/rc.local does not work, because x is not ready, when it performs the command

sleep 100s before the xset command does not work either, becaue it just pauses the whole boot process (very strange!!!)

is there an other possibilty to do this? - do I need to make a script and put it to xfce autostart? do you use bash or ash?

still open is, what overwrites closing the lid and the powerbutton - there are those lines in dmesg

Code: Select all

[    1.334287] ACPI: AC Adapter [ADP1] (off-line)
[    1.334444] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[    1.334500] ACPI: Lid Switch [LID0]
[    1.334590] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input1
[    1.334635] ACPI: Sleep Button [SLPB]
[    1.334726] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[    1.334751] ACPI: Power Button [PWRF]
maybe you cant change this???

kultex
Black ninja
Black ninja
Posts: 71
Joined: 30 Dec 2015, 12:11
Distribution: Porteus 4.0 XFCE
Location: Austria

xfce-power-manager

Post#5 by kultex » 14 May 2019, 17:15

  • regarding swap - I made a swap partition on the usbstick and this is recogniced by porteus on booting - so that seems to be a problem of the sd-card drivers (must be in the kernel and not as module?) - or Porteus does not look for swap in sd-cards...
  • I checked with Lubuntu with kernel 4.17, which uses also xfce-power-manager - that there everything works normal - the only difference I can find - there are non of these ACPI Buttons in dmesg...
I will stop here, because I can live with it....

kultex
Black ninja
Black ninja
Posts: 71
Joined: 30 Dec 2015, 12:11
Distribution: Porteus 4.0 XFCE
Location: Austria

xfce-power-manager

Post#6 by kultex » 16 May 2019, 20:03

ok - something solved...

in the beginning xfc4-power-manager.xml looks like this

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-power-manager" version="1.0">
  <property name="xfce4-power-manager" type="empty">
    <property name="presentation-mode" type="bool" value="false"/>
    <property name="dpms-sleep-mode" type="string" value="Standby"/>
    <property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
    <property name="power-button-action" type="uint" value="4"/>
    <property name="critical-power-action" type="uint" value="4"/>
    <property name="brightness-switch-restore-on-exit" type="int" value="1"/>
    <property name="brightness-switch" type="int" value="0"/>
    <property name="blank-on-ac" type="int" value="10"/>
    <property name="dpms-on-ac-sleep" type="uint" value="0"/>
  </property>
</channel>
as long as you do not touch all the buttons, it is not controled by the power manager.... when you touch and change them, then the xfc4-power-manager.xml looks like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-power-manager" version="1.0">
  <property name="xfce4-power-manager" type="empty">
    <property name="presentation-mode" type="bool" value="false"/>
    <property name="dpms-sleep-mode" type="string" value="Standby"/>
    <property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
    <property name="power-button-action" type="uint" value="0"/>
    <property name="critical-power-action" type="uint" value="1"/>
    <property name="brightness-switch-restore-on-exit" type="int" value="1"/>
    <property name="brightness-switch" type="int" value="0"/>
    <property name="blank-on-ac" type="int" value="0"/>
    <property name="dpms-on-ac-sleep" type="uint" value="0"/>
    <property name="lid-action-on-battery" type="uint" value="1"/>
    <property name="logind-handle-lid-switch" type="bool" value="false"/>
    <property name="lid-action-on-ac" type="uint" value="1"/>
    <property name="critical-power-level" type="uint" value="4"/>
    <property name="inactivity-sleep-mode-on-battery" type="uint" value="1"/>
    <property name="inactivity-on-battery" type="uint" value="16"/>
    <property name="inactivity-on-ac" type="uint" value="14"/>
    <property name="brightness-on-battery" type="uint" value="17"/>
    <property name="blank-on-battery" type="int" value="1"/>
    <property name="dpms-on-battery-sleep" type="uint" value="5"/>
    <property name="dpms-on-battery-off" type="uint" value="9"/>
    <property name="dpms-on-ac-off" type="uint" value="14"/>
    <property name="brightness-level-on-battery" type="uint" value="21"/>
    <property name="brightness-on-ac" type="uint" value="16"/>
    <property name="brightness-level-on-ac" type="uint" value="67"/>
  </property>
</channel>
the power botton is still not working - I found something for systemd

https://bbs.archlinux.org/viewtopic.php?id=215999

but porteus is not systemd....

Post Reply