You are not logged in.

#151 2012-09-03 07:27:23

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Archlinux is moving to systemd

cfr wrote:

I can't uninstall pm-utils or pm-quirks because upower needs them and kdelibs depends on upower. Which makes me wonder how kdelibs is sleeping/suspending the system...

The version of upower in testing should allow you to remove pm-utils, as it uses systemd directly.

Offline

#152 2012-09-03 10:30:53

ifaigios
Member
Registered: 2012-07-09
Posts: 8

Re: Archlinux is moving to systemd

tomegun wrote:

The version of upower in testing should allow you to remove pm-utils, as it uses systemd directly.

I don't think so:

[root@dad-pc-arch ~]# pacman -R pm-utils
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: upower: requires pm-utils

[root@dad-pc-arch ~]# pacman -Qii pm-utils
Name           : pm-utils
Version        : 1.4.1-5
URL            : http://pm-utils.freedesktop.org
Licenses       : GPL
Groups         : None
Provides       : None
Depends On     : bash  procps  pm-quirks
Optional Deps  : None
Required By    : upower
Conflicts With : None
Replaces       : None
Installed Size : 244.00 KiB
Packager       : Florian Pritz <bluewind@xinu.at>
Architecture   : i686
Build Date     : Thu May 24 12:44:09 2012
Install Date   : Thu May 24 15:40:36 2012
Install Reason : Explicitly installed
Install Script : No
Description    : Utilities and scripts for suspend and hibernate power management
Backup Files:
(none)

[root@dad-pc-arch ~]# pacman -Qii upower
Name           : upower
Version        : 0.9.18-2
URL            : http://upower.freedesktop.org
Licenses       : GPL
Groups         : None
Provides       : None
Depends On     : systemd-tools  libsystemd  libusb  polkit  pm-utils  dbus-glib  libimobiledevice
Optional Deps  : None
Required By    : kdelibs
Conflicts With : None
Replaces       : None
Installed Size : 560.00 KiB
Packager       : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Architecture   : i686
Build Date     : Sun Sep 2 05:42:41 2012
Install Date   : Mon Sep 3 13:16:45 2012
Install Reason : Installed as a dependency for another package
Install Script : No
Description    : Abstraction for enumerating power devices, listening to device events and querying history and statistics
Backup Files:
(none)

Offline

#153 2012-09-03 11:18:54

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: Archlinux is moving to systemd

tomegun wrote:
cfr wrote:

I can't uninstall pm-utils or pm-quirks because upower needs them and kdelibs depends on upower. Which makes me wonder how kdelibs is sleeping/suspending the system...

The version of upower in testing should allow you to remove pm-utils, as it uses systemd directly.

http://www.archlinux.org/packages/testing/i686/upower/

Dependencies (7)
dbus-glib
libimobiledevice
libsystemd (systemd)
libusb (libusbx)
pm-utils
polkit
systemd-tools (systemd)

Are you saying the dependencies are incorrect?


Arch i686 on Phenom X4 | GTX760

Offline

#154 2012-09-03 15:51:38

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: Archlinux is moving to systemd

cfr wrote:

I'm currently getting double suspends with the sleep key even though systemd shouldn't be handling it under KDE and I'm not sure why. Usually, acpid handles this, triggering:

echo -n mem >/sys/power/state

Should I not be doing this under systemd?

There are the commands "systemctl {poweroff,reboot,suspend,hibernate}" that should work fine if you have upower installed. If you also set HandlePowerKey, HandleSleepKey, and HandleLidSwitch in /etc/systemd/logind.conf (see man 5 logind.conf), you should be able to do suspend/hibernate using those keys. If you have a working consolekit/logind session, you can do all this without having to enter your password.

I haven't tried them under all circumstances, but poweroff, reboot, and suspend do what they should on my laptop (I have logind.conf set up as described in the previous paragraph, and checked both using systemctl suspend and the buttons). I don't use anything fancy, though (no pm-utils or anything, just systemd and the upower backend) and I'm not actually sure where to configure those things (/etc/UPower/UPower.conf seems rather low-level). If I would want to do anything more complicated, I'd probably write a service file which is "WantedBy=suspend.target hibernate.target" or something.

OT: Man, I really want inline code tags.

Last edited by Runiq (2012-09-03 15:52:49)

Offline

#155 2012-09-03 16:09:28

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Archlinux is moving to systemd

stefanwilkens wrote:
tomegun wrote:
cfr wrote:

I can't uninstall pm-utils or pm-quirks because upower needs them and kdelibs depends on upower. Which makes me wonder how kdelibs is sleeping/suspending the system...

The version of upower in testing should allow you to remove pm-utils, as it uses systemd directly.

http://www.archlinux.org/packages/testing/i686/upower/

Dependencies (7)
dbus-glib
libimobiledevice
libsystemd (systemd)
libusb (libusbx)
pm-utils
polkit
systemd-tools (systemd)

Are you saying the dependencies are incorrect?

Sorry, my bad. The dependencies are correct. upower still uses some stuff from pm-utils even with systemd installed. Hopefully this will change in the future so we can drop pm-utils.

Offline

#156 2012-09-03 18:34:29

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Archlinux is moving to systemd

Should systemd be in the base group or thats gonna happen when initscripts are officially replaced?

Last edited by dolby (2012-09-03 18:35:37)


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#157 2012-09-03 19:05:52

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Archlinux is moving to systemd

dolby wrote:

Should systemd be in the base group

Eventually, yes...

or thats gonna happen when initscripts are officially replaced?

Bingo! smile

Offline

#158 2012-09-03 22:47:01

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Archlinux is moving to systemd

I've made some progress:

I had enabled sleep on lid with acpid because I couldn't sleep this way with systemd but I disabled this again. KDM/KDE seems to be taking care of this now - I get just one sleep. I don't know what command it is using which worries me, though.

I disabled the sleep key functionality in acpid as well. I now get just one sleep this way. I have no idea what is triggering sleep in this case or what command it is using. KDM/KDE doesn't seem to offer this functionality, systemd is not set to do it, acpid is not set to do it... I'm not sure what's left?

Reboot still doesn't work with systemd. bluetooth is also a mess.

systemctl reboot powers my machine off reliably. I can reboot fine with initscripts (checked this was still true by booting a rescue OS on the machine as I've uninstalled initscripts in Arch). This is true whether I issue this from the command line or do it via KDM/KDE's graphical interface. No matter what I do, I can't get a reboot with systemd.

bluetooth is now hard blocked. I'm not sure but I have a suspicion that the bluetooth stuff was implicated in the stuttering resumes I was getting after sleeping on lid close. If so, I wonder if it also explains the stuttering I've been getting on rebooting (which I'd previously thought might be an intermittent hardware issue). I can't reproduce this reliably but it is a persistent problem. If it is to do with bluetooth, I don't think it is a systemd issue per se but I think systemd is exacerbating it in that the problem occurs during resume as well as on reboot when it is obviously rather more serious (and also seems to hard block bluetooth).

Unfortunately, Linux doesn't recognise the bluetooth function-key switch on this laptop and I cannot figure out how to enable it to do so. That means the only way to get bluetooth back is to reset the bios, wiping the boot loader entry and rendering the machine unbootable. Since installing systemd, I've done this rather often having not had to do it in months and months with initscripts.

I'm reluctant to go back to initscripts but systemd doesn't seem to be terribly effective or stable on this hardware. (I don't mind going back to initscripts per se - just I figure I'll have to migrate soon in any case.) If anybody has any suggestions, I'd much appreciate hearing them. Even the ability to toggle the bluetooth hard blocking switch would improve things a little though I'd obviously prefer to get both bluetooth and rebooting working smoothly in the first place.  Does anybody know what the switch should do? Is there a command I can hook it up to with acpid, for example?

$ acpi_listen 
button/wlan WLAN 00000080 00000000 K

Here's a sample from messages.log | grep bluetooth:

Sep  3 00:03:27 localhost kernel: [   11.536853] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
Sep  3 00:03:28 localhost bluetoothd[413]: Starting SDP server
Sep  3 00:03:28 localhost bluetoothd[413]: bluetoothd[413]: Starting SDP server
Sep  3 00:03:28 localhost bluetoothd[413]: bluetoothd[413]: Bluetooth Management interface initialized
Sep  3 00:03:28 localhost bluetoothd[413]: Bluetooth Management interface initialized
Sep  3 00:03:29 localhost bluetoothd[413]: bluetoothd[413]: input-headset driver probe failed for device <id>
Sep  3 00:03:29 localhost bluetoothd[413]: Adapter /org/bluez/413/hci0 has been enabled
Sep  3 00:03:29 localhost bluetoothd[413]: bluetoothd[413]: Adapter /org/bluez/413/hci0 has been enabled
Sep  3 00:37:53 localhost bluetoothd[413]: bluetoothd[413]: Adapter /org/bluez/413/hci0 has been disabled
Sep  3 00:37:53 localhost bluetoothd[413]: bluetoothd[413]: Unregister path: /org/bluez/413/hci0
Sep  3 00:37:53 localhost bluetoothd[413]: Adapter /org/bluez/413/hci0 has been disabled
Sep  3 00:37:53 localhost bluetoothd[413]: Unregister path: /org/bluez/413/hci0
Sep  3 00:37:53 localhost systemd[1]: Service bluetooth.target is not needed anymore. Stopping.
Sep  3 00:37:53 localhost bluetoothd[413]: bluetoothd[413]: hci0: Set IO Capability (0x0018) failed: Invalid Index (0x11)
Sep  3 00:52:35 localhost kernel: [   11.392311] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is blocked

And:

$ grep blue /var/log/errors.log
Sep  2 04:01:03 localhost bluetoothd[422]: input-headset driver probe failed for device <id>
Sep  2 14:48:19 localhost bluetoothd[422]: input-headset driver probe failed for device <id>
Sep  2 14:48:35 localhost bluetoothd[422]: input-headset driver probe failed for device <id>
Sep  2 14:48:39 localhost bluetoothd[422]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
Sep  2 14:48:39 localhost bluetoothd[422]: hci0: Remove UUID (0x0011) failed: Invalid Parameters (0x0d)
Sep  3 00:03:29 localhost bluetoothd[413]: input-headset driver probe failed for device <id>
Sep  3 00:37:53 localhost bluetoothd[413]: hci0: Set IO Capability (0x0018) failed: Invalid Index (0x11)

Is /dev/hidraw0 connected with bluetooth or something else?

EDIT: Answered one question: /dev/hidraw0 is a mouse, apparently. Nothing to do with bluetooth. I've found suggestions for echo enable > /proc/acpi/ibm/bluetooth but that makes no difference for me. It still says the state is disabled (even though the commands listed are enable, disable which suggests it *should* work or at least complain informatively). Still no clue about how to get systemd to reboot, either...

Last edited by cfr (2012-09-04 21:24:27)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#159 2012-09-04 17:00:09

insane_alien
Member
Registered: 2007-11-19
Posts: 39

Re: Archlinux is moving to systemd

I am truly stunned by systemd i just switched recently and once I fixed a few mistakes (made by myself not following instructions correctly) my boot time went way down. A lot. It now takes my laptop 26 seconds to boot to desktop if I turn autologin on. thats down from a full minute. I have only two questions

1/ Where has systemd been all my life?
2/ How fast does it go with a SSD?

If this is the speed at introduction I can only imagine it gets faster once all the kinks are sorted out.

BTW, i've cold booted, logged in and typed this message before my brothers windows 7 laptop of identical spec has got to the login prompt big_smile I'm actually freaking excited by this. More of this please.

Offline

#160 2012-09-04 17:02:33

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Archlinux is moving to systemd

insane_alien wrote:

2/ How fast does it go with a SSD?

There is a separate thread with performance measurements. For me it boots in less than four seconds, but I have seen people with half that.

Offline

#161 2012-09-04 17:09:21

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: Archlinux is moving to systemd

insane_alien wrote:

2/ How fast does it go with a SSD?

Pissing contest tongue

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

@tomegun

Are there any other cool features -involving sysstemd- you devs are discussing or think about once arch completely migrates??

Offline

#162 2012-09-04 21:37:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Archlinux is moving to systemd

Apart from (a) bluetooth (b) rebooting, I'm also having (less serious) trouble with crond. I don't use sendmail so with initscripts, I told it to log to syslog-ng by using the following:

$ cat /etc/conf.d/crond
# Settings for the CRON daemon.
# CRONDARGS= :  any extra command-line startup arguments for crond
CRONDARGS="-s"

This worked reasonably well. It still complained but actual errors disappeared, leaving only vague grumblings in the form of warnings.

By default, this makes no difference to systemd's service so I created the following:

$ cat /etc/systemd/system/cronie.service 
[Unit]
Description=Periodic Command Scheduler

[Service]
EnvironmentFile=-/etc/conf.d/crond
ExecStart=/usr/sbin/crond -n $CRONDARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=always

[Install]
WantedBy=multi-user.target

I can tell it is using the correct file:

$ systemctl status cronie.service 
cronie.service - Periodic Command Scheduler
          Loaded: loaded (/etc/systemd/system/cronie.service; enabled)
          Active: active (running) since Mon, 03 Sep 2012 00:52:29 +0100; 1 day and 21h ago
        Main PID: 416 (crond)
          CGroup: name=systemd:/system/cronie.service
                  └ 416 /usr/sbin/crond -n -s

Indeed, crond is using the right options:

 416 ?        Ss     0:00 /usr/sbin/crond -n -s

Despite this, though, I'm getting errors like this in crond.log:

Sep  4 22:01:01 localhost /USR/SBIN/CROND[5112]: (root) CMD (run-parts /etc/cron.hourly)
Sep  4 22:01:02 localhost /USR/SBIN/CROND[5111]: (root) CMDOUT (:: Synchronising package databases...)
Sep  4 22:01:02 localhost /USR/SBIN/CROND[5111]: (root) CMDOUT (downloading core.db...)
Sep  4 22:01:02 localhost /USR/SBIN/CROND[5145]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory
Sep  4 22:01:03 localhost /USR/SBIN/CROND[5111]: (root) CMDOUT (downloading extra.db...)
Sep  4 22:01:06 localhost /USR/SBIN/CROND[5111]: (root) CMDOUT (downloading community.db...)
Sep  4 22:01:09 localhost /USR/SBIN/CROND[5111]: (root) CMDOUT ( multilib is up to date)
Sep  4 22:01:09 localhost /USR/SBIN/CROND[5111]: (root) MAIL (mailed 137 bytes of output but got status 0x0001
Sep  4 22:17:01 localhost /USR/SBIN/CROND[5891]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) CMDOUT (/etc/cron.hourly/20pacmandbcheck:)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5925]: (CRON) EXEC FAILED (/usr/sbin/sendmail): No such file or directory
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) CMDOUT (:: Synchronising package databases...)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) CMDOUT ( core is up to date)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) CMDOUT ( extra is up to date)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) CMDOUT ( community is up to date)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) CMDOUT ( multilib is up to date)
Sep  4 22:17:02 localhost /USR/SBIN/CROND[5890]: (root) MAIL (mailed 162 bytes of output but got status 0x0001

For jobs handled by anacron (e.g. cron.daily), I get slightly different errors:

Sep  4 03:34:01 localhost anacron[13267]: Job `cron.daily' started
Sep  4 03:34:49 localhost anacron[13267]: Job `cron.daily' terminated (mailing output)
Sep  4 03:34:49 localhost anacron[13267]: Can't find sendmail at /usr/sbin/sendmail, not mailing output
Sep  4 03:34:49 localhost anacron[13267]: Normal exit (1 job run)

However, it still seems to be trying to use sendmail rather than syslog.

Last edited by cfr (2012-09-04 21:38:05)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#163 2012-09-04 23:05:42

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 997
Website

Re: Archlinux is moving to systemd

brain0 wrote:

if you activate the LVM in the initramfs (which you don't want to unless you want to boot from it)

How exacly would I prevent LVM from detecting drives in the initramfs? I didn't setup anything, it tries to detect it automatically (and sometimes fails).

EDIT: turns out lvm2 was in hooks, I removed it, rebuilt with mkinitcpio and now it doesn't activate LVM in initramfs anymore.

Also, if I do somehow disable it, then lvm.service would be all I need?

brain0 wrote:

Never had it freeze, but it probably shouldn't.

Well, it does "freeze" (stall) if USB devices do not settle and logical volumes isn't activated. Boot stalls just after mounting /home, so I guess it tries to mount the LVM volume as defined in /etc/fstab, but it finds none and stalls.

Last edited by karabaja4 (2012-09-05 13:40:12)

Offline

#164 2012-09-06 10:01:03

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Archlinux is moving to systemd

karabaja4 wrote:

Also, if I do somehow disable it, then lvm.service would be all I need?

As I think I explained earlier, that might not work (again, because LVM is dumb about hotplugging)! If the USB device appears after udev has settled (which happens), then 'vgchange' is never called. You probably need a custom lvm service file that waits for your specific USB device to be safe (I posted an example in the post you referred to). This needs to be fixed in LVM/device-mapper at some point.

Offline

#165 2012-09-07 18:47:02

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Archlinux is moving to systemd

tomegun wrote:

Sorry, my bad. The dependencies are correct. upower still uses some stuff from pm-utils even with systemd installed. Hopefully this will change in the future so we can drop pm-utils.

I presume these are calls to pm-powersave (RunPowersaveCommand directive in UPower.conf). I am not aware of any manpage/doc except comments in the git repo, which explains what this option is doing. It is enabled (=true) by default and causes quite a bit of confusion among users, myself included (complaints like "powersavings in my rc.local are not respected after starting the desktop..."). In a nutshell when the above option is enabled, upower calls pm-powersave when powerstate changes (e.g. AC comes online)...

Since pm-utils is a mess with quite a few open bugs (even specific to archlinux and netcfg) and a dead ML, is it possible to disable the above directive by default and downgrade pm-utils to an optdep? I opened a corresponding  bug against upower long time ago, but noone seems to care, so I build upower locally.

AFAIU gnome/kde users won't suffer from this change as they have dedicated powermanager applets. Even xfce is OK if xfce4-power-manager is installed...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#166 2012-09-07 19:35:43

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: Archlinux is moving to systemd

Leonid.I wrote:
tomegun wrote:

Sorry, my bad. The dependencies are correct. upower still uses some stuff from pm-utils even with systemd installed. Hopefully this will change in the future so we can drop pm-utils.

I presume these are calls to pm-powersave (RunPowersaveCommand directive in UPower.conf). I am not aware of any manpage/doc except comments in the git repo, which explains what this option is doing. It is enabled (=true) by default and causes quite a bit of confusion among users, myself included (complaints like "powersavings in my rc.local are not respected after starting the desktop..."). In a nutshell when the above option is enabled, upower calls pm-powersave when powerstate changes (e.g. AC comes online)...

Since pm-utils is a mess with quite a few open bugs (even specific to archlinux and netcfg) and a dead ML, is it possible to disable the above directive by default and downgrade pm-utils to an optdep? I opened a corresponding  bug against upower long time ago, but noone seems to care, so I build upower locally.

AFAIU gnome/kde users won't suffer from this change as they have dedicated powermanager applets. Even xfce is OK if xfce4-power-manager is installed...

Is there any good alternatives to pm-utils or LMT for enabling certain power saving tweaks when on battery (and automatically disabling them on AC?) In the past I had run into issues with LMT/acpid so I switched to just using pm-utils scripts which has been working very well for me so far.

In any case I definitely support making pm-utils optional if at all possible. Right now the only thing I really use it for is the power saving stuff. systemctl suspend and systemctl hibernate are working wonderfully for me (I can't wait until the new upower hits the main repos). systemctl suspend brings the system down for suspend about twice as fast than pm-utils on my machine! In addition with pm-utils I need a big hacky bash script workaround for suspend to work properly, with systemd's suspend no workarounds needed (Still needed a small workaround for systemctl hibernate though, need to rmmod ehci_hcd before hibernating or else it doesn't power down all the way, which I was able to do with a very simple systemd-sleep hook).

Last edited by bwat47 (2012-09-07 19:41:26)

Offline

#167 2012-09-07 19:48:53

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Archlinux is moving to systemd

bwat47 wrote:

Is there any good alternatives to pm-utils or LMT for enabling certain power saving tweaks when on battery (and automatically disabling them on AC?) In the past I had run into issues with LMT/acpid so I switched to just using pm-utils scripts which has been working very well for me so far.

https://bbs.archlinux.org/viewtopic.php … 2#p1155492

In that topic I asked the same, albeit in a different way. I already linked you to the solution and Nierro and me added that bit to the Wiki here:

https://wiki.archlinux.org/index.php/La … _udev_rule


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#168 2012-09-08 01:29:34

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Archlinux is moving to systemd

Leonid. wrote:

IAFAIU gnome/kde users won't suffer from this change as they have dedicated powermanager applets. Even xfce is OK if xfce4-power-manager is installed...

I'm not so sure. I can't figure out what is going on on my machine now.

The only thing handling sleep on lid close when I'm using KDE that I'm aware of is KDE itself. Yet the pm-suspend scripts are still being triggered.

Things which should not be handling it: acpid, systemd. (Systemd should handle it for tty-session only.)

pm-powersave also runs but does nothing because all the scripts are masked under /etc/pm/power.d. LMT handles this.

I currently have no idea what makes the sleep button work. It used to be acpid but with systemd, it seems to work even though neither acpid nor systemd is configured to handle it. (And if acpid is so configured, it sleeps twice.) KDE doesn't have an option to handle this.

I'm wondering what KDE does under the hood to sleep the system on lid close (and whether it has for some reason decided to handle the sleep button or is systemd just ignoring my config?). I'm wondering if KDE is somehow using the pm- scripts...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#169 2012-09-08 02:13:55

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: Archlinux is moving to systemd

Unia wrote:
bwat47 wrote:

Is there any good alternatives to pm-utils or LMT for enabling certain power saving tweaks when on battery (and automatically disabling them on AC?) In the past I had run into issues with LMT/acpid so I switched to just using pm-utils scripts which has been working very well for me so far.

https://bbs.archlinux.org/viewtopic.php … 2#p1155492

In that topic I asked the same, albeit in a different way. I already linked you to the solution and Nierro and me added that bit to the Wiki here:

https://wiki.archlinux.org/index.php/La … _udev_rule


Thanks, that looks like a great (and simple solution). If the pm-utils dependency can ever be dropped from upower I'd be all set to get rid of it completely smile

Offline

#170 2012-09-08 04:47:00

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: Archlinux is moving to systemd

Leonid.I wrote:
tomegun wrote:

Sorry, my bad. The dependencies are correct. upower still uses some stuff from pm-utils even with systemd installed. Hopefully this will change in the future so we can drop pm-utils.

I presume these are calls to pm-powersave (RunPowersaveCommand directive in UPower.conf). I am not aware of any manpage/doc except comments in the git repo, which explains what this option is doing. It is enabled (=true) by default and causes quite a bit of confusion among users, myself included (complaints like "powersavings in my rc.local are not respected after starting the desktop..."). In a nutshell when the above option is enabled, upower calls pm-powersave when powerstate changes (e.g. AC comes online)...

Since pm-utils is a mess with quite a few open bugs (even specific to archlinux and netcfg) and a dead ML, is it possible to disable the above directive by default and downgrade pm-utils to an optdep? I opened a corresponding  bug against upower long time ago, but noone seems to care, so I build upower locally.

AFAIU gnome/kde users won't suffer from this change as they have dedicated powermanager applets. Even xfce is OK if xfce4-power-manager is installed...

I tested this on systemd/gnome. I installed the new upower, rebooted, and verified that suspend was working. Next pacman -Rdd pm-utils. After doing that, even with the new upower suspend stopped working in gnome. suspend option gone from the status menu, and closing lid caused screen to go black (but machine still on) necessitating a hard reset.

EDIT: upower definitely still seems to depend on pm-utils for more than just pm-powersave. I went into Upower.conf and disabled RunPowersaveCommand, which successfully stops the pm-utils power saving scripts from running.

But when it comes to suspending:

1. Manually Suspending directly with dbus/upower with pm-utils *not* installed:

[brandon@brandon-arch ~]$ dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Error org.freedesktop.UPower.GeneralError: No kernel support

2. using same command as above with pm-utils installed: Successful suspend.

And the new upower definitely seems to be using systemd to suspend, I can see it in my systemctl logs, so I have no idea why the heck its needing pm-utils hmm

Sep 08 01:27:40 brandon-arch systemd-sleep[763]: /usr/lib/systemd/system-sle....
Sep 08 01:27:40 brandon-arch systemd-sleep[763]: Suspending system...
Sep 08 01:27:50 brandon-arch systemd-sleep[763]: System resumed.
[brandon@brandon-arch ~]$

Last edited by bwat47 (2012-09-08 05:33:51)

Offline

#171 2012-09-08 10:56:41

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Archlinux is moving to systemd

I had no need for upower other than to call pm-powersave, so once I got my udev rules in place I removed pm-utils and upower.

Suspend/hibernate still works for me. (edit: dare I say, even more robust than with using pm-utils)

Last edited by Unia (2012-09-08 10:57:00)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#172 2012-09-08 14:02:03

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: Archlinux is moving to systemd

After reading this: http://www.monperrus.net/martin/trouble … references

i'm thinking upower still uses the pm-utils "pm-is-supported" function to determine if the machine supports suspend to ram, so if pm-utils is not present it just gives you an error saying it is not supported

Offline

#173 2012-09-09 15:46:35

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: Archlinux is moving to systemd

great.  added init=/bin/systemd to my boot args.
with this rc.conf:

[root@dieter-t420s ~]# cat /etc/rc.conf 
#
# /etc/rc.conf - configuration file for initscripts
#
# Most of rc.conf has been replaced by various other configuration
# files. See archlinux(7) for details.
#
# For more details on rc.conf see rc.conf(5).
#

DAEMONS=(syslog-ng dbus @networkmanager @crond @openntpd @sshd @vboxdrv @thinkfan @sensors)

# Storage
#
# USEDMRAID="no"
# USELVM="no"
#
# Network
#
interface=eth0
# address=
# netmask=
# gateway=

systemd seems to just hang after systemd-fsck

Last edited by Dieter@be (2012-09-09 15:46:50)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#174 2012-09-09 16:24:29

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Archlinux is moving to systemd

Dieter@be wrote:

great.  added init=/bin/systemd to my boot args.

systemd seems to just hang after systemd-fsck

Recommended procedure is to open a new thread in Arch Discussion (just use "this sucks eggs" or "i hate you" as a title), and scream that you're leaving Arch. You get bonus points for incorporating the words "Allan" (5 points), "Poettering" (30 points) and "Trichotillomania" (50 points).

smile


ᶘ ᵒᴥᵒᶅ

Offline

#175 2012-09-09 18:04:15

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: Archlinux is moving to systemd

@Dieter@be,
How long did you wait? If systemd has trouble mounting anything it thinks should be there, it takes quite a while to time out and carry on. The docs say to wait at least 5 minutes.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB