[systemd-devel] systemd prevents pulseaudio from shutting down

2012-06-03 Thread Robert Buhren

Hello,


i'm using "ecryptfs" to encrypt my home directory and "pam_mount" to 
have it automatically
mounted/unmounted at login/logout. The unmounting never worked and i 
discoverd that a pulseaudio process of my user was keept running 
although my user was already logged out. This process had some files 
opened  in "~./pulse" which is why i think my home dir is not unmounted.
The only client that was accessing my pulseaudio process was the module 
systemd-login.c


[pulseaudio] main.c: 1 client(s) logged in.
[pulseaudio] main.c: index: 0
[pulseaudio] main.c: driver: 
[pulseaudio] main.c: owner module: 19
[pulseaudio] main.c: properties:
[pulseaudio] main.c: application.name = "Login Session 2"
[pulseaudio] main.c: systemd-login.session = "2"

I already tried using "KillUserProcesses=yes" in "logind.conf",to to 
have systemd kill all user process on logout, but it didn't help.


So is it true that systemd keeps my pusleaudio alive? If so how can i 
avoid that? And is this behavior intended?


Thanks in advance,

Robert

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd prevents pulseaudio from shutting down

2012-06-03 Thread Paul Menzel
Dear Robert,


Am Sonntag, den 03.06.2012, 11:35 +0200 schrieb Robert Buhren:

> i'm using "ecryptfs" to encrypt my home directory and "pam_mount" to 
> have it automatically
> mounted/unmounted at login/logout. The unmounting never worked and i 
> discoverd that a pulseaudio process of my user was keept running 
> although my user was already logged out. This process had some files 
> opened  in "~./pulse" which is why i think my home dir is not unmounted.
> The only client that was accessing my pulseaudio process was the module 
> systemd-login.c
> 
> [pulseaudio] main.c: 1 client(s) logged in.
> [pulseaudio] main.c: index: 0
> [pulseaudio] main.c: driver: 
> [pulseaudio] main.c: owner module: 19
> [pulseaudio] main.c: properties:
> [pulseaudio] main.c: application.name = "Login Session 2"
> [pulseaudio] main.c: systemd-login.session = "2"
> 
> I already tried using "KillUserProcesses=yes" in "logind.conf",to to 
> have systemd kill all user process on logout, but it didn't help.
> 
> So is it true that systemd keeps my pusleaudio alive? If so how can i 
> avoid that? And is this behavior intended?

I will not be able to help you, but you can give more information. What
distribution do you use? What version of Linux, PulseAudio, systemd?
Maybe even attach the PulseAudio’s unit file for reference.


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd prevents pulseaudio from shutting down

2012-06-03 Thread Reindl Harald


Am 03.06.2012 18:46, schrieb Paul Menzel:
>> i'm using "ecryptfs" to encrypt my home directory and "pam_mount" to 
>> have it automatically
>> mounted/unmounted at login/logout. The unmounting never worked and i 
>> discoverd that a pulseaudio process of my user was keept running 
>> although my user was already logged out. This process had some files 
>> opened  in "~./pulse" which is why i think my home dir is not unmounted.
> 
> I will not be able to help you, but you can give more information. What
> distribution do you use? What version of Linux, PulseAudio, systemd?
> Maybe even attach the PulseAudio’s unit file for reference.

pulseaudio process is not stopped on Fdora 15/16 as example after logout

i generally hate the idea of  sound.daemon depeding on user-sessions
because it prevents things like mpd from running completly in
background and if i hear music on my desktop and switch with CTRL+F2
to a terminal it is simply idiotic that music stops to play



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] using native *.mount units instead of /etc/fstab - unpredictable state in case of many disks

2012-06-03 Thread Peter Lemenkov
Hello.
I've hit by a strange issue on a machine with 8 hard disks. if I list
them all in /etc/fstab they mounts fine. If I provide native *.mount
files then almost every reboot one or several disks failed to mount
(with 32 error, e.g. "code=exited, status=32", which means that no
hadrwae is available at the moment of mount attempt, wrong fs, etc).
If I login and run "systemctl restart media-mypathX.mount" it mounts
just fine. Here is how these *.mount files looks like (no RAID, no
LVM, etc - just plain alone single-partitioned hard disk):

===

[Unit]
Description=Random Stuff Directory
#After=media.mount systemd-udev-settle.service dev-disk-by\x2dlabel-heap.device
After=media.mount
Before=nfs-server.service

[Mount]
#What=LABEL="heap"
What=/dev/disk/by-label/heap
Where=/media/heap
Type=xfs
Options=defaults,noatime,nodiratime

===

You can see - I tried to start it after systemd-udev service as well
as after appropriate *.device but w/o success. Also I tried to mount
using labels and using corresponding paths. No success either.

Could someone point me out what did I miss? I'm sure there is some
specific *.service or *.target file I must add it as a dependency.
Fedora 18 if it matters.

-- 
With best regards, Peter Lemenkov.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd prevents pulseaudio from shutting down

2012-06-03 Thread Robert Buhren

On 03.06.2012 18:46, Paul Menzel wrote:

Dear Robert,


Am Sonntag, den 03.06.2012, 11:35 +0200 schrieb Robert Buhren:


i'm using "ecryptfs" to encrypt my home directory and "pam_mount" to
have it automatically
mounted/unmounted at login/logout. The unmounting never worked and i
discoverd that a pulseaudio process of my user was keept running
although my user was already logged out. This process had some files
opened  in "~./pulse" which is why i think my home dir is not unmounted.
The only client that was accessing my pulseaudio process was the module
systemd-login.c

[pulseaudio] main.c: 1 client(s) logged in.
[pulseaudio] main.c: index: 0
[pulseaudio] main.c: driver:
[pulseaudio] main.c: owner module: 19
[pulseaudio] main.c: properties:
[pulseaudio] main.c: application.name = "Login Session 2"
[pulseaudio] main.c: systemd-login.session = "2"

I already tried using "KillUserProcesses=yes" in "logind.conf",to to
have systemd kill all user process on logout, but it didn't help.

So is it true that systemd keeps my pusleaudio alive? If so how can i
avoid that? And is this behavior intended?

I will not be able to help you, but you can give more information. What
distribution do you use? What version of Linux, PulseAudio, systemd?
Maybe even attach the PulseAudio’s unit file for reference.


Thanks,

Paul


Dear Paul,

i'm using archlinux with gnome3.4. Pulseaudio 2.0, systemd 184, and 
Linux 3.4.

Pulseaudio has no unitfile, as it is started by gnome itself.

Regards,

Robert





___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] using native *.mount units instead of /etc/fstab - unpredictable state in case of many disks

2012-06-03 Thread Tom Gundersen
On Sun, Jun 3, 2012 at 8:18 PM, Peter Lemenkov  wrote:
> Could someone point me out what did I miss? I'm sure there is some
> specific *.service or *.target file I must add it as a dependency.
> Fedora 18 if it matters.

I'd try "systemctl show .mount" when it is based on fstab,
and when it is a mount unit, and compare the two. It will probably
tell you what you are missing.

-t
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] using native *.mount units instead of /etc/fstab - unpredictable state in case of many disks

2012-06-03 Thread Kay Sievers
On Sun, Jun 3, 2012 at 8:18 PM, Peter Lemenkov  wrote:
> I've hit by a strange issue on a machine with 8 hard disks. if I list
> them all in /etc/fstab they mounts fine. If I provide native *.mount
> files then almost every reboot one or several disks failed to mount
> (with 32 error, e.g. "code=exited, status=32", which means that no
> hadrwae is available at the moment of mount attempt, wrong fs, etc).

> [Unit]
> Description=Random Stuff Directory
> #After=media.mount systemd-udev-settle.service 
> dev-disk-by\x2dlabel-heap.device
>
> After=media.mount
> Before=nfs-server.service
>
> [Mount]
> #What=LABEL="heap"
> What=/dev/disk/by-label/heap
> Where=/media/heap
> Type=xfs
> Options=defaults,noatime,nodiratime
>
> ===
>
> You can see - I tried to start it after systemd-udev service as well
> as after appropriate *.device but w/o success. Also I tried to mount
> using labels and using corresponding paths. No success either.

The unit media.mount does not exist anymore in the recent system version.

After=*.device would only work if the device is already there, and can
be included in the transaction, but then the After= should have no
effect.

> Could someone point me out what did I miss? I'm sure there is some
> specific *.service or *.target file I must add it as a dependency.
> Fedora 18 if it matters.

Maybe this works:
  After=local-fs-pre.target
and hook it into
  /usr/lib/systemd/system/local-fs.target.wants

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd prevents pulseaudio from shutting down

2012-06-03 Thread Reindl Harald


Am 03.06.2012 20:22, schrieb Robert Buhren:
> i'm using archlinux with gnome3.4. Pulseaudio 2.0, systemd 184, and Linux 3.4.
> Pulseaudio has no unitfile, as it is started by gnome itself.

however

the question remains: why is pulseaudio still running after logout



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Automount units: intermittent failure when the real mount triggers another mount first

2012-06-03 Thread Malte Starostik
Hi,

I stumbled accross this issue when trying to get this construct working:

mnt-portage.automount is an enabled unit
mnt-portage.mount mounts an nfs4 export and depends, via Requires=, and After= 
on some other units that in turn depend on var-lib-nfs-rpc_pipefs.mount

The result is that the very first access to /mnt/portage fails with -ENODEV 
while any subsequent access works just fine and all units in the whole 
dependency chain have been started successfully.

To get any weird NFS-interaction out of the way, I reduced the whole thing to 
a minimal testcase:

= tmp-test.automout, enable this one
[Unit]
Description=automount test automount point
After=local-fs.target

[Automount]
Where=/tmp/test

[Install]
WantedBy=multi-user.target

= tmp-test.mount
[Unit]
Description=automount test mount point
Requires=tmp-dummy.mount
After=tmp-dummy.mount

[Mount]
What=/
Where=/tmp/test
Options=bind

= tmp-dummy.mount
[Unit]
Description=automount test secondary mount point

[Mount]
What=none
Where=/tmp/dummy
Type=tmpfs


First access to /tmp/test results in "no such device", next access will 
succeed.  To test things further, I changed tmp-test.mount to Requires=, 
After= tmp-dummy.service instead of tmp-dummy.mount:

= tmp-dummy.service
[Unit]
Description=automount test secondary mount point as a service

[Service]
Type=oneshot
RemainAfterExit=true
ExecStartPre=/bin/mkdir -p /tmp/dummy
ExecStart=/bin/mount -t tmpfs none /tmp/dummy
ExecStop=/bin/umount /tmp/dummy

This has the same effect.
The correspondin log entry:

Jun 03 21:26:30 test systemd[1]: Sending failure: No such device

This comes from here:

#0  mount_notify_automount (m=0x1076a90, status=-19) at src/core/mount.c:616
#1  0x00422133 in mount_set_state (m=0x1076a90, state=MOUNT_DEAD) at 
src/core/mount.c:659
#2  0x00424f05 in mount_fd_event (m=0x10413d0, events=10) at 
src/core/mount.c:1613
#3  0x00410a80 in process_event (ev=0x7fffa4d2ba10, m=0x10413d0) at 
src/core/manager.c:1392
#4  manager_loop (m=0x10413d0) at src/core/manager.c:1497
#5  0x0040b2f3 in main (argc=1, argv=0x7fffa4d2c238) at 
src/core/main.c:1619

The BP on mount.c:616 is hit like this six times in a row.

Misc info:
Distro: Gentoo
Kernel: 3.4.0
systemd: 7ff5404be1bad93cb8facbcae0bc78f77f9e067d

Dunno if this is Gentoo-specific or triggered by some broken kernel 
configuration I used, but I'll gladly help figure this out if maybe someone 
could push me into the right direction.

Thanks,
Malte
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Punt duplicate definition of InhibitWhat

2012-06-03 Thread Malte Starostik
From: Malte Starostik 

Trivial fix for:

src/login/logind-inhibit.h:37:3: error: redefinition of typedef
'InhibitWhat'
src/login/logind-inhibit.h:26:26: note: previous declaration of
'InhibitWhat' was here

Signed-off-by: Malte Starostik 
---
 src/login/logind-inhibit.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/login/logind-inhibit.h b/src/login/logind-inhibit.h
index 4377f00..e72536f 100644
--- a/src/login/logind-inhibit.h
+++ b/src/login/logind-inhibit.h
@@ -23,7 +23,6 @@
 ***/
 
 typedef struct Inhibitor Inhibitor;
-typedef enum InhibitWhat InhibitWhat;
 
 #include "list.h"
 #include "util.h"
-- 
1.7.3.4

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Add "set-default-target" to systemctl

2012-06-03 Thread Colin Guthrie
'Twas brillig, and har...@redhat.com at 23/04/12 08:23 did gyre and gimble:
> From: Harald Hoyer 

Ping! any comments on this one? I'd personally like to see it in if
there are no objections.

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd prevents pulseaudio from shutting down

2012-06-03 Thread Colin Guthrie
'Twas brillig, and Reindl Harald at 03/06/12 20:08 did gyre and gimble:
> 
> 
> Am 03.06.2012 20:22, schrieb Robert Buhren:
>> i'm using archlinux with gnome3.4. Pulseaudio 2.0, systemd 184, and Linux 
>> 3.4.
>> Pulseaudio has no unitfile, as it is started by gnome itself.
> 
> however
> 
> the question remains: why is pulseaudio still running after logout

That's the intended behaviour. PulseAudio will spawn itself
automatically when needed and shut itself down when it's not needed any
more, after a suitable timeout (defaults to 20).

As startup is quite intensive (it requires a lot of probing of the
hardware to see what modes it uses) we take two general precautions to
avoid excessive restarts:

 1) We implement an "exit-idle-time". Simply set this to 0 if you want
PA to exit by itself immediately after it becomes unused (man
pulse-daemon.conf)

 2) When logging into an X11 session, we load a special X11 module that
ensures that PA is not exited until the X11 session is finished.


So in this setup you have two main options to get the results you want.
The first is to simply set the exit-idle-time=0 in daemon.conf. This
should make PA behave generally a bit more gracefully, but does nothing
to help any other apps that may behave in a similar way.

The second option (and IMO the better one) is to configure pam_systemd
to kill the processes of the user session when it's done. This should be
a matter of setting the kill-session-processes= (and optionally the
kill-only-users=) options in your pam configuration. See man pam_systemd.

HTHs

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Path to a mount point that begins with causes problems

2012-06-03 Thread Dave Reisner
On Thu, May 31, 2012 at 02:14:14PM +0200, Peter Lindgren wrote:
> Hi,
> 
> I'm using systemd-44 and experiencing some problems with my mount unit.
> 
> I have an /etc/systemd/system/.aufs-normal.mount file
> -
> [Unit]
> Description=normal mount
> 
> [Mount]
> What=/dev/mmcblk0p5
> Where=/.aufs/normal
> Type=ext2
> -
> 
> I am able to run 'systemctl start .aufs-normal.mount' and 'systemctl stop
> .aufs-normal.mount' to mount/unmount /dev/mmcblk0p5 correctly.
> 
> I then have created an /etc/systemd/system/dummy.service file
> --
> [Unit]
> Description=Dummy service
> Requires=.aufs-normal.mount
> After=.aufs-normal.mount
> 
> [Service]
> ExecStart=/bin/dummy
> Type=oneshot
> RemainAfterExit=yes
> -
> 
> When I then run 'systemctl start dummy.service' systemd refuse to mount my
> .aufs/normal directory.
> 
> If I rename the '.aufs' directory to 'aufs' in the example above it works 
> fine.
> I have tried to escape the  without any success.
> 
> Any ideas what's causing this?
> 
> Thanks,
> Peter
> 

This is present in 184 as well since fstab is just a source for more
units. Best I can tell, unit files with a leading '.' are simply
ignored.

d
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel