Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 649365 Details for
Bug 878605
systemd-logind: No way to setup multi-seat with two nvidia cards using proprietary drivers
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
allows systemd-logind to create a seat without a graphic card
systemd-logind-site-without-graphics.patch (text/plain), 7.90 KB, created by
Oleg Samarin
on 2012-11-21 19:16:59 UTC
(
hide
)
Description:
allows systemd-logind to create a seat without a graphic card
Filename:
MIME Type:
Creator:
Oleg Samarin
Created:
2012-11-21 19:16:59 UTC
Size:
7.90 KB
patch
obsolete
>From: Oleg Samarin <osamarin68@gmail.com> >Subject: [PATCH] logind: creating a site without graphics > >Added capability of creating a new site without graphic card > > >diff -Naur systemd-44.old/src/login/logind.c systemd-44/src/login/logind.c >--- systemd-44.old/src/login/logind.c 2012-11-15 22:31:51.000000000 +0400 >+++ systemd-44/src/login/logind.c 2012-11-15 22:36:58.343888212 +0400 >@@ -321,7 +321,11 @@ > if (!device) > return 0; > >- seat_add_to_gc_queue(device->seat); >+ LIST_REMOVE(Device, devices, device->seat->devices, device); >+ >+ if (! m->seat_without_graphics || ! device->seat->devices) { >+ seat_add_to_gc_queue(device->seat); >+ } > device_free(device); > > } else { >@@ -372,9 +376,11 @@ > goto finish; > } > >- r = udev_enumerate_add_match_subsystem(e, "graphics"); >- if (r < 0) >- goto finish; >+ if (! m->seat_without_graphics) { >+ r = udev_enumerate_add_match_subsystem(e, "graphics"); >+ if (r < 0) >+ goto finish; >+ } > > r = udev_enumerate_add_match_tag(e, "seat"); > if (r < 0) >@@ -1128,9 +1134,11 @@ > if (r < 0) > return r; > >- r = udev_monitor_filter_add_match_subsystem_devtype(m->udev_seat_monitor, "graphics", NULL); >- if (r < 0) >- return r; >+ if (! m->seat_without_graphics) { >+ r = udev_monitor_filter_add_match_subsystem_devtype(m->udev_seat_monitor, "graphics", NULL); >+ if (r < 0) >+ return r; >+ } > > r = udev_monitor_enable_receiving(m->udev_seat_monitor); > if (r < 0) >diff -Naur systemd-44.old/src/login/logind-gperf.gperf systemd-44/src/login/logind-gperf.gperf >--- systemd-44.old/src/login/logind-gperf.gperf 2012-11-15 22:31:43.000000000 +0400 >+++ systemd-44/src/login/logind-gperf.gperf 2012-11-15 22:36:58.344888199 +0400 >@@ -21,3 +21,4 @@ > Login.Controllers, config_parse_strv, 0, offsetof(Manager, controllers) > Login.ResetControllers, config_parse_strv, 0, offsetof(Manager, reset_controllers) > Login.InhibitDelayMaxSec,config_parse_usec, 0, offsetof(Manager, inhibit_delay_max) >+Login.SeatWithoutGraphics,config_parse_bool, 0, offsetof(Manager, seat_without_graphics) >diff -Naur systemd-44.old/src/login/logind.h systemd-44/src/login/logind.h >--- systemd-44.old/src/login/logind.h 2012-11-15 22:31:49.000000000 +0400 >+++ systemd-44/src/login/logind.h 2012-11-15 22:36:58.344888199 +0400 >@@ -77,6 +77,8 @@ > > unsigned long session_counter; > unsigned long inhibit_counter; >+ >+ bool seat_without_graphics; > > Hashmap *session_cgroups; > Hashmap *user_cgroups; >diff -Naur systemd-44.old/src/login/multi-seat-x.c systemd-44/src/login/multi-seat-x.c >--- systemd-44.old/src/login/multi-seat-x.c 2012-11-15 22:31:49.000000000 +0400 >+++ systemd-44/src/login/multi-seat-x.c 2012-11-14 23:14:03.000000000 +0400 >@@ -35,6 +35,7 @@ > int i; > const char *seat = NULL; > char **new_argv; >+ int new_argc; > char *path = NULL, *device_node = NULL; > int r; > FILE *f = NULL; >@@ -108,64 +109,71 @@ > break; > } > >+ /* > if (!device_node) { > log_error("Failed to find device node for seat %s.", seat); > goto fail; > } >+ */ >+ >+ if (device_node) { >+ r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0); >+ if (r < 0) { >+ log_error("Failed to create directory: %s", strerror(-r)); >+ goto fail; >+ } >+ >+ path = strappend("/run/systemd/multi-session-x/", seat); >+ if (!path) { >+ log_error("Out of memory"); >+ goto fail; >+ } >+ >+ f = fopen(path, "we"); >+ if (!f) { >+ log_error("Failed to write configuration file: %m"); >+ goto fail; >+ } >+ >+ fprintf(f, >+ "Section \"Device\"\n" >+ " Identifier \"udev\"\n" >+ " Driver \"fbdev\"\n" >+ " Option \"fbdev\" \"%s\"\n" >+ "EndSection\n" >+ "Section \"ServerFlags\"\n" >+ " Option \"AutoAddDevices\" \"True\"\n" >+ " Option \"AllowEmptyInput\" \"True\"\n" >+ " Option \"DontVTSwitch\" \"True\"\n" >+ "EndSection\n" >+ "Section \"InputClass\"\n" >+ " Identifier \"Force Input Devices to Seat\"\n" >+ " Option \"GrabDevice\" \"True\"\n" >+ "EndSection\n", >+ device_node); >+ >+ fflush(f); >+ >+ if (ferror(f)) { >+ log_error("Failed to write configuration file: %m"); >+ goto fail; >+ } > >- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0); >- if (r < 0) { >- log_error("Failed to create directory: %s", strerror(-r)); >- goto fail; >- } >- >- path = strappend("/run/systemd/multi-session-x/", seat); >- if (!path) { >- log_error("Out of memory"); >- goto fail; >- } >- >- f = fopen(path, "we"); >- if (!f) { >- log_error("Failed to write configuration file: %m"); >- goto fail; >+ fclose(f); >+ f = NULL; > } > >- fprintf(f, >- "Section \"Device\"\n" >- " Identifier \"udev\"\n" >- " Driver \"fbdev\"\n" >- " Option \"fbdev\" \"%s\"\n" >- "EndSection\n" >- "Section \"ServerFlags\"\n" >- " Option \"AutoAddDevices\" \"True\"\n" >- " Option \"AllowEmptyInput\" \"True\"\n" >- " Option \"DontVTSwitch\" \"True\"\n" >- "EndSection\n" >- "Section \"InputClass\"\n" >- " Identifier \"Force Input Devices to Seat\"\n" >- " Option \"GrabDevice\" \"True\"\n" >- "EndSection\n", >- device_node); >- >- fflush(f); >- >- if (ferror(f)) { >- log_error("Failed to write configuration file: %m"); >- goto fail; >- } >- >- fclose(f); >- f = NULL; >- > new_argv = alloca(sizeof(char*) * (argc + 3 + 1)); > memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1)); > >+ new_argc = argc; > new_argv[0] = (char*) X_SERVER; >- new_argv[argc+0] = (char*) "-config"; >- new_argv[argc+1] = path; >- new_argv[argc+2] = (char*) "-sharevts"; >- new_argv[argc+3] = NULL; >+ if (device_node) { >+ new_argv[new_argc ++] = (char*) "-config"; >+ new_argv[new_argc ++] = path; >+ } >+ new_argv[new_argc ++] = (char*) "-sharevts"; >+ new_argv[new_argc] = NULL; > > udev_enumerate_unref(enumerator); > enumerator = NULL; >@@ -173,8 +181,10 @@ > udev_unref(udev); > udev = NULL; > >- free(device_node); >- device_node = NULL; >+ if (device_node) { >+ free(device_node); >+ device_node = NULL; >+ } > > execv(X_SERVER, new_argv); > log_error("Failed to execute real X server: %m"); >diff -Naur systemd-44.old/src/login/systemd-logind.conf systemd-44/src/login/systemd-logind.conf >--- systemd-44.old/src/login/systemd-logind.conf 2012-11-15 22:31:43.000000000 +0400 >+++ systemd-44/src/login/systemd-logind.conf 2012-11-15 22:36:58.344888199 +0400 >@@ -15,3 +15,4 @@ > #Controllers= > #ResetControllers=cpu > #InhibitDelayMaxSec=5 >+#SeatWithoutGraphics=no
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 878605
:
648714
|
648717
|
648718
|
648719
| 649365 |
764692
|
764723