[Bug 1325309] Re: User can't suspend laptop/control wireless via dbus/systemd-logind if cgroups are disabled in kernel
Martin Pitt
martin.pitt at ubuntu.com
Sun Jun 1 09:59:12 UTC 2014
I'm afraid logind does require cgroups to be available. The init script
reflects that, as without the cgroup mount logind wouldn't work. You
already noticed the failure to suspend etc., but I'm quite surprised
that you get a desktop session at all. I expect that dynamic ACLs to
devices (sound, USB, etc.) are also not working.
So I recommend enabling cgroups in your custom kernels. This should
hardly have any power usage effect?
** Changed in: systemd (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1325309
Title:
User can't suspend laptop/control wireless via dbus/systemd-logind if
cgroups are disabled in kernel
Status in “systemd” package in Ubuntu:
Invalid
Bug description:
This is kind of a long chain, but I think this is where it ends.
I custom compile my kernel for battery savings, as I spend lots of time flying. I recently went back to BFS in 3.14 as my scheduler, but immediately ran into lots of problems (it used to give me 15 more minutes on average). The most interesting, that I can't work around is this:
I disable cgroups because BFS doesn't use them at all. and when I did, even with the ubuntu linux-source package, I suddenly couldn't put my laptop to sleep, and I couldn't control my network connections anymore. Investigating lead me to discover that "start systemd-logind" was failing.
So, here's my relevant config:
rob at kubuntu4:~$ grep CGROUP /boot/config-`uname -r`; sudo start systemd-logind; dmesg |tail -1; ls /sys/fs/cgroup
# CONFIG_CGROUPS is not set
start: Job failed to start
[ 1450.848491] init: systemd-logind pre-start process (10865) terminated with status 32
ls: cannot access /sys/fs/cgroup: No such file or directory
the /sys/fs/cgroup folder doesn't exist because CONFIG_CGROUPS isn't
set in the kernel. So what is "status 32" from the pre-script for
systemd-logind ?
the problem seems to be in the mount statements in the systemd-logind
prestart script:
grep mount /etc/init/systemd-logind.conf
# this is being done by systemd or mountall usually, but not during
if ! mountpoint -q /sys/fs/cgroup; then
mount -t tmpfs -o uid=0,gid=0,mode=0755,size=1024 none /sys/fs/cgroup
# mounting the cgroup does not work in LXC, there it uses cgmanager
if [ ! -e /run/container_type ] && ! mountpoint -q /sys/fs/cgroup/systemd; then
mount -t cgroup -o nosuid,noexec,nodev,none,name=systemd systemd /sys/fs/cgroup/systemd
Testing:
sudo mount -t tmpfs -o uid=0,gid=0,mode=0755,size=1024 none /sys/fs/cgroup; echo $?
[sudo] password for rob:
mount: mount point /sys/fs/cgroup does not exist
32
Rebooting into the stock ubuntu kernel, and I can put my laptop to
sleep again, albeit at the cost of a bunch of battery life.
I don't understand why cgroups are required for dbus and PolicyKit to
be able to allow me to put my laptop to sleep, so I'm filing this as a
bug. the systemd pre-script doesn't bother to check if the
/sys/fs/cgroup folder even exists, so there's definitely a "defensive
programming" bug in systemd not handling this situation better.
currently "sudo pm_suspend" is an easy workaround for the sleep issue,
but my wireless access issue has no workaround.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1325309/+subscriptions
More information about the foundations-bugs
mailing list