[systemd-devel] Controlling user processes with systemd+cgroups

2015-09-03 Thread Benjamin Rose

Hello all,

I am in an academic environment here, and lots of poor code gets written 
and then run. Memory leaks are a constant problem. So with RHEL6, I used 
cgconfig and cgred to create 3 cgroups partitions:


/students: 80 CPU ticks, 80% of available memory total
/staff: 10 CPU ticks
/system: 10 CPU ticks

Everyone in groups "grad", "ugrad", "visitor", etc all got put into 
/students. Anyone in @staff got put into the staff cgroup, and all the 
rest went into /system.


The main goal was that no single user can hog all of the memory and kill 
off system/sysadmin processes. I believe I have achieved this with systemd:


[root@example ~]# cat 
/etc/systemd/system/system.slice.d/systemcpureserve.conf

[Slice]
CPUShares=10
[root@example ~]# cat /etc/systemd/system/user.slice.d/limitusers.conf
[Slice]
CPUShares=80
MemoryLimit=14G

But the other benefit that my cgred setup had was that no single user 
could also use more than 50% of the available memory, so that one user 
was less likely to kill other people's processes if the OOM was invoked. 
This is in addition to the group constraint. Said another way - I don't 
want one bad apple user in user.slice to be able to kill off every other 
process in user.slice. I also want anyone in the group @staff to be 
exempt from these memory limits, like in my setup for 6. It was nice to 
be able to SSH in to an otherwise overloaded machine as myself and see 
what was going on. In this solution above, root is put into user.slice 
and is bound by the same resource limits as the students.


As far as I can tell, systemd-logind when included through PAM, only 
makes a cgroup like "user-" under the user slice. But I am looking 
to make this based not only on user ID, but also group ID. Is there any 
way to achieve all of this within systemd? I guess there is an option of 
doing something like this:


[root@prometheus system]# cat /etc/systemd/system/user-0.slice
[Slice]
CPUShares=10
MemoryLimit=16G

But I'm not even sure that would work (since user.slice limit is only 
14G), let alone that I would need to create one of them for every UID of 
every sysadmin on our network? And still, how to make sure that each 
person can never use more than 50% of total system memory, while still 
reserving 10%-20% of the overall resources for system/sysadmin functions.


Any help would be appreciated!

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


Re: [systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Lennart Poettering
On Thu, 03.09.15 20:08, Eliezer Croitoru (elie...@ngtech.co.il) wrote:

> I noticed it doesn't work.
> And well since I am building an RPM the only option I can think of is either
> use a custom startup script which will set the limits manually or define the
> service as a config file in the RPM.

Why that? Just set the default LimitNOFILE= in the unit file, and then
let the admin override it using the normal ways to override unit
files, either by adding drop-in .d/ files in /etc/systemd/system/ for
it, or by copying the unit file from /usr/lib/systemd/system/ to
/etc/systemd/system and editing it there. (Which is pretty much what
"systemctl edit" makes easy to do)

> Maybe you have some experience with overwriting the service files with RPMS,
> maybe there is some kind of practice use for this?

No. Unit files shipped in /usr/lib are not to be modified. People
should either override or extend them in /etc. And that's the same for
all unit files.

> The main issue is that if I hardcode it in the service file the RPM will
> replace it each and every time.
> If I will use it as a config file it will stay the same and it might be the
> better solution.
> Seeking after thought and ideas on the best way to implement it.

.d/ drop-ins are not overwritten like this...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Tomasz Torcz
On Thu, Sep 03, 2015 at 08:08:13PM +0300, Eliezer Croitoru wrote:
> I noticed it doesn't work.
> And well since I am building an RPM the only option I can think of is either
> use a custom startup script which will set the limits manually or define the
> service as a config file in the RPM.
> 
> Maybe you have some experience with overwriting the service files with RPMS,
> maybe there is some kind of practice use for this?
> 
> The main issue is that if I hardcode it in the service file the RPM will
> replace it each and every time.
> If I will use it as a config file it will stay the same and it might be the
> better solution.
> Seeking after thought and ideas on the best way to implement it.

  systemd come with quite cool system of unit precedence and is very
customisation-friendly for admin.  Just ship your unit in 
/usr/lib/systemd/system/
directory with default value of LimitNOFILE=.  If administrators want to
override, he will create dropin 
/etc/systemd/system/squid.service.d/10-limits.conf
with

–––
[Service]
LimitNOFILE=newvalue
–––

  and it will work fine during the upgrades.


-- 
Tomasz Torcz  ,,If you try to upissue this patchset I shall be 
seeking
xmpp: zdzich...@chrome.pl   an IP-routable hand grenade.'' -- Andrew Morton 
(LKML)

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


Re: [systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Reindl Harald



Am 03.09.2015 um 19:08 schrieb Eliezer Croitoru:

I noticed it doesn't work.
And well since I am building an RPM the only option I can think of is
either use a custom startup script which will set the limits manually or
define the service as a config file in the RPM.

Maybe you have some experience with overwriting the service files with
RPMS, maybe there is some kind of practice use for this?

The main issue is that if I hardcode it in the service file the RPM will
replace it each and every time.
If I will use it as a config file it will stay the same and it might be
the better solution.
Seeking after thought and ideas on the best way to implement it.


RPM packages are suppused to ship systemdunits below 
/usr/lib/systemd/system and custom overrides are supposed to copy the 
unit to /etc/systemd/system/ with the same name



On 03/09/2015 18:35, Lennart Poettering wrote:

On Thu, 03.09.15 17:45, Eliezer Croitoru (elie...@ngtech.co.il) wrote:


Hey,

I am working on a service for squid caching service.
I have a need to define LimitNOFILE from an environmental variable
instead
of only the service file.


No this does not work. Environment expansion is only done for
ExecStart= and related lines, and the environment is only determined
right when the binary is invoked.

Generally: configuration for units is supposed to be placed in units,
Splitting that into environment files such as /etc/sysconfig/* makes
things both more opaque for the admin and harder to process from
applications reading unit files. Hence, your usecase is explicitly
something we don't recommend.




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


Re: [systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Eliezer Croitoru

I noticed it doesn't work.
And well since I am building an RPM the only option I can think of is 
either use a custom startup script which will set the limits manually or 
define the service as a config file in the RPM.


Maybe you have some experience with overwriting the service files with 
RPMS, maybe there is some kind of practice use for this?


The main issue is that if I hardcode it in the service file the RPM will 
replace it each and every time.
If I will use it as a config file it will stay the same and it might be 
the better solution.

Seeking after thought and ideas on the best way to implement it.

Eliezer

On 03/09/2015 18:35, Lennart Poettering wrote:

On Thu, 03.09.15 17:45, Eliezer Croitoru (elie...@ngtech.co.il) wrote:


Hey,

I am working on a service for squid caching service.
I have a need to define LimitNOFILE from an environmental variable instead
of only the service file.


No this does not work. Environment expansion is only done for
ExecStart= and related lines, and the environment is only determined
right when the binary is invoked.

Generally: configuration for units is supposed to be placed in units,
Splitting that into environment files such as /etc/sysconfig/* makes
things both more opaque for the admin and harder to process from
applications reading unit files. Hence, your usecase is explicitly
something we don't recommend.

Lennart



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


Re: [systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Lennart Poettering
On Thu, 03.09.15 17:45, Eliezer Croitoru (elie...@ngtech.co.il) wrote:

> Hey,
> 
> I am working on a service for squid caching service.
> I have a need to define LimitNOFILE from an environmental variable instead
> of only the service file.

No this does not work. Environment expansion is only done for
ExecStart= and related lines, and the environment is only determined
right when the binary is invoked.

Generally: configuration for units is supposed to be placed in units,
Splitting that into environment files such as /etc/sysconfig/* makes
things both more opaque for the admin and harder to process from
applications reading unit files. Hence, your usecase is explicitly
something we don't recommend.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Reindl Harald



Am 03.09.2015 um 16:45 schrieb Eliezer Croitoru:

I am working on a service for squid caching service.
I have a need to define LimitNOFILE from an environmental variable
instead of only the service file.
The service unit I am using is:


i guess it works the same way as for ExecStart params

EnvironmentFile=-/etc/sysconfig/httpd
Environment="PATH=/usr/bin:/usr/sbin"
ExecStart=/usr/sbin/httpd $OPTIONS -D FOREGROUND

[root@rh:~]$ cat /etc/sysconfig/httpd
# Configuration file for the httpd service.
OPTIONS="-D workstation"
STOP_TIMEOUT=5
OPENSSL_NO_DEFAULT_ZLIB=1
LANG=C

[root@rh:~]$ ps aux | grep httpd
root  5079  0.0  0.3 409796 52552 ?Ss   09:48   0:01 
/usr/sbin/httpd -D workstation -D FOREGROUND



[Unit]
Description=Squid Web Proxy Server
Documentation=man:squid(8)
After=network.target

[Service]
EnvironmentFile=-/etc/sysconfig/squid
Type=forking
LimitNOFILE=16384
PIDFile=/var/run/squid.pid
ExecStartPre=/usr/bin/mkdir -p /var/run/squid
ExecStartPre=/usr/bin/chown squid.squid /var/run/squid
ExecStart=/usr/sbin/squid -sYC
ExecReload=/usr/sbin/squid -kreconf
ExecStop=/usr/sbin/squidshut.sh
TimeoutStopSec=36
KillMode=none

[Install]
WantedBy=multi-user.target
##END

I have tried couple things and I think I am in the wrong way.
Maybe there is some include file I can use as configurable else then
EnvironmentFile to just contain the LimitNOFILE variable?




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


Re: [systemd-devel] Multi seats setup How-to

2015-09-03 Thread arnaud gaboury
On Thu, Sep 3, 2015, 3:46 PM Floris  wrote:

>
> I was missing one piece of the puzzle. My USB dock station is
> Plugable® UD-3900 USB 3.0
>
> 
> 1-
> I had to install the kernel driver for it, following instructions per
> this displaylink forum[0]. Once the .rpm package installed, I could
> verify:
> $ lsmod | grep evdi
>
> evdi   36864  0
> drm_kms_helper122880  2 evdi,nouveau
> drm   331776  10 ttm,evdi,drm_kms_helper,nouveau
>
>
> # ll /lib/modules/$(uname -r)/extra/evdi.ko
> -rw-r--r--. 1 root root 63072  3 sept. 14:29
> /lib/modules/4.1.6-200.fc22.x86_64/extra/evdi.ko
>
> 
> 2-
> Now $ loginctl seat-status seat0 returns something more interesting:
>
>   ├─/sys/devices/platform/evdi.0/drm/card1
>   │ drm:card1
>
> So I guess now I have indeed two cards.
>

Lets make things clear. The usb dock will be your second seat. I think
the next steps will be enough:

loginctl attach seat1 /sys/devices/platform/evdi.0/drm/card1
loginctl attach seat1 /the path to the usb3 hub

everything you didn't attach with loginctl or with an udev rule will
be part of seat0. So if your nvidia card is for seat0 you don't have
to write a rule for it.

Ok. So it would be indeed much simpler than first thought.

Will try this later when I will get hand on the Fedora box.
Thank you so much for your clarifications.

success,

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


[systemd-devel] I want to use an environmental variable for LimitNOFILE= in a service unit. Is it possible?

2015-09-03 Thread Eliezer Croitoru

Hey,

I am working on a service for squid caching service.
I have a need to define LimitNOFILE from an environmental variable 
instead of only the service file.

The service unit I am using is:
##START
[Unit]
Description=Squid Web Proxy Server
Documentation=man:squid(8)
After=network.target

[Service]
EnvironmentFile=-/etc/sysconfig/squid
Type=forking
LimitNOFILE=16384
PIDFile=/var/run/squid.pid
ExecStartPre=/usr/bin/mkdir -p /var/run/squid
ExecStartPre=/usr/bin/chown squid.squid /var/run/squid
ExecStart=/usr/sbin/squid -sYC
ExecReload=/usr/sbin/squid -kreconf
ExecStop=/usr/sbin/squidshut.sh
TimeoutStopSec=36
KillMode=none

[Install]
WantedBy=multi-user.target
##END

I have tried couple things and I think I am in the wrong way.
Maybe there is some include file I can use as configurable else then 
EnvironmentFile to just contain the LimitNOFILE variable?


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


Re: [systemd-devel] Multi seats setup How-to

2015-09-03 Thread Floris


I was missing one piece of the puzzle. My USB dock station is
Plugable® UD-3900 USB 3.0


1-
I had to install the kernel driver for it, following instructions per
this displaylink forum[0]. Once the .rpm package installed, I could
verify:
$ lsmod | grep evdi

evdi   36864  0
drm_kms_helper122880  2 evdi,nouveau
drm   331776  10 ttm,evdi,drm_kms_helper,nouveau


# ll /lib/modules/$(uname -r)/extra/evdi.ko
-rw-r--r--. 1 root root 63072  3 sept. 14:29
/lib/modules/4.1.6-200.fc22.x86_64/extra/evdi.ko


2-
Now $ loginctl seat-status seat0 returns something more interesting:

  ├─/sys/devices/platform/evdi.0/drm/card1
  │ drm:card1

So I guess now I have indeed two cards.



Lets make things clear. The usb dock will be your second seat. I think
the next steps will be enough:

loginctl attach seat1 /sys/devices/platform/evdi.0/drm/card1
loginctl attach seat1 /the path to the usb3 hub

everything you didn't attach with loginctl or with an udev rule will
be part of seat0. So if your nvidia card is for seat0 you don't have
to write a rule for it.

success,

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


Re: [systemd-devel] help : loginctl won't add new seat

2015-09-03 Thread Benoit Barthelet
Maybe a typo, but why is there an "i" after master-of-seat?

that was that...
thanks a lot !

I'll remove seat0 as it's not necessary, thanks a lot

On Thu, Sep 3, 2015 at 3:29 PM, Floris  wrote:
> Op Thu, 03 Sep 2015 14:44:57 +0200 schreef Benoit Barthelet
> :
>
>> I'm at a loss figuring out why I can't succeed in attaching a card per
>> seat.
>
>
>>
>> ➜  ~  cat /etc/udev/rules.d/71-ati.rules
>> SUBSYSTEM=="pci",
>> DEVPATH=="/devices/pci:00/:00:07.0/:03:00.0", TAG+="seat",
>> TAG+="master-of-seat"i, ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat1"
>> SUBSYSTEM=="pci",
>> DEVPATH=="/devices/pci:00/:00:01.0/:01:00.0", TAG+="seat",
>> TAG+="master-of-seat"i, ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat0"
>>
>
> Maybe a typo, but why is there an "i" after master-of-seat?
> and you do not need a rule for seat0 everything belongs to
> seat0 until you attach it to an other.
>
>> ➜  ~  sudo udevadm trigger
>>
>
> I had no success with the trigger option. Only a reboot works
>
>> ➜  ~  udevadm info
>> --path=/sys/devices/pci:00/:00:07.0/:03:00.0
>> P: /devices/pci:00/:00:07.0/:03:00.0
>> E: DEVPATH=/devices/pci:00/:00:07.0/:03:00.0
>> E: DRIVER=fglrx_pci
>> E: ID_FOR_SEAT=pci-pci-_03_00_0
>> E: ID_MODEL_FROM_DATABASE=Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
>> E: ID_PATH=pci-:03:00.0
>> E: ID_PATH_TAG=pci-_03_00_0
>> E: ID_PCI_CLASS_FROM_DATABASE=Display controller
>> E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
>> E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
>> E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
>> E: MODALIAS=pci:v1002d679Asv174BsdE207bc03sc00i00
>> E: PCI_CLASS=3
>> E: PCI_ID=1002:679A
>> E: PCI_SLOT_NAME=:03:00.0
>> E: PCI_SUBSYS_ID=174B:E207
>> E: SUBSYSTEM=pci
>> E: TAGS=:master-of-seat:seat:
>
>
> There is a tag missing
> E: TAGS=:master-of-seat:seat1:seat:
> maybe one of the solutions above will solve this
>
>
>> E: USEC_INITIALIZED=4263907
>>
>
>>
>> I also have this xorg :
>> ➜  ~  cat /etc/X11/xorg.conf.d/90-ati.conf
>> Section "Device"
>> Identifier "Seat0"
>> Driver "fglrx"
>> BusID  "PCI:1:0:0"
>> Option "ProbeAllGpus" "FALSE"
>> MatchSeat  "seat0"
>> EndSection
>>
>>
>> Section "Device"
>> Identifier "Seat1"
>> Driver "fglrx"
>> BusID  "PCI:3:0:0"
>> Option "ProbeAllGpus" "FALSE"
>> MatchSeat  "seat1"
>> EndSection
>>
>
> Looks good.
>
> Success,
>
> floris
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] help : loginctl won't add new seat

2015-09-03 Thread Floris
Op Thu, 03 Sep 2015 14:44:57 +0200 schreef Benoit Barthelet  
:


I'm at a loss figuring out why I can't succeed in attaching a card per  
seat.




➜  ~  cat /etc/udev/rules.d/71-ati.rules
SUBSYSTEM=="pci",
DEVPATH=="/devices/pci:00/:00:07.0/:03:00.0", TAG+="seat",
TAG+="master-of-seat"i, ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="pci",
DEVPATH=="/devices/pci:00/:00:01.0/:01:00.0", TAG+="seat",
TAG+="master-of-seat"i, ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat0"



Maybe a typo, but why is there an "i" after master-of-seat?
and you do not need a rule for seat0 everything belongs to
seat0 until you attach it to an other.


➜  ~  sudo udevadm trigger



I had no success with the trigger option. Only a reboot works

➜  ~  udevadm info  
--path=/sys/devices/pci:00/:00:07.0/:03:00.0

P: /devices/pci:00/:00:07.0/:03:00.0
E: DEVPATH=/devices/pci:00/:00:07.0/:03:00.0
E: DRIVER=fglrx_pci
E: ID_FOR_SEAT=pci-pci-_03_00_0
E: ID_MODEL_FROM_DATABASE=Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
E: ID_PATH=pci-:03:00.0
E: ID_PATH_TAG=pci-_03_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
E: MODALIAS=pci:v1002d679Asv174BsdE207bc03sc00i00
E: PCI_CLASS=3
E: PCI_ID=1002:679A
E: PCI_SLOT_NAME=:03:00.0
E: PCI_SUBSYS_ID=174B:E207
E: SUBSYSTEM=pci
E: TAGS=:master-of-seat:seat:


There is a tag missing
E: TAGS=:master-of-seat:seat1:seat:
maybe one of the solutions above will solve this



E: USEC_INITIALIZED=4263907





I also have this xorg :
➜  ~  cat /etc/X11/xorg.conf.d/90-ati.conf
Section "Device"
Identifier "Seat0"
Driver "fglrx"
BusID  "PCI:1:0:0"
Option "ProbeAllGpus" "FALSE"
MatchSeat  "seat0"
EndSection


Section "Device"
Identifier "Seat1"
Driver "fglrx"
BusID  "PCI:3:0:0"
Option "ProbeAllGpus" "FALSE"
MatchSeat  "seat1"
EndSection



Looks good.

Success,

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


Re: [systemd-devel] Multi seats setup How-to

2015-09-03 Thread arnaud gaboury
On Thu, Sep 3, 2015 at 2:12 PM, Floris  wrote:
> Op Thu, 03 Sep 2015 13:51:06 +0200 schreef arnaud gaboury
> :
>
>> On Thu, Sep 3, 2015 at 1:26 PM, arnaud gaboury 
>> wrote:
>>>
>>> I plan to use the systemd mutli-seat features, but I am not sure at
>>> all how I must proceed and in waht order. I understand the main
>>> principle for mouse and keyboard: detect the device then
>>> $ loginctl attach seatNumber DevicePath
>>> As for the graphic card, I am lost.
>>>
>>> OS: Fedora 22
>>> gdm
>>> 1 nvidia card
>>> 1 USB3 plugable dockin station for the second monitor
>>> Nvidia driver (I would like to avoid using Nouveau if possible).
>>>
>
>> Following this old blog[0], it seems I must FIRST assign the graphic
>> card to seat1. So I guess first is to take care of the /etc/X11 stuff.
>> Once I have correctly configured it, I must be able to see two cards,
>> right ?
>>
>
> Here are the steps I took to make my multi seat with Debian Sid:
>
> 1. Install the nvidia drivers and blacklist the nouveau drivers.
> 2. Locate with loginctl seat-status seat0 the address of the graphic
> device you want to be seat1
>
> Maybe there is no graphic device, but I have:
>  ├─/sys/devices/pci:00/:00:05.0/:02:00.1/sound/card2
>  │ sound:card2 "NVidia"

I was missing one piece of the puzzle. My USB dock station is
Plugable® UD-3900 USB 3.0


1-
I had to install the kernel driver for it, following instructions per
this displaylink forum[0]. Once the .rpm package installed, I could
verify:
$ lsmod | grep evdi

evdi   36864  0
drm_kms_helper122880  2 evdi,nouveau
drm   331776  10 ttm,evdi,drm_kms_helper,nouveau


# ll /lib/modules/$(uname -r)/extra/evdi.ko
-rw-r--r--. 1 root root 63072  3 sept. 14:29
/lib/modules/4.1.6-200.fc22.x86_64/extra/evdi.ko


2-
Now $ loginctl seat-status seat0 returns something more interesting:

  ├─/sys/devices/platform/evdi.0/drm/card1
  │ drm:card1

So I guess now I have indeed two cards.


$ udevadmin info /sys/devices/platform/evdi.0/drm/card1

P: /devices/platform/evdi.0/drm/card1
N: dri/card1
E: DEVNAME=/dev/dri/card1
E: DEVPATH=/devices/platform/evdi.0/drm/card1
E: DEVTYPE=drm_minor
E: ID_FOR_SEAT=drm-platform-evdi_0
E: ID_PATH=platform-evdi.0
E: ID_PATH_TAG=platform-evdi_0
E: MAJOR=226
E: MINOR=1
E: SUBSYSTEM=drm
E: TAGS=:seat:uaccess:
E: USEC_INITIALIZED=51309590

NB: no driver section. Is it still ok ?

---
3-
A new udev rule is shipped with the package.
/etc/udev/rules.d/99-displaylink.rules
-
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_VENDOR}=="DisplayLink",
MODE="0660", RUN+="/bin/systemctl start displaylink.service"
ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_VENDOR}=="DisplayLink",
RUN+="/bin/systemctl stop displaylink.service"


and the systemd service is active and loaded when I plug the dock station


Now following your advices, I shall write:

/etc/udev/rules.d/72-seat-1.rules
SUBSYSTEM=="drm", DEVPATH=="/devices//platform/evdi.0/drm/card1",
TAG+="seat", TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1",
ENV{ID_SEAT}="seat1"

and this:
/etc/udev/rules.d/99-nvidia_seats.rules
 SUBSYSTEM=="drm", KERNEL=="card[0-9]*", ATTRS{vendor}=="0x10de",
DRIVERS=="nvidia", TAG+="master-of-seat"
 SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", DRIVER=="nvidia",
TAG+="seat", TAG+="master-of-seat"

Then do the xorg.conf stuff, reload and attach keyboard + mouse ?



> so the the gpu is /sys/devices/pci:00/:00:05.0/:02:00.0
> use udevadm info /sys/bus/pci/devices/:00:05.0/:02:00.0
> to make sure the address is right
>
> $ udevadm info /sys/bus/pci/devices/:00:05.0/:02:00.0
> P: /devices/pci:00/:00:05.0/:02:00.0
> E: DEVPATH=/devices/pci:00/:00:05.0/:02:00.0
> E: DRIVER=nvidia
> E: ID_AUTOSEAT=1
> E: ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 610]
> E: ID_PCI_CLASS_FROM_DATABASE=Display controller
> E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
> E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
> E: ID_SEAT=seat1
> E: ID_VENDOR_FROM_DATABASE=NVIDIA Corporation
> E: MODALIAS=pci:v10DEd104Asv3842sd2615bc03sc00i00
> E: PCI_CLASS=3
> E: PCI_ID=10DE:104A
> E: PCI_SLOT_NAME=:02:00.0
> E: PCI_SUBSYS_ID=3842:2615
> E: SUBSYSTEM=pci
> E: TAGS=:seat1:seat:master-of-seat:
> E: USEC_INITIALIZED=4003578
>
> 3. Make an udev rule for the gpu:
> $ cat /etc/udev/rules.d/72-seat-1.rules
> SUBSYSTEM=="pci", DEVPATH=="/devices/pci:00/:00:05.0/:02:00.0",
> TAG+="seat", TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1",
> ENV{ID_SEAT}="seat1"
>
> 4. create a x11 conf for the nvidia device
> $ cat /etc/X11/xorg.conf.d/90-nvidia.conf
> Section "Device

Re: [systemd-devel] help : loginctl won't add new seat

2015-09-03 Thread Benoit Barthelet
I'm at a loss figuring out why I can't succeed in attaching a card per seat.
This was simpler with free driver, just had to
loginctl attach seat1
/sys/devices/pci:00/:00:01.0/:01:00.0/drm/card0/

but it seems with those proprietary drivers cards don't show up the same way.

still no seat1 shows up after I trigger udev rules :

before any rule my cards are :
➜  ~  udevadm info --path=/sys/devices/pci:00/:00:07.0/:03:00.0
P: /devices/pci:00/:00:07.0/:03:00.0
E: DEVPATH=/devices/pci:00/:00:07.0/:03:00.0
E: DRIVER=fglrx_pci
E: ID_MODEL_FROM_DATABASE=Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
E: MODALIAS=pci:v1002d679Asv174BsdE207bc03sc00i00
E: PCI_CLASS=3
E: PCI_ID=1002:679A
E: PCI_SLOT_NAME=:03:00.0
E: PCI_SUBSYS_ID=174B:E207
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=4263907

➜  ~  udevadm info --path=/sys/devices/pci:00/:00:01.0/:01:00.0
P: /devices/pci:00/:00:01.0/:01:00.0
E: DEVPATH=/devices/pci:00/:00:01.0/:01:00.0
E: DRIVER=fglrx_pci
E: ID_MODEL_FROM_DATABASE=Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
E: MODALIAS=pci:v1002d679Asv174BsdE207bc03sc00i00
E: PCI_CLASS=3
E: PCI_ID=1002:679A
E: PCI_SLOT_NAME=:01:00.0
E: PCI_SUBSYS_ID=174B:E207
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=4264255


➜  ~  cat /etc/udev/rules.d/71-ati.rules
SUBSYSTEM=="pci",
DEVPATH=="/devices/pci:00/:00:07.0/:03:00.0", TAG+="seat",
TAG+="master-of-seat"i, ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="pci",
DEVPATH=="/devices/pci:00/:00:01.0/:01:00.0", TAG+="seat",
TAG+="master-of-seat"i, ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat0"

➜  ~  sudo udevadm trigger

➜  ~  udevadm info --path=/sys/devices/pci:00/:00:07.0/:03:00.0
P: /devices/pci:00/:00:07.0/:03:00.0
E: DEVPATH=/devices/pci:00/:00:07.0/:03:00.0
E: DRIVER=fglrx_pci
E: ID_FOR_SEAT=pci-pci-_03_00_0
E: ID_MODEL_FROM_DATABASE=Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
E: ID_PATH=pci-:03:00.0
E: ID_PATH_TAG=pci-_03_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
E: MODALIAS=pci:v1002d679Asv174BsdE207bc03sc00i00
E: PCI_CLASS=3
E: PCI_ID=1002:679A
E: PCI_SLOT_NAME=:03:00.0
E: PCI_SUBSYS_ID=174B:E207
E: SUBSYSTEM=pci
E: TAGS=:master-of-seat:seat:
E: USEC_INITIALIZED=4263907

➜  ~  udevadm info --path=/sys/devices/pci:00/:00:01.0/:01:00.0
P: /devices/pci:00/:00:01.0/:01:00.0
E: DEVPATH=/devices/pci:00/:00:01.0/:01:00.0
E: DRIVER=fglrx_pci
E: ID_FOR_SEAT=pci-pci-_01_00_0
E: ID_MODEL_FROM_DATABASE=Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280]
E: ID_PATH=pci-:01:00.0
E: ID_PATH_TAG=pci-_01_00_0
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
E: MODALIAS=pci:v1002d679Asv174BsdE207bc03sc00i00
E: PCI_CLASS=3
E: PCI_ID=1002:679A
E: PCI_SLOT_NAME=:01:00.0
E: PCI_SUBSYS_ID=174B:E207
E: SUBSYSTEM=pci
E: TAGS=:master-of-seat:seat:
E: USEC_INITIALIZED=4264255

but still

➜  ~  loginctl list-seats
SEAT
seat0

1 seats listed.


seat0
Sessions: *c3 10
 Devices:
  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input7
  │ input:input7 "Power Button"
  ├─/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input6
  │ input:input6 "Power Button"
  ├─/sys/devices/pci:00/:00:01.0/:01:00.0
  │ [MASTER] pci::01:00.0

├─/sys/devices/pci:00/:00:01.0/:01:00.1/sound/card1
  │ sound:card1 "HDMI_1"
  │
├─/sys/devices/pci:00/:00:01.0/:01:00.1/sound/card1/input16
  │ │ input:input16 "HDA ATI HDMI HDMI/DP,pcm=3"
  │
├─/sys/devices/pci:00/:00:01.0/:01:00.1/sound/card1/input17
  │ │ input:input17 "HDA ATI HDMI HDMI/DP,pcm=7"
  │
├─/sys/devices/pci:00/:00:01.0/:01:00.1/sound/card1/input18
  │ │ input:input18 "HDA ATI HDMI HDMI/DP,pcm=8"
  │
├─/sys/devices/pci:00/:00:01.0/:01:00.1/sound/card1/input19
  │ │ in

Re: [systemd-devel] Multi seats setup How-to

2015-09-03 Thread Floris
Op Thu, 03 Sep 2015 13:51:06 +0200 schreef arnaud gaboury  
:


On Thu, Sep 3, 2015 at 1:26 PM, arnaud gaboury  
 wrote:

I plan to use the systemd mutli-seat features, but I am not sure at
all how I must proceed and in waht order. I understand the main
principle for mouse and keyboard: detect the device then
$ loginctl attach seatNumber DevicePath
As for the graphic card, I am lost.

OS: Fedora 22
gdm
1 nvidia card
1 USB3 plugable dockin station for the second monitor
Nvidia driver (I would like to avoid using Nouveau if possible).




Following this old blog[0], it seems I must FIRST assign the graphic
card to seat1. So I guess first is to take care of the /etc/X11 stuff.
Once I have correctly configured it, I must be able to see two cards,
right ?



Here are the steps I took to make my multi seat with Debian Sid:

1. Install the nvidia drivers and blacklist the nouveau drivers.
2. Locate with loginctl seat-status seat0 the address of the graphic
device you want to be seat1

Maybe there is no graphic device, but I have:
 ├─/sys/devices/pci:00/:00:05.0/:02:00.1/sound/card2
 │ sound:card2 "NVidia"
so the the gpu is /sys/devices/pci:00/:00:05.0/:02:00.0
use udevadm info /sys/bus/pci/devices/:00:05.0/:02:00.0
to make sure the address is right

$ udevadm info /sys/bus/pci/devices/:00:05.0/:02:00.0
P: /devices/pci:00/:00:05.0/:02:00.0
E: DEVPATH=/devices/pci:00/:00:05.0/:02:00.0
E: DRIVER=nvidia
E: ID_AUTOSEAT=1
E: ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 610]
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_SEAT=seat1
E: ID_VENDOR_FROM_DATABASE=NVIDIA Corporation
E: MODALIAS=pci:v10DEd104Asv3842sd2615bc03sc00i00
E: PCI_CLASS=3
E: PCI_ID=10DE:104A
E: PCI_SLOT_NAME=:02:00.0
E: PCI_SUBSYS_ID=3842:2615
E: SUBSYSTEM=pci
E: TAGS=:seat1:seat:master-of-seat:
E: USEC_INITIALIZED=4003578

3. Make an udev rule for the gpu:
$ cat /etc/udev/rules.d/72-seat-1.rules
SUBSYSTEM=="pci",  
DEVPATH=="/devices/pci:00/:00:05.0/:02:00.0", TAG+="seat",  
TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat1"


4. create a x11 conf for the nvidia device
$ cat /etc/X11/xorg.conf.d/90-nvidia.conf
Section "Device"
Identifier "Seat0"
Driver "nvidia"
BusID  "PCI:1:0:0"
Option "ProbeAllGpus" "FALSE"
MatchSeat  "seat0"
EndSection


Section "Device"
Identifier "Seat1"
Driver "nvidia"
BusID  "PCI:2:0:0"
Option "ProbeAllGpus" "FALSE"
MatchSeat  "seat1"
EndSection


5. reboot or trigger udev to load the rule
6. Check if the seat is created
$ loginctl list-seats
SEAT
seat0
seat1

2 seats listed.

7. use loginctl attach and connect all other devices to seat1


success,

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


Re: [systemd-devel] Multi seats setup How-to

2015-09-03 Thread arnaud gaboury
On Thu, Sep 3, 2015 at 1:26 PM, arnaud gaboury  wrote:
> I plan to use the systemd mutli-seat features, but I am not sure at
> all how I must proceed and in waht order. I understand the main
> principle for mouse and keyboard: detect the device then
> $ loginctl attach seatNumber DevicePath
> As for the graphic card, I am lost.
>
> OS: Fedora 22
> gdm
> 1 nvidia card
> 1 USB3 plugable dockin station for the second monitor
> Nvidia driver (I would like to avoid using Nouveau if possible).
>
> The actual configuration:
>
> 
> $ loginctl seat-status seat0
>
> seat0
> Sessions: 2 *1 c1
>  Devices:
>   ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
>   │ input:input1 "Power Button"
>   
> ├─/sys/device...XSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
>   │ input:input0 "Power Button"
>   
> ├─/sys/devices/pci:00/:00:01.0/:01:00.0/drm/card0
>   │ drm:card0
>   
> ├─/sys/device...0:00/:00:01.0/:01:00.0/drm/renderD128
>   │ drm:renderD128
>   
> ├─/sys/device...000:00/:00:01.0/:01:00.0/graphics/fb0
>   │ [MASTER] graphics:fb0 "nouveaufb"
>   
> ├─/sys/device...:00/:00:01.0/:01:00.1/sound/card1
>   │ sound:card1 "NVidia"
>   │ 
> ├─/sys/device...00:00:01.0/:01:00.1/sound/card1/input14
>   │ │ input:input14 "HDA NVidia HDMI/DP,pcm=3"
>   │ 
> ├─/sys/device...00:00:01.0/:01:00.1/sound/card1/input15
>   │ │ input:input15 "HDA NVidia HDMI/DP,pcm=7"
>   │ 
> ├─/sys/device...00:00:01.0/:01:00.1/sound/card1/input16
>   │ │ input:input16 "HDA NVidia HDMI/DP,pcm=8"
>   │ 
> └─/sys/device...00:00:01.0/:01:00.1/sound/card1/input17
>   │   input:input17 "HDA NVidia HDMI/DP,pcm=9"
> ├─/sys/devices/pci:00/:00:14.0/usb1
>   │ usb:usb1
>   │ └─/sys/devices/pci:00/:00:14.0/usb1/1-10
>   │   usb:1-10
>   │   └─/sys/devices/pci:00/:00:14.0/usb1/1-10/1-10.4
>   │ usb:1-10.4
>   │ 
> ├─/sys/devic1:1.0/0003:046D:C534.0004/input/input18
>   │ │ input:input18 "Logitech USB Receiver"
>   │ 
> ├─/sys/devic1:1.1/0003:046D:C534.0005/input/input19
>   │ │ input:input19 "Logitech USB Receiver"
>   │ 
> └─/sys/devic...B.0008/0003:046D:4003.0009/input/input20
>   │   input:input20 "Logitech K270"
>   ├─/sys/devices/pci:00/:00:14.0/usb2
>   │ usb:usb2
>   │ └─/sys/devices/pci:00/:00:14.0/usb2/2-6
>   │   usb:2-6
>   │   
> └─/sys/device...14.0/usb2/2-6/2-6.1/2-6.1:1.2/sound/card2
>   │ sound:card2 "UD3900"
>   ├─/sys/devices/pci:00/:00:1a.0/usb5
>   │ usb:usb5
>   │ └─/sys/devices/pci:00/:00:1a.0/usb5/5-1
>   │   usb:5-1
>   ├─/sys/devices/pci:00/:00:1b.0/sound/card0
>   │ sound:card0 "PCH"
>   │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input10
>   │ │ input:input10 "HDA Intel PCH Rear Mic"
>   │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input11
>   │ │ input:input11 "HDA Intel PCH Line"
>   │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input12
>   │ │ input:input12 "HDA Intel PCH Line Out"
>   │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input13
>   │ │ input:input13 "HDA Intel PCH Front Headphone"
>   │ └─/sys/devices/pci:00/:00:1b.0/sound/card0/input9
>   │   input:input9 "HDA Intel PCH Front Mic"
>  ├─/sys/devices/pci:00/:00:1c.4/:04:00.0/usb3
>   │ usb:usb3
>   ├─/sys/devices/pci:00/:00:1c.4/:04:00.0/usb4
>   │ usb:usb4
>   ├─/sys/devices/pci:00/:00:1d.0/usb6
>   │ usb:usb6
>   │ └─/sys/devices/pci:00/:00:1d.0/usb6/6-1
>   │   usb:6-1
>   
> ├─/sys/device...1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sr0
>   │ block:sr0
>   
> ├─/sys/device...a6/host5/target5:0:0/5:0:0:0/scsi_generic/sg2
>   │ scsi_generic:sg2
>   ├─/sys/devices/platform/eeepc-wmi/input/input8
>   │ input:input8 "Eee PC WMI hotkeys"
>   ├─/sys/devices/virtual/misc/kvm
>   │ misc:kvm
>   

[systemd-devel] Multi seats setup How-to

2015-09-03 Thread arnaud gaboury
I plan to use the systemd mutli-seat features, but I am not sure at
all how I must proceed and in waht order. I understand the main
principle for mouse and keyboard: detect the device then
$ loginctl attach seatNumber DevicePath
As for the graphic card, I am lost.

OS: Fedora 22
gdm
1 nvidia card
1 USB3 plugable dockin station for the second monitor
Nvidia driver (I would like to avoid using Nouveau if possible).

The actual configuration:


$ loginctl seat-status seat0

seat0
Sessions: 2 *1 c1
 Devices:
  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
  │ input:input1 "Power Button"
  ├─/sys/device...XSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
  │ input:input0 "Power Button"
  ├─/sys/devices/pci:00/:00:01.0/:01:00.0/drm/card0
  │ drm:card0
  ├─/sys/device...0:00/:00:01.0/:01:00.0/drm/renderD128
  │ drm:renderD128
  ├─/sys/device...000:00/:00:01.0/:01:00.0/graphics/fb0
  │ [MASTER] graphics:fb0 "nouveaufb"
  ├─/sys/device...:00/:00:01.0/:01:00.1/sound/card1
  │ sound:card1 "NVidia"
  │ ├─/sys/device...00:00:01.0/:01:00.1/sound/card1/input14
  │ │ input:input14 "HDA NVidia HDMI/DP,pcm=3"
  │ ├─/sys/device...00:00:01.0/:01:00.1/sound/card1/input15
  │ │ input:input15 "HDA NVidia HDMI/DP,pcm=7"
  │ ├─/sys/device...00:00:01.0/:01:00.1/sound/card1/input16
  │ │ input:input16 "HDA NVidia HDMI/DP,pcm=8"
  │ └─/sys/device...00:00:01.0/:01:00.1/sound/card1/input17
  │   input:input17 "HDA NVidia HDMI/DP,pcm=9"
├─/sys/devices/pci:00/:00:14.0/usb1
  │ usb:usb1
  │ └─/sys/devices/pci:00/:00:14.0/usb1/1-10
  │   usb:1-10
  │   └─/sys/devices/pci:00/:00:14.0/usb1/1-10/1-10.4
  │ usb:1-10.4
  │ ├─/sys/devic1:1.0/0003:046D:C534.0004/input/input18
  │ │ input:input18 "Logitech USB Receiver"
  │ ├─/sys/devic1:1.1/0003:046D:C534.0005/input/input19
  │ │ input:input19 "Logitech USB Receiver"
  │ └─/sys/devic...B.0008/0003:046D:4003.0009/input/input20
  │   input:input20 "Logitech K270"
  ├─/sys/devices/pci:00/:00:14.0/usb2
  │ usb:usb2
  │ └─/sys/devices/pci:00/:00:14.0/usb2/2-6
  │   usb:2-6
  │   └─/sys/device...14.0/usb2/2-6/2-6.1/2-6.1:1.2/sound/card2
  │ sound:card2 "UD3900"
  ├─/sys/devices/pci:00/:00:1a.0/usb5
  │ usb:usb5
  │ └─/sys/devices/pci:00/:00:1a.0/usb5/5-1
  │   usb:5-1
  ├─/sys/devices/pci:00/:00:1b.0/sound/card0
  │ sound:card0 "PCH"
  │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input10
  │ │ input:input10 "HDA Intel PCH Rear Mic"
  │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input11
  │ │ input:input11 "HDA Intel PCH Line"
  │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input12
  │ │ input:input12 "HDA Intel PCH Line Out"
  │ ├─/sys/devices/pci:00/:00:1b.0/sound/card0/input13
  │ │ input:input13 "HDA Intel PCH Front Headphone"
  │ └─/sys/devices/pci:00/:00:1b.0/sound/card0/input9
  │   input:input9 "HDA Intel PCH Front Mic"
 ├─/sys/devices/pci:00/:00:1c.4/:04:00.0/usb3
  │ usb:usb3
  ├─/sys/devices/pci:00/:00:1c.4/:04:00.0/usb4
  │ usb:usb4
  ├─/sys/devices/pci:00/:00:1d.0/usb6
  │ usb:usb6
  │ └─/sys/devices/pci:00/:00:1d.0/usb6/6-1
  │   usb:6-1
  ├─/sys/device...1f.2/ata6/host5/target5:0:0/5:0:0:0/block/sr0
  │ block:sr0
  ├─/sys/device...a6/host5/target5:0:0/5:0:0:0/scsi_generic/sg2
  │ scsi_generic:sg2
  ├─/sys/devices/platform/eeepc-wmi/input/input8
  │ input:input8 "Eee PC WMI hotkeys"
  ├─/sys/devices/virtual/misc/kvm
  │ misc:kvm
  └─/sys/devices/virtual/misc/rfkill
misc:rfkill

$ lspci

00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM
Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core
Processor PCI Express x16 Controller (rev 0

Re: [systemd-devel] Multi seats

2015-09-03 Thread Floris
Op Thu, 03 Sep 2015 12:26:03 +0200 schreef arnaud gaboury  
:





On Fri, Aug 28, 2015 at 1:50 PM, Laércio de Sousa  
 wrote:
You're right. If you use GNOME, GDM is ready for you. In any other  
case, use LightDM >= 1.12. Automatic multi-seat >>support for SDDM  
(used by KDE and LXQt) is still WIP.


2015-08-28 8:42 GMT-03:00 arnaud gaboury :

On Fri, Aug 28, 2015 at 1:37 PM, Laércio de Sousa

 wrote:


Hi Arnaud!






I've been researching systemd-based multi-seat setups with non-KMS  
video



drivers for a couple of years.







In principle, yes, you can set up a multi-seat system with proprietary



NVIDIA drivers, provided you:






* provide a suitable udev rule to tag your NVIDIA card as  
"master-of-seat"



(they are tagged by default if using Nouveau drivers). Examples:







SUBSYSTEM=="drm", KERNEL=="card[0-9]*", ATTRS{vendor}=="0x10de",



DRIVERS=="nvidia", TAG+="master-of-seat"







SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", DRIVER=="nvidia",



TAG+="seat", TAG+="master-of-seat"







* Have xorg-server 1.16 or newer installed






* Provide a suitable xorg.conf for your NVIDIA card, not forgetting  
to put



MatchSeat entries in Device/Screen/ServerLayout sections.


Any hint/pointer about this configuration?
TY



$ cat /etc/X11/xorg.conf.d/90-nvidia.conf
Section "Device"
Identifier "Seat0"
Driver "nvidia"
BusID  "PCI:1:0:0"
Option "ProbeAllGpus" "FALSE"
MatchSeat  "seat0"
Option  "Coolbits""4"
Option  "TripleBuffer" "ON"
EndSection


Section "Device"
Identifier "Seat1"
Driver "nvidia"
BusID  "PCI:2:0:0"
Option "ProbeAllGpus" "FALSE"
MatchSeat  "seat1"
Option  "TripleBuffer" "ON"
#   Option  "CustomEDID"  "/etc/X11/nv-edid.raw"
EndSection

Success,

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


Re: [systemd-devel] Multi seats

2015-09-03 Thread arnaud gaboury
On Fri, Aug 28, 2015 at 1:50 PM, Laércio de Sousa <
laercioso...@sme-mogidascruzes.sp.gov.br> wrote:

> You're right. If you use GNOME, GDM is ready for you. In any other case,
> use LightDM >= 1.12. Automatic multi-seat support for SDDM (used by KDE and
> LXQt) is still WIP.
>
> 2015-08-28 8:42 GMT-03:00 arnaud gaboury :
>
>> On Fri, Aug 28, 2015 at 1:37 PM, Laércio de Sousa
>>  wrote:
>> > Hi Arnaud!
>> >
>> > I've been researching systemd-based multi-seat setups with non-KMS video
>> > drivers for a couple of years.
>> >
>> > In principle, yes, you can set up a multi-seat system with proprietary
>> > NVIDIA drivers, provided you:
>> >
>> > * provide a suitable udev rule to tag your NVIDIA card as
>> "master-of-seat"
>> > (they are tagged by default if using Nouveau drivers). Examples:
>> >
>> > SUBSYSTEM=="drm", KERNEL=="card[0-9]*", ATTRS{vendor}=="0x10de",
>> > DRIVERS=="nvidia", TAG+="master-of-seat"
>> >
>> > SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", DRIVER=="nvidia",
>> > TAG+="seat", TAG+="master-of-seat"
>> >
>> > * Have xorg-server 1.16 or newer installed
>> >
>> > * Provide a suitable xorg.conf for your NVIDIA card, not forgetting to
>> put
>> > MatchSeat entries in Device/Screen/ServerLayout sections.
>>
>
Any hint/pointer about this configuration?
TY


> >
>> > * Have LightDM 1.12 or newer installed (if you don't use GNOME)
>>
>> In fact I was wrong in my presentation. Login window is now managed by
>> GDM in Fedora 22, not Lightdm. I guess I do not need to install and
>> log with Lightdm, am I right?
>> >
>> > Att.
>> >
>> > 2015-08-28 7:58 GMT-03:00 arnaud gaboury :
>> >>
>> >> One year ago, I tried to setup multi seats, see this thread[0]. By
>> >> that time, I gave up as my configuration was not made for such a
>> >> fetaure.
>> >> Now I am back with all the needed tools to do it easily (I think so):
>> >> - Fedora 22
>> >> - lightdm & GDM
>> >> - an USB 3 plugable dockin station
>> >>
>> >> As good how-to on this topic are few, I wonder a few things:
>> >> - is the proprietary Nvidia driver Ok or shall I indeed use Nouveau
>> >> (my card is Nvidia one)?
>> >> - are the lightdm/Xorg setup configuring accordingly or shall I edit
>> >> manually the conf files?
>> >>
>> >> I understand the whole principle to $ loginctl attach seatNumber
>> >> /device/apth.
>> >>
>> >> Thank you for a few hints.
>> >>
>> >>
>> >>
>> >> [0]
>> http://lists.freedesktop.org/archives/systemd-devel/2014-August/022403.html
>> >>
>> >> --
>> >>
>> >> google.com/+arnaudgabourygabx
>> >> ___
>> >> systemd-devel mailing list
>> >> systemd-devel@lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>> >
>> >
>> >
>> >
>> > --
>> > Laércio de Sousa
>> > Orientador de Informática
>> > Escola Municipal "Professor Eulálio Gruppi"
>> > Rua Ismael da Silva Mello, 559, Mogi Moderno
>> > Mogi das Cruzes - SP
>> > CEP 08717-390
>> > Telefone: (11) 4726-8313
>>
>>
>>
>> --
>>
>> google.com/+arnaudgabourygabx
>>
>
>
>
> --
> *Laércio de Sousa*
> *Orientador de Informática*
> *Escola Municipal "Professor Eulálio Gruppi"*
> *Rua Ismael da Silva Mello, 559, Mogi Moderno*
> *Mogi das Cruzes - SPCEP 08717-390*
> Telefone: (11) 4726-8313
>



-- 

google.com/+arnaudgabourygabx

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


[systemd-devel] Cannot start service due to 'systemd-tty-ask-password-agent --watch' not answering

2015-09-03 Thread Yeela Kaplan
Hi all,
We have run into a problem starting a service on EL7.1.
We installed the same environment on two hosts, on the first one the service 
started successfully and on the second one it failed to start.

On the machine failing when running:
systemctl start supervdsmd.service

we see that a child process `systemd-tty-ask-password-agent --watch`
is spawned by systemctl:
 
[root@green-vdsc ~]# pstree -p $$
bash(13179)─┬─pstree(13494)
└─systemctl(13440)───systemd-tty-ask(13441)

using strace -f we see that systemctl is waiting on a response from 
systemd-tty-ask but never receives it and gets stuck forever polling:

[pid 14884] execve("/usr/bin/systemd-tty-ask-password-agent", 
["/usr/bin/systemd-tty-ask-passwor"..., "--watch"], [/* 31 vars */]) = 0
.
.
.
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\242\233\270\f9\257\326\257_\n\30\264\263\17\32\272\0058\331\245\236f\207\202\321(\322`pS\324\376"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"G\262_$\210%*\275Q`G\240\361F\323\306\254.\334\323]\314:!u\343H\200\227\1\206&"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\272\177J\330D\252\367\2\367w\302\230-\221'\267\365\376\214\217\334\327\245a\311\377\tfc\177\273j"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\324\230x\231\222\210\271-\22a\2134\202\274\\\373\305\231;\177\244e\246=k\204\216\327\340iG\17"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"3\210\234X\0N\202G\354\22WFt^\331V\344\32\\A\36\323[\302\370\363\371\210\211\t\2129"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"+\235\26\274\373R\34\377Rs9\370\273\370\t),V\276\v`\233^E\256\257lX#\27\23W"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\346\237\ru5\311\372\362K?2\203\300\246C2K(\4+\20\341t\4S\370\35\25}>\265\240"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"F\25\257j\233q\315W\25\334\306\233\217!\306$\255Y\33\364\0039Qy\2\223@o\235\257hw"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\324\316\10k*\332A\253\344^\5y\372\10I\375\216\372\271\277\205\2264\0\35>?]`\263\374\275"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\34P\10w\314e\270\226X\t\212\30\"\17.\334\3471\342B\334\272\315\351\367\324k\273S\363\323f"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"\210\230;\227\31\261\364A\301#\374\311\206?\17\202\2749\340\246\323gm\315\325\361\335K\200\6h\275"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])
read(3, 
"i\10Dl\5\312\222\376\10l\37\277X\341CIs\\\"\235{\315|\334\227\10>\246a\5,\36"...,
 120) = 120
poll([{fd=3, events=POLLIN}], 1, 100)   = 1 ([{fd=3, revents=POLLIN}])


systemctl is waiting for a response from its child process forever and does not 
close it. 
As a result, it never even tries to run the start command for our service 
supervdsm.
So it looks like an issue either with systemd or the way our service interacts 
with systemd.

Is anyone familiar with such an issue or has an idea why it happens and how to 
fix it? 



We still have the machine with this problem running if it helps,
can anybody maybe take a look and help figure out what's the problem?

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