Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Inconsistent behaviour of display managers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Sat Sep 28, 2019 10:07 am    Post subject: Inconsistent behaviour of display managers Reply with quote

Before I explain the problem, first some background: this is for a PC with via chrome GPU, which requires a special kernel for chrome drm and xf86-video-chrome.ebuild as video driver:
I wanted to use lightdm and lxqt as GUI, as I do that on all my PCs

However, when I start X using /etc/init/xdm results vary depending on the chosen displaymanager.
1 lightdm.
I just get a blank screen with blinking cursor topleft.

2. xdm without any changes to the configuration:
xdm starts, I can enter my userid/pass, but after enter, it thinks for a while and then returns to the login screen.

3. xdm with manually selected session.
Since I could nowhere choose the session with xdm, I looked for a configuration change, and finally wrote in /usr/lib/X11/xdm/Xsetup_0.
Code:

#!/bin/sh
startlxqt

After logging in as normal user, lxqt starts, mouse works, but keyboard not. However, when I start a terminal, I see thet I am actually started as root.

4. lxdm works as expected[/u] (not with the correct resolution, but that is for later).

So now for some diagnostic info:
1. I can start X from console as normal user without problem, and also the fact that lxdm works tells me the problem is not with the DE.

2. In Xorg.0.log (https://pastebin.com/29PzEL85) when I start with xdm or lightdm, I have an issue with
Quote:

[321864.220] (II) OPENCHROME: Driver for VIA Chrome chipsets: CLE266,
KM400 / KM400A / KN400 / P4M800, K8M800 / K8N800,
PM800 / PN800 / PM880 / CN333 / CN400, P4M800 Pro / VN800 / CN700,
CX700 / VX700, P4M890 / VN890 / CN800, K8M890 / K8N890,
P4M900 / VN896 / CN896, VX800 / VX820, VX855 / VX875, VX900
[321864.220] (++) using VT number 7

[321864.220] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[321864.220] (WW) xf86OpenConsole: setsid failed: Operation not permitted
[321864.226] (!!) VIA Technologies does not support this driver in any way.
[321864.228] (!!) For support, please refer to https://www.freedesktop.org/wiki/Openchrome/.
[321864.228] (!!) (openchrome 0.6.0 release)
[321864.228] (II) CHROME(0): viaPreInit

whereas when I start with lxdm (https://pastebin.com/270mSYZu), I don't see this anymore.
Given that xdm starts my session as root (here is /var/log/xdm.log stating things are running as root: https://pastebin.com/j4F0mJie), I think there must be somewhere a problem switching users. I have no idea what to check next.


I also add /var/log/lightdm/lightdm.log (https://pastebin.com/xFYXYpzb) which suggests that lightdm starts, but somehow does not manage to start the greeter.

The log for the working display manager: /var/log/lxdm.log: https://pastebin.com/FKmExSVg
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43994
Location: 56N 3W

PostPosted: Sat Sep 28, 2019 10:32 am    Post subject: Reply with quote

javeree,

Your kernel is missing DRM support.
Xorg.0.log:
[321864.229] (--) CHROME(0): Chipset revision: 0
[321864.232] (EE) CHROME(0): [drm] Failed to open DRM device for pci:0000:00:01.0: No such file or directory
...
[321864.682] (II) CHROME(0): Exiting iga2_crtc_dpms.
[321864.682] DRM memory allocation failed -6

On some chipsets, its not fatal, it just makes everything very slow.

Your video card is PCI 1106:1122. Google says thats a VX800/VX820 Chrome 9 HC3 Integrated Graphics.
That may just be CONFIG_DRM in the kernel.
CONFIG_DRM_FBDEV_EMULATION may be useful too.

Its not DRM_VIA under
Code:
Enable legacy drivers (DANGEROUS).


This won't help your mouse/keyboard issues.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Sat Sep 28, 2019 10:36 pm    Post subject: Reply with quote

I made some changes to this kernel:

CONFIG_DRM and CONFIG_DRM_FBDEV_EMULATION were already =y
I changed Enable legacy drivers (DANGEROUS) to NONE, and kept DRM_OPENCHROME.
The full config file for the openchrome specific kernel is here: https://pastebin.com/iE8Q3iZT

since I see in dmesg a lot of 'via_i2c_readbytes failed', I also added CONFIG_I2C_VIAPRO
Code:

2206,2207c2206,2207
< # CONFIG_I2C_VIA is not set
< # CONFIG_I2C_VIAPRO is not set
---
> CONFIG_I2C_VIA=m
> CONFIG_I2C_VIAPRO=m
2795,2796c2795
< CONFIG_DRM_TTM=m
< CONFIG_DRM_VM=y
---
> CONFIG_DRM_TTM=y
2822c2821
< CONFIG_DRM_OPENCHROME=m
---
> CONFIG_DRM_OPENCHROME=y
2825d2823
< CONFIG_DRM_ATI_PCIGART=y
2854,2859c2852
< CONFIG_DRM_LEGACY=y
< # CONFIG_DRM_TDFX is not set
< # CONFIG_DRM_R128 is not set
< # CONFIG_DRM_MGA is not set
< # CONFIG_DRM_SIS is not set
< # CONFIG_DRM_SAVAGE is not set
---
> # CONFIG_DRM_LEGACY is not set


After recompilation and reboot, the results were quite similar:
lxqt shows a cursor, lxdm works. the diff between Xorg.0.log with lxqt/lxdm now is
Code:
<  (==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 28 23:54:08 2019
---
>  (==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 28 23:52:31 2019
36c36
<  (II) Loader magic: 0x6f9640
---
>  (II) Loader magic: 0x72d640
62d61
<  (WW) xf86OpenConsole: setpgid failed: Operation not permitted
463a463,473
>  (II) event2  - Power Button: device removed
>  (II) event0  - Power Button: device removed
>  (II) event1  - Sleep Button: device removed
>  (II) event3  - CHICONY HP Basic USB Keyboard: device removed
>  (II) event4  - Logitech USB Optical Mouse: device removed
>  (II) UnloadModule: "libinput"
>  (II) UnloadModule: "libinput"
>  (II) UnloadModule: "libinput"
>  (II) UnloadModule: "libinput"
>  (II) UnloadModule: "libinput"
>  (II) Server terminated successfully (0). Closing log file.


So one step forward is that the error 'xf86OpenConsole: setsid failed: Operation not permitted' disappeared, but the one for setpgid remained
Also in both cases, I now see '(II) xfree86: Adding drm device (/dev/dri/card0)' https://pastebin.com/vGh6SJru
I still get a bunch of via_i2c_readbytes failed messages in dmesg https://pastebin.com/LEG0niK3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43994
Location: 56N 3W

PostPosted: Sun Sep 29, 2019 7:50 am    Post subject: Reply with quote

javeree,

To check your kernel for i2c, I need the output of
Code:
lspci -knn

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Sun Sep 29, 2019 11:48 am    Post subject: Reply with quote

lspci -knn https://pastebin.com/aQbruvBy
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Sun Sep 29, 2019 12:01 pm    Post subject: Reply with quote

I think my problem may be related to one of these very old ubuntu bugs:

https://bugs.launchpad.net/ubuntu/+source/xdm/+bug/585853
or
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/799069

the first bug is mad invalid due to old age (and was rather xdm related than lightdm), in the second bug, there is talk about a bug that has since been removed, but no reference to the actual patch. In both cases, it seems related to some part of startup code (upstart/plymouth) holding on to a tty, when the display manager expects it to have been released.

Just to be sure, I'll upgrade lightdm to unstable 1.30 to test if it changes anything.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43994
Location: 56N 3W

PostPosted: Sun Sep 29, 2019 1:42 pm    Post subject: Reply with quote

javeree,

I was being lazy by asking for lspci -nnk.
Notice how everything that is supposed to have a hardware kernel driver does.
As hardware drives only work the the hardware they are designed for, we can tell that the bottom layer is OK.

Your kernel has
Code:
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m
lspci shows that Kernel modules: i2c_viapro is in use.

The dmesg errors via_i2c_readbytes failed happen before your display manager is started, so its in the clear.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Sun Sep 29, 2019 3:39 pm    Post subject: Reply with quote

Thanks

So far, upgrading lightdm did not change anything, but comparing lightdm.log between this one and a working PC, I see

Quote:
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=8298
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/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: Using D-Bus name org.freedesktop.DisplayManager
[+0.02s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.02s] WARNING: Failed to get system bus: Could not connect: No such file or directory
[+0.02s] DEBUG: Adding default seat
[+0.02s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.02s] DEBUG: Seat seat0: Starting
[+0.02s] DEBUG: Seat seat0: Creating greeter session
[+0.02s] DEBUG: Seat seat0: Creating display server of type x
[+0.02s] DEBUG: posix_spawn avoided (fd close requested)
[+0.03s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.03s] DEBUG: Using VT 7
[+0.03s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.03s] DEBUG: XServer 1: Logging to /var/log/lightdm/x-0.log
[+0.03s] DEBUG: XServer 1: Writing X server authority to /var/run/lightdm/root/:0
[+0.03s] DEBUG: XServer 1: Launching X Server
[+0.04s] DEBUG: Launching process 8309: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch
[+0.04s] DEBUG: XServer 1: Waiting for ready signal from X server :0


versus

Quote:
[+0.02s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.02s] DEBUG: Starting Light Display Manager 1.28.0, UID=0 PID=4440
[+0.02s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.02s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.02s] DEBUG: [LightDM] contains unknown option session-wrapper
[+0.02s] DEBUG: Registered seat module local
[+0.03s] DEBUG: Registered seat module xremote
[+0.03s] DEBUG: Registered seat module unity
[+0.03s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.35s] WARNING: Failed to get list of logind seats: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.login1 was not provided by any .service files
[+0.35s] DEBUG: Adding default seat
[+0.35s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.35s] DEBUG: Seat seat0: Starting
[+0.35s] DEBUG: Seat seat0: Creating greeter session
[+0.42s] DEBUG: Seat seat0: Creating display server of type x
[+0.42s] DEBUG: posix_spawn avoided (fd close requested)
[+0.43s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.43s] DEBUG: Using VT 7
[+0.43s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.43s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.84s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.84s] DEBUG: XServer 0: Launching X Server
[+0.84s] DEBUG: Launching process 4491: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.84s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.84s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.84s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Sun Sep 29, 2019 4:20 pm    Post subject: Reply with quote

Success !

It turns out that dbus was not started (even though /etc/init.d/dbus contains the line 'use consolekit dbus xfs')
So after manually starting it I got lightdm started, and could use it to login as standard user.

Xorg.0.log https://pastebin.com/UgMWBu9t

There seems to be DRM:

Quote:
[ 14636.687] (II) CHROME(0): OpenChrome DRM detected.
[ 14636.689] (II) CHROME(0): OpenChrome DRM Version: 3.1.13
[ 14636.689] (II) CHROME(0): KMS is supported by OpenChrome DRM.
[ 14636.689] (==) CHROME(0): Shadow framebuffer is disabled.
[ 14636.689] (==) CHROME(0): Hardware acceleration is disabled.
[ 14636.689] (==) CHROME(0): Using hardware two-color cursors and software full-color cursors.
[ 14636.689] (==) CHROME(0): GPU virtual command queue will be enabled.
[ 14636.689] (==) CHROME(0): DRI IRQ will be enabled if DRI is enabled.
[ 14636.689] (==) CHROME(0): AGP DMA will be disabled if DRI is enabled.
[ 14636.689] (==) CHROME(0): PCI DMA will not be used for XV image transfer if DRI is enabled.


but no opengl (I have to check if that is even supported with this chip)
Quote:
[ 14637.016] (II) AIGLX: Screen 0 is not DRI2 capable
[ 14637.180] (II) IGLX: Loaded and initialized swrast
[ 14637.180] (II) GLX: Initialized DRISWRAST GL provider for screen 0


Apparently, there is also no xv mpv -vo xv tells me there is no XVideo, so that is the next step to investigate.
Thanks so far. Even just having someone to chat to while looking for solutions helps a lot.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43994
Location: 56N 3W

PostPosted: Sun Sep 29, 2019 5:10 pm    Post subject: Reply with quote

javeree,

See man openchrome

There are some interesting 'go faster' options worth trying there.
As you have the openchrome driver installed, you should have its man page locally too.
That should be up to date with the version of openchrome you have installed.

Code:
[ 14636.689] (==) CHROME(0): Hardware acceleration is disabled.
is something to work on.
Is your normal user in the video group?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 368

PostPosted: Mon Sep 30, 2019 7:55 am    Post subject: Reply with quote

I had compiled the kernel openchrome-drm-openchrome https://github.com/freedesktop/openchrome-drm-openchrome, assuming that it would contain improvements that would help with the xf86-openchrome driver.

Turns out that this kernel is being developed to enable kernel modeswitching for openchrome, but when I looked in the xf86-openchrome driver source code, I saw that hardware acceleration gets disabled when kms is activated. So when I switched back to a vanilla kernel without KMS, 2D hardware acceleration (which is all I need) started working.

I guess I'll keep an eye out on Kevin Brace's blog to see if he ever gets KMS and acceleration working together.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum