I don't believe this is the same issue as above, but I will followup here since this issue is open and its title matches my case.
My mako boots to a black screen. In my case, it is weston that fails to start.
In dmesg I have
[ 1749.601348] elogind-daemon[3189]: Failed to determine whether /sys/fs/cgroup is a mount point: Symbolic link loop[ 1749.602386] elogind-daemon[3189]: Failed to mount cgroup at /sys/fs/cgroup/elogind: No such file or directory[ 1749.602447] elogind-daemon[3189]: Failed to allocate manager object: Symbolic link loop
and logread shows
Oct 9 16:28:06 lg-mako daemon.info supervise-daemon[3175]: Supervisor command line: supervise-daemon lightdm --start /usr/bin/lightdm -- Oct 9 16:28:06 lg-mako daemon.info supervise-daemon[3177]: Child command line: /usr/bin/lightdm Oct 9 16:28:06 lg-mako daemon.info dbus-daemon[1240]: [system] Activating service name='org.freedesktop.login1' requested by ':1.54' (uid=0 pid=3177 comm="/usr/bin/lightdm " label="kernel") (using servicehelper)Oct 9 16:28:31 lg-mako auth.notice dbus-daemon[1240]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)Oct 9 16:28:31 lg-mako authpriv.info : pam_unix(lightdm-autologin:session): session opened for user user by (uid=0)Oct 9 16:28:31 lg-mako daemon.info dbus-daemon[1240]: [system] Activating service name='org.freedesktop.login1' requested by ':1.56' (uid=0 pid=3197 comm="lightdm --session-child 11 14 " label="kernel") (using servicehelper)Oct 9 16:28:56 lg-mako auth.notice dbus-daemon[1240]: [system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)Oct 9 16:28:56 lg-mako authpriv.err : pam_elogind(lightdm-autologin:session): Failed to create session: Operation timed outOct 9 16:28:57 lg-mako user.notice user:weston: Date: 2019-10-09 -03Oct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.011] weston 7.0.0Oct 9 16:28:57 lg-mako user.notice user:weston: https://wayland.freedesktop.orgOct 9 16:28:57 lg-mako user.notice user:weston: Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/Oct 9 16:28:57 lg-mako user.notice user:weston: Build: v20190809-679-g4a31b325d3Oct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.011] Command line: weston -c /etc/xdg/weston/weston.iniOct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.011] OS: Linux, 3.4.0-lineageos, #11-postmarketOS SMP PREEMPT Mon Dec 3 21:41:15 UTC 2018, armv7lOct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.011] Using config file '/etc/xdg/weston/weston.ini'Oct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.012] Output repaint window is 7 ms maximum.Oct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.012] Loading module '/usr/lib/libweston-7/fbdev-backend.so'Oct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.015] initializing fbdev backendOct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.017] logind: not running in a systemd sessionOct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.017] logind: cannot setup systemd-logind helper (-61), using legacy fallbackOct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.018] fatal: fbdev backend should be run using weston-launch binary, or your system should provide the logind D-Bus API.Oct 9 16:28:57 lg-mako user.notice user:weston: [16:28:57.018] fatal: failed to create compositor backendOct 9 16:28:57 lg-mako authpriv.info : pam_unix(lightdm-autologin:session): session closed for user userOct 9 16:28:57 lg-mako daemon.warn supervise-daemon[3176]: /usr/bin/lightdm, pid 3177, exited with return code 1Oct 9 16:28:57 lg-mako daemon.info supervise-daemon[3218]: Child command line: /usr/bin/lightdm Oct 9 16:28:57 lg-mako daemon.info dbus-daemon[1240]: [system] Activating service name='org.freedesktop.login1' requested by ':1.57' (uid=0 pid=3218 comm="/usr/bin/lightdm " label="kernel") (using servicehelper)
I can reproduce the issue, just tried to boot lg-mako to test a merge request and it bootest straight to blackscreen, even with pmaports.git master. I've tried xfce4 and weston.
Directly afterwards, I've tried weston with the samsung-i9100 and that worked. So it seems to be a lg-mako specific issue.
Unfortunately I don't have any time to debug this (working on postmarketOS infrastructure... and going through MR/issues backlog), but at least here's an additional data point. Thanks to everybody who's looking into it.
I tried a fresh installation using xfce4 today. mako still boots to a black screen. Here follows the full Xorg.logXorg.0.log, where X crashes with a segfault:
[ 138.401] (EE) Segmentation fault at address 0x4[ 138.401] (EE) Fatal server error:[ 138.401] (EE) Caught signal 11 (Segmentation fault). Server aborting[ 138.402] (EE) [ 138.402] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 138.402] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.[ 138.402] (EE) [ 138.661] (EE) Server terminated with error (1). Closing log file.
I have no clue as to where to start. Anyone has a working X running on mako and can post a full Xorg.log for comparison?
lightdm fails to start xfce4 session, and as there is no greater installed, a black screen remains. If lightdm-gtk-greater is installed, it shows up after a while.
Still no clues as to why xfce4 session does not start though:
[+0.05s] DEBUG: Launching process 3880: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch[+0.05s] DEBUG: XServer 0: Waiting for ready signal from X server :0...[+1.73s] DEBUG: Got signal 10 (SIGUSR1) from process 3880...[+1.80s] DEBUG: Session pid=3889: Running command /usr/bin/lightdm-session startxfce4...[+1.81s] DEBUG: Activating VT 7[+11.09s] DEBUG: Process 3880 terminated with signal 6 (SIGABRT)[+11.09s] DEBUG: XServer 0: X server stopped[+11.09s] DEBUG: Releasing VT 7...[+11.09s] DEBUG: Seat seat0: Active display server stopped, starting greeter[+11.09s] DEBUG: Seat seat0: Creating greeter session[+11.09s] DEBUG: Seat seat0: Failed to find session configuration lightdm-gtk-greeter[+11.09s] DEBUG: Seat seat0: Stopping; failed to start a greeter...
lg-mako:~# cat /home/user/.xsession-errorssh: a: unknown operand<stdin>:0: warning: Unknown encoding: C.UTF-8 gpg-agent[4329]: WARNING: "--write-env-file" is an obsolete option - it has no effectgpg-agent: a gpg-agent is already running - not starting a new one(xfce4-session:4293): xfce4-session-WARNING **: 16:50:30.528: gpg-agent returned no PID in the variables(xfce4-session:4293): xfce4-session-WARNING **: 16:50:30.542: xfsm_manager_load_session: Something wrong with /home/user/.cache/sessions/xfce4-session-lg-mako:0, Does it exist? Permissions issue?xfsettingsd: No window manager registered on screen 0.(xfsettingsd:4336): xfsettingsd-WARNING **: 16:50:37.374: Failed to get the _NET_NUMBER_OF_DESKTOPS property.xfce4-panel: No window manager registered on screen 0. To start the panel without this check, run with --disable-wm-check.Gdk-Message: 16:50:38.299: xfsettingsd: Fatal IO error 11 (Resource temporarily unavailable) on X server :0..Gdk-Message: 16:50:38.301: xfce4-panel: Fatal IO error 0 (No error information) on X server :0.
I spent a bit of time playing around, and this is what I have so far.
I picked the i3wm UI at pmbootstrap init time. As with everyone else in this issue, the display turns black after flashing the postmarketOS logo for a second, and after that the backlight turns on and off a few times but there's no other sign of activity.
I can ssh into the device, and from there see that Xorg is started, along with the i3 tools, but eventually dies.
Once logged in via ssh, I can run Xorg :0 and in one screen window and then run simple applications such as xeyes and xterm successfully: they show up on the phone's display, and I can move the cursor around with my finger. I can even run simple WMs such as Openbox and Window Maker without issues - though everything has a blue tint, reminiscent of the red tint bug that IIUC affected the device a while ago.
However, as soon as I try to run i3 or spectrwm, Xorg crashes.
When I try running Xorg under gdb, after installing musl-dbg and xorg-server-dbg, this is the result:
lg-mako:~$ sudo gdb --args Xorg :0GNU gdb (GDB) 9.1Copyright (C) 2020 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.Type "show copying" and "show warranty" for details.This GDB was configured as "armv6-alpine-linux-musleabihf".Type "show configuration" for configuration details.For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from X...Reading symbols from /usr/lib/debug//usr/bin/Xorg.debug...(gdb) b CreatePictureBreakpoint 1 at 0x104854: file picture.c, line 751.(gdb) rStarting program: /usr/bin/Xorg :0X.Org X Server 1.20.7X Protocol Version 11, Revision 0Build Operating System: Linux 4.19.78-1-vanilla armv8l Alpine LinuxCurrent Operating System: Linux lg-mako 3.4.0-lineageos #11-postmarketOS SMP PREEMPT Tue Nov 5 05:56:49 UTC 2019 armv7lKernel command line: uart_console=enable lcd_maker_id=primary lge.hreset=off lge.reset=mode_reset gpt=enable lge.kcal=0|0|0|x lge.rev=rev_11 androidboot.emmc=true androidboot.serialno=02207948d357d5d8 androidboot.bootloader=MAKOZ30f androidboot.baseband=mdmBuild Date: 14 January 2020 04:18:43PMCurrent version of pixman: 0.38.4 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version.Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown.(==) Log file: "/var/log/Xorg.0.log", Time: Fri Feb 28 02:22:27 2020(==) Using system config directory "/usr/share/X11/xorg.conf.d"[New LWP 2206][New LWP 2207][New LWP 2208][New LWP 2209][New LWP 2210][New LWP 2211][New LWP 2212][New LWP 2213][Detaching after fork from child process 2214]The XKEYBOARD keymap compiler (xkbcomp) reports:> Internal error: Could not resolve keysym XF86FullScreenErrors from xkbcomp are not fatal to the X server[New LWP 2215]Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=2097166, pDrawable=0xb72362c0, pFormat=0xb6f59e20, vmask=1024, vlist=vlist@entry=0xb7209510, client=client@entry=0xb71edb90, error=0xbeef8cd8, error@entry=0xbeef8cd0) at picture.c:751751 picture.c: No such file or directory.(gdb) disp pFormat1: pFormat = (PictFormatPtr) 0xb6f59e20(gdb) cContinuing.Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=2097185, pDrawable=0xb7236ed0, pFormat=0xb6f59e20, vmask=384, vlist=vlist@entry=0xb7209528, client=client@entry=0xb71edb90, error=0xbeef8cd8, error@entry=0xbeef8cd0) at picture.c:751751 in picture.c1: pFormat = (PictFormatPtr) 0xb6f59e20(gdb) cContinuing.Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=2097185, pDrawable=0xb7236a90, pFormat=0xb6f59e20, vmask=1024, vlist=vlist@entry=0xb7209510, client=client@entry=0xb71edb90, error=0xbeef8cd8, error@entry=0xbeef8cd0) at picture.c:751751 in picture.c1: pFormat = (PictFormatPtr) 0xb6f59e20(gdb) cContinuing.Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=2097188, pDrawable=0xb7237ca0, pFormat=0xb6f59e20, vmask=384, vlist=vlist@entry=0xb7209528, client=client@entry=0xb71edb90, error=0xbeef8cd8, error@entry=0xbeef8cd0) at picture.c:751751 in picture.c1: pFormat = (PictFormatPtr) 0xb6f59e20(gdb) cContinuing.Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=2097188, pDrawable=0xb727b480, pFormat=0xb6f59e20, vmask=1024, vlist=vlist@entry=0xb7209520, client=client@entry=0xb71edb90, error=0xbeef8cd8, error@entry=0xbeef8cd0) at picture.c:751751 in picture.c1: pFormat = (PictFormatPtr) 0xb6f59e20Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=2097212, pDrawable=0xb727b880, pFormat=0xb6f59e20, vmask=384, vlist=vlist@entry=0xb7209538, client=client@entry=0xb71edb90, error=0xbeef8cd8, error@entry=0xbeef8cd0) at picture.c:751751 in picture.c1: pFormat = (PictFormatPtr) 0xb6f59e20(gdb) cContinuing.Thread 1 "X" hit Breakpoint 1, CreatePicture (pid=pid@entry=0, pDrawable=pDrawable@entry=0xb6fc9970, pFormat=0x0, pFormat@entry=0xbeef8c3c, vmask=vmask@entry=256, vlist=0xbeef8c1c, vlist@entry=0xbeef8c14, client=0xb6943e70, error=error@entry=0xbeef8c20) at picture.c:751751 in picture.c1: pFormat = (PictFormatPtr) 0x0(gdb) cContinuing.Thread 1 "X" received signal SIGSEGV, Segmentation fault.0xb6e5f8d0 in CreatePicture (pid=pid@entry=0, pDrawable=pDrawable@entry=0xb6fc9970, pFormat=0x0, pFormat@entry=0xbeef8c3c, vmask=vmask@entry=256, vlist=0xbeef8c1c, vlist@entry=0xbeef8c14, client=0xb6943e70, error=error@entry=0xbeef8c20) at picture.c:763763 in picture.c1: pFormat = (PictFormatPtr) 0x0(gdb) bt#0 0xb6e5f8d0 in CreatePicture (pid=pid@entry=0, pDrawable=pDrawable@entry=0xb6fc9970, pFormat=0x0, pFormat@entry=0xbeef8c3c, vmask=vmask@entry=256, vlist=0xbeef8c1c, vlist@entry=0xbeef8c14, client=0xb6943e70, error=error@entry=0xbeef8c20) at picture.c:763#1 0xb6e203e8 in compNewPixmap (pWin=pWin@entry=0xb727b480, x=490, y=-1225371280, w=304, h=18) at compalloc.c:567#2 0xb6e21168 in compAllocPixmap (pWin=pWin@entry=0xb727b480) at compalloc.c:604#3 0xb6e1f7e0 in compCheckRedirect (pWin=pWin@entry=0xb727b480) at compwindow.c:167#4 0xb6e1f894 in compRealizeWindow (pWin=0xb727b480) at compwindow.c:267#5 0xb6dc7d78 in RealizeTree (pWin=pWin@entry=0xb727b480) at window.c:2617#6 0xb6dca9f4 in MapWindow (client=0xb71edb90, pWin=0xb727b480) at window.c:2694#7 MapWindow (pWin=0xb727b480, client=client@entry=0xb71edb90) at window.c:2665#8 0xb6d9b714 in ProcMapWindow (client=0xb71edb90) at dispatch.c:845#9 0xb6da2030 in Dispatch () at dispatch.c:478#10 0xb6da5da0 in dix_main (argc=2, argv=0xbeef8db4, envp=<optimized out>) at main.c:276#11 0xb6cdf7a8 in libc_start_main_stage2 (main=0xb6d8fe04 <main>, argc=2, argv=0xbeef8db4) at src/env/__libc_start_main.c:94#12 0xb6d8fe78 in _start_c (p=<optimized out>) at crt/crt1.c:18#13 0xb6d8fe28 in _start () at render.c:2065Backtrace stopped: previous frame identical to this frame (corrupt stack?)(gdb)
PicturePtrCreatePicture(Picture pid, DrawablePtr pDrawable, PictFormatPtr pFormat, Mask vmask, XID *vlist, ClientPtr client, int *error){ PicturePtr pPicture; PictureScreenPtr ps = GetPictureScreen(pDrawable->pScreen); pPicture = dixAllocateScreenObjectWithPrivates(pDrawable->pScreen, PictureRec, PRIVATE_PICTURE); if (!pPicture) { *error = BadAlloc; return 0; } pPicture->id = pid; pPicture->pDrawable = pDrawable; pPicture->pFormat = pFormat; /* This is where the crash happens */ pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24);
So when pFormat is NULL, as is the case in the last iteration, dereferencing it will result in a crash.
Now, why you'd end up in a situation where the pointer is NULL in the first place... I have no idea O:-)
Interestingly, gdb displays different values for pFormat and pFormat@entry, suggesting that the value was changed after the function has been called, but that doesn't make a whole lot of sense to me: when setting the breakpoint to the function and displaying the value immediately, it's already NULL.
Another thing to note is that the whole "corrupt stack" thing might be a red herring, because it shows up in the backtrace even for previous iterations, where the function works correctly and doesn't result in a crash.