Xorg multiseat with 3.5 LCD shield and VU7

Post Reply
User avatar
mad_ady
Posts: 6874
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 241 times
Been thanked: 178 times
Contact:

Xorg multiseat with 3.5 LCD shield and VU7

Unread post by mad_ady » Wed Nov 27, 2019 12:10 am

I'm starting this thread as a work in progress on how to use two independent screens on a C2 with X11. It's not working yet, and I've spent a few hours trying to debug it without success so far, but I'll add it here and maybe I can revisit it at some point.

So - you will need to enable multiseat support - meaning create two Xorg servers, each with its own screen, card, input devices, but both should be started by lightdm. I managed to get a lightdm instance start two Xorg servers (note the HDMI output is upside down - that's a feature, not a bug!), but I can't login in the second server with a new user. Lightdm does the authentication correctly, but then returns back to the login screen and the logs are not helpful...

Here's lightdm's output running in debug mode with only seat-1 active:

Code: Select all

root@uy-scuti:~# lightdm --debug --test-mode
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.26.0, UID=0 PID=9019
[+0.00s] DEBUG: Loading configuration dirs from /var/lib/snapd/desktop/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-log-backup.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-guest-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.18s] DEBUG: Monitoring logind for seats
[+0.18s] DEBUG: New seat added from logind: seat0
[+0.18s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.18s] DEBUG: Seat seat0: Starting
[+0.18s] DEBUG: Seat seat0: Creating greeter session
[+0.18s] DEBUG: Seat seat0: Creating display server of type x
[+0.19s] DEBUG: Using VT 7
[+0.19s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.19s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.19s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.19s] DEBUG: XServer 0: Launching X Server
[+0.19s] DEBUG: Launching process 9034: /usr/bin/X -core :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.19s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.19s] DEBUG: New seat added from logind: seat-1
[+0.19s] DEBUG: Seat seat-1: Loading properties from config section Seat:*
[+0.19s] DEBUG: Seat seat-1: Loading properties from config section Seat:seat-1
[+0.19s] DEBUG: Seat seat-1 has property CanMultiSession=no
[+0.19s] DEBUG: Seat seat-1: Starting
[+0.19s] DEBUG: Seat seat-1: Creating greeter session
[+0.19s] DEBUG: Seat seat-1: Creating display server of type x
[+0.20s] DEBUG: Seat seat-1: Starting local X display
[+0.20s] DEBUG: XServer 1: Logging to /var/log/lightdm/x-1.log
[+0.21s] DEBUG: XServer 1: Writing X server authority to /run/lightdm/root/:1
[+0.21s] DEBUG: XServer 1: Launching X Server
[+0.21s] DEBUG: Launching process 9043: /usr/bin/X -core :1 -layout seat-1 -seat seat-1 -auth /run/lightdm/root/:1 -nolisten tcp
[+0.21s] DEBUG: XServer 1: Waiting for ready signal from X server :1
[+0.21s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.21s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.21s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat1
[+0.23s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.23s] DEBUG: User /org/freedesktop/Accounts/User1002 added
[+0.46s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.48s] DEBUG: User /org/freedesktop/Accounts/User1001 added
[+0.90s] DEBUG: Got signal 10 from process 9043
[+0.90s] DEBUG: XServer 1: Got signal from X server :1
[+0.90s] DEBUG: XServer 1: Connecting to XServer :1
[+0.93s] DEBUG: Seat seat-1: Display server ready, starting session authentication
[+0.93s] DEBUG: Session: Not setting XDG_VTNR
[+0.93s] DEBUG: Session pid=9075: Started with service 'lightdm-greeter', username 'lightdm'
[+1.04s] DEBUG: Session pid=9075: Authentication complete with return value 0: Success
[+1.04s] DEBUG: Seat seat-1: Session authenticated, running command
[+1.04s] DEBUG: Session pid=9075: Not setting XDG_VTNR
[+1.04s] DEBUG: Session pid=9075: Running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
[+1.04s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+1.04s] DEBUG: Session pid=9075: Logging to /var/log/lightdm/seat-1-greeter.log
[+1.39s] DEBUG: Got signal 10 from process 9034
[+1.39s] DEBUG: XServer 0: Got signal from X server :0
[+1.39s] DEBUG: XServer 0: Connecting to XServer :0
[+1.40s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.40s] DEBUG: Session pid=9091: Started with service 'lightdm-greeter', username 'lightdm'
[+1.51s] DEBUG: Session pid=9091: Authentication complete with return value 0: Success
[+1.51s] DEBUG: Seat seat0: Session authenticated, running command
[+1.51s] DEBUG: Session pid=9091: Running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
[+1.51s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+1.51s] DEBUG: Session pid=9091: Logging to /var/log/lightdm/seat0-greeter.log
[+1.55s] DEBUG: Activating VT 7
[+1.79s] DEBUG: Greeter connected version=1.26.0 api=1 resettable=false
[+2.22s] DEBUG: Greeter connected version=1.26.0 api=1 resettable=false
[+2.47s] DEBUG: User /org/freedesktop/Accounts/User118 added
[+4.63s] DEBUG: Greeter start authentication for odroid
[+4.63s] DEBUG: Session: Not setting XDG_VTNR
[+4.63s] DEBUG: Session pid=9326: Started with service 'lightdm', username 'odroid'
[+4.66s] DEBUG: Session pid=9326: Got 1 message(s) from PAM
[+4.66s] DEBUG: Prompt greeter with 1 message(s)
[+4.90s] DEBUG: Greeter start authentication for odroid
[+4.90s] DEBUG: Session pid=9328: Started with service 'lightdm', username 'odroid'
[+4.93s] DEBUG: Session pid=9328: Got 1 message(s) from PAM
[+4.93s] DEBUG: Prompt greeter with 1 message(s)
[+16.79s] DEBUG: Greeter start authentication for adrianp
[+16.79s] DEBUG: Session pid=9326: Sending SIGTERM
[+16.80s] DEBUG: Session: Not setting XDG_VTNR
[+16.80s] DEBUG: Session pid=9350: Started with service 'lightdm-autologin', username 'adrianp'
[+16.80s] DEBUG: Session pid=9326: Terminated with signal 15
[+16.80s] DEBUG: Session: Failed during authentication
[+16.80s] DEBUG: Seat seat-1: Session stopped
[+16.97s] DEBUG: Session pid=9350: Authentication complete with return value 0: Success
[+16.97s] DEBUG: Authenticate result for user adrianp: Success
[+16.97s] DEBUG: User adrianp authorized
[+16.97s] DEBUG: Greeter sets language en
[+17.03s] DEBUG: Greeter requests session mate
[+17.03s] DEBUG: Seat seat-1: Stopping greeter; display server will be re-used for user session
[+17.03s] DEBUG: Session pid=9075: Sending SIGTERM
[+17.05s] DEBUG: Session pid=9075: Exited with return value 0
[+17.05s] DEBUG: Seat seat-1: Session stopped
[+17.05s] DEBUG: Seat seat-1: Greeter stopped, running session
[+17.05s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+17.05s] DEBUG: Session pid=9350: Not setting XDG_VTNR
[+17.05s] DEBUG: Session pid=9350: Running command /etc/lightdm/Xsession mate-session
[+17.05s] DEBUG: Creating shared data directory /var/lib/lightdm-data/adrianp
[+17.05s] DEBUG: Session pid=9350: Logging to .xsession-errors

** (process:9350): WARNING **: 17:02:15.459: Failed to open CK session: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
[+17.12s] DEBUG: Session pid=9350: Exited with return value 1
[+17.12s] DEBUG: Seat seat-1: Session stopped
[+17.12s] DEBUG: Seat seat-1: Stopping display server, no sessions require it
[+17.12s] DEBUG: Sending signal 15 to process 9043
[+17.18s] DEBUG: Process 9043 exited with return value 0
[+17.18s] DEBUG: XServer 1: X server stopped
[+17.18s] DEBUG: XServer 1: Removing X server authority /run/lightdm/root/:1
[+17.18s] DEBUG: Seat seat-1: Display server stopped
[+17.18s] DEBUG: Seat seat-1: Active display server stopped, starting greeter
[+17.18s] DEBUG: Seat seat-1: Creating greeter session
[+17.18s] DEBUG: Seat seat-1: Creating display server of type x
[+17.18s] DEBUG: Seat seat-1: Starting local X display
[+17.18s] DEBUG: XServer 1: Logging to /var/log/lightdm/x-1.log
[+17.18s] DEBUG: XServer 1: Writing X server authority to /run/lightdm/root/:1
[+17.18s] DEBUG: XServer 1: Launching X Server
[+17.19s] DEBUG: Launching process 9359: /usr/bin/X -core :1 -layout seat-1 -seat seat-1 -auth /run/lightdm/root/:1 -nolisten tcp
[+17.19s] DEBUG: XServer 1: Waiting for ready signal from X server :1
[+17.50s] DEBUG: Got signal 10 from process 9359
[+17.50s] DEBUG: XServer 1: Got signal from X server :1
[+17.50s] DEBUG: XServer 1: Connecting to XServer :1
[+17.52s] DEBUG: Seat seat-1: Display server ready, starting session authentication
[+17.52s] DEBUG: Session: Not setting XDG_VTNR
[+17.52s] DEBUG: Session pid=9370: Started with service 'lightdm-greeter', username 'lightdm'
[+17.63s] DEBUG: Session pid=9370: Authentication complete with return value 0: Success
[+17.63s] DEBUG: Seat seat-1: Session authenticated, running command
[+17.63s] DEBUG: Session pid=9370: Not setting XDG_VTNR
[+17.63s] DEBUG: Session pid=9370: Running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
[+17.63s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+17.63s] DEBUG: Session pid=9370: Logging to /var/log/lightdm/seat-1-greeter.log
[+18.27s] DEBUG: Greeter connected version=1.26.0 api=1 resettable=false
[+20.23s] DEBUG: Greeter start authentication for odroid
[+20.23s] DEBUG: Session: Not setting XDG_VTNR
[+20.23s] DEBUG: Session pid=9504: Started with service 'lightdm', username 'odroid'
[+20.25s] DEBUG: Session pid=9504: Got 1 message(s) from PAM
[+20.25s] DEBUG: Prompt greeter with 1 message(s)
^C[+21.63s] DEBUG: Got signal 2 from process 0
[+21.64s] DEBUG: Caught Interrupt signal, shutting down
[+21.64s] DEBUG: Stopping display manager
[+21.64s] DEBUG: Seat seat0: Stopping
[+21.64s] DEBUG: Seat seat0: Stopping display server
[+21.64s] DEBUG: Sending signal 15 to process 9034
[+21.64s] DEBUG: Seat seat0: Stopping session
[+21.64s] DEBUG: Session pid=9091: Sending SIGTERM
[+21.64s] DEBUG: Seat seat0: Stopping session
[+21.64s] DEBUG: Session pid=9328: Sending SIGTERM
[+21.64s] DEBUG: Seat seat-1: Stopping
[+21.64s] DEBUG: Seat seat-1: Stopping display server
[+21.64s] DEBUG: Sending signal 15 to process 9359
[+21.64s] DEBUG: Seat seat-1: Stopping session
[+21.64s] DEBUG: Session pid=9370: Sending SIGTERM
[+21.64s] DEBUG: Seat seat-1: Stopping session
[+21.64s] DEBUG: Session pid=9504: Sending SIGTERM
[+21.64s] DEBUG: Session pid=9328: Terminated with signal 2
[+21.64s] DEBUG: Session: Failed during authentication
[+21.64s] DEBUG: Seat seat0: Session stopped
[+21.64s] DEBUG: Session pid=9504: Terminated with signal 2
[+21.64s] DEBUG: Session: Failed during authentication
[+21.64s] DEBUG: Seat seat-1: Session stopped
[+21.64s] DEBUG: Session pid=9091: Terminated with signal 2
[+21.65s] DEBUG: Seat seat0: Session stopped
[+21.67s] DEBUG: Session pid=9370: Terminated with signal 2
[+21.67s] DEBUG: Seat seat-1: Session stopped
[+21.83s] DEBUG: Process 9359 exited with return value 0
[+21.83s] DEBUG: XServer 1: X server stopped
[+21.83s] DEBUG: XServer 1: Removing X server authority /run/lightdm/root/:1
[+21.83s] DEBUG: Seat seat-1: Display server stopped
[+21.83s] DEBUG: Seat seat-1: Stopped
[+22.35s] DEBUG: Process 9034 exited with return value 0
[+22.35s] DEBUG: XServer 0: X server stopped
[+22.35s] DEBUG: Releasing VT 7
[+22.35s] DEBUG: XServer 0: Removing X server authority /run/lightdm/root/:0
[+22.35s] DEBUG: Seat seat0: Display server stopped
[+22.35s] DEBUG: Seat seat0: Stopped
[+22.35s] DEBUG: Display manager stopped
[+22.35s] DEBUG: Stopping daemon
[+22.36s] DEBUG: Exiting with return value 0

This is the relevant part of the output, but I can't put my finger on the problem. There's nothing in .xserver-errors for root nor for adrianp user:

Code: Select all

[+17.05s] DEBUG: Session pid=9350: Logging to .xsession-errors

** (process:9350): WARNING **: 17:02:15.459: Failed to open CK session: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
[+17.12s] DEBUG: Session pid=9350: Exited with return value 1
[+17.12s] DEBUG: Seat seat-1: Session stopped
[+17.12s] DEBUG: Seat seat-1: Stopping display server, no sessions require it
I tried to hijack the mate-session (which should get called by /usr/share/xsessions/mate.desktop), by creating a wrapper and doing some basic logging, but I was unable to have it log anything.

So I'm a bit stuck. I went with the old plan and I'm not running Xorg on fb0, but I would like to at some point...

Here are the configuration files (assumes a 3.5 LCD shield as /dev/fb2 and a VU7 as /dev/fb0). There are some input devices that may need tweaking (e.g. a logitech keyboard).
https://github.com/mad-ady/xorg-multiseat

Troubleshooting ideas welcome. :)

User avatar
rooted
Posts: 6912
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 274 times
Been thanked: 68 times
Contact:

Re: Xorg multiseat with 3.5 LCD shield and VU7

Unread post by rooted » Wed Nov 27, 2019 4:30 am

What are you trying to use the 3.5" shield for?

User avatar
mad_ady
Posts: 6874
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 241 times
Been thanked: 178 times
Contact:

Re: Xorg multiseat with 3.5 LCD shield and VU7

Unread post by mad_ady » Wed Nov 27, 2019 6:22 am

These users thanked the author mad_ady for the post:
rooted (Wed Nov 27, 2019 7:14 am)

User avatar
rooted
Posts: 6912
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 274 times
Been thanked: 68 times
Contact:

Re: Xorg multiseat with 3.5 LCD shield and VU7

Unread post by rooted » Wed Nov 27, 2019 7:14 am


mad_ady wrote:This: https://magazine.odroid.com/article/hom ... dashboard/ (check the ending)
That's a very nice automation project, I'm guessing Android can't interface with the 3.5" shield? I have one but my two C2's are pulling other duties so I never got around to working with it.

Good work, I always wanted to use an odroid for temperature automation.

User avatar
mad_ady
Posts: 6874
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 241 times
Been thanked: 178 times
Contact:

Re: Xorg multiseat with 3.5 LCD shield and VU7

Unread post by mad_ady » Wed Nov 27, 2019 3:46 pm

No, the 3.6" lcd is only supported under linux.
If you can use relays to control your heating device, then it's relatively easy to make it smart. But my advice is to do it in the summer when you can aford the possible downtime. (Did I tell you about that time (twice actually) when a bug in the automation turned my home into a sauna?) :)

Post Reply

Return to “3.5inch LCD Shield”

Who is online

Users browsing this forum: No registered users and 2 guests