Pmbootstrap: [hammerhead] Xorg doesn't start properly

Created on 16 Oct 2017  ·  26Comments  ·  Source: postmarketOS/pmbootstrap

When I try running xfce on the hammerhead Xorg doesn't start:

X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.19 armv8l Alpine Linux
Current Operating System: Linux localhost 3.4.0 #11-Alpine SMP PREEMPT Mon Oct 16 12:34:11 GMT 2017 armv7l
Kernel command line: console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 uart_console=enable gpt=enable lge.kcal=0|0|0|x lge.rev=rev_11 androidboot.laf androidboot.emmc=true fastboot=true androidboot.serialno=02c790c20937bd48 androidboot.bootloader=HHZ20h androidboot.baseband=msm androidboot.hardware.sku=D821 androidboot.hardware.ddr=hynix androidboot.hardware.display=orise androidboot.revision=11
Build Date: 20 September 2017  07:53:06AM

Current version of pixman: 0.34.0
    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: Sun Mar  1 05:00:13 1970
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xfce4-session: No GPG agent found

(xfce4-session:2526): xfce4-session-WARNING **: xfsm_manager_load_session: Something wrong with /home/martijn/.cache/sessions/xfce4-session-localhost:0, Does it exist? Permissions issue?

(xfwm4:2538): Gdk-WARNING **: shmget failed: error 38 (Function not implemented)

** (xfdesktop:2546): WARNING **: Thumbnailer failed calling GetFlavors

(xfsettingsd:2548): xfsettingsd-WARNING **: Failed to get the _NET_NUMBER_OF_DESKTOPS property.

(xfce4-session:2526): xfce4-session-WARNING **: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)

(xfce4-session:2526): xfce4-session-WARNING **: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)

(xfwm4:2538): xfwm4-WARNING **: Cannot find visual format on screen 0
(EE) Segmentation fault at address 0x4
(EE) 
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
xfce4-session-Message: Got disconnected from D-Bus.  Unless this happened during session shutdown, this is probably a bad thing.
xfce4-session: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
xinit: connection to X server lost

waiting for X server to shut down xfwm4: Fatal IO error 4 (Interrupted system call) on X server :0.0.
xfsettingsd: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
xfdesktop: Fatal IO error 4 (Interrupted system call) on X server :0.0.
bug device

All 26 comments

On my phone i see it error in xfce4. +1

@MartijnBraam I noticed the error with "shmget failed": would enabling SysV IPC in the kernel help?

Alpine provides xorg-server-dbg with debug symbols. I would try to install that, then run the X11 server in gdb and get a backtrace of where it segfaults.

That looks pretty similar to a segfault soon after starting that I noticed on lg-mako.
Does it also happen if you just start Xorg by itself without XFCE?
@zhenyolka, on which device did you see this?

Xorg starts fine without xfce it seems, but my screen stays black (I guess I should see the checkerboard pattern for an empty x session)

@MartijnBraam: I think X shows a black screen by default. Try running a X program e.g. DISPLAY=:0 postmarketos-demos.

@AeternaMia: lg-mako also had problems with XWayland, that's why it is disabled in weston for this device. Could you open an extra issue for the segfault, with a log if possible?

@AeternaMia device LG d285

It would also be interesting if Hildon worked.

@MartijnBraam (or anyone else who has a hammerhead):
This might be fixed by enabling SYSVIPC (see #809) as @zhuowei observed.

@ollieparanoid enabling SYSVIPC fix only shmget failed: error 38 (Function not implemented). But it not fix
main error Cannot find visual format on screen 0. i see xfce4 code. xfce4 exiting if it find error Cannot find visual format on screen 0, because segfault.Xfce shutdown after it find error Cannot find visual format on screen 0

Thanks for trying it out! Could you try if hildon starts on your hammerhead?

@ollieparanoid I not have hammerhead, but I have LG l65 with similar error. My pc is very old. I cant compile hildon, I can only compile kernel for my device, but it 3 hourse. If you have prebuilt hildon can you send me prebuild packages?

@zhenyolka: wow, cool that you go through all the effort just to run pmbootstrap!

Could you test the following?

  • Use your XFCE installation, but also install xterm
  • Edit /etc/profile.d/start_xfce4.sh and replace startxfce4 > ~/x11.log 2>&1 with startx > ~/x11.log 2>&1
  • Create ~/user/.xinitrc with:
#!/bin/sh
xterm
  • restart your phone and report if X11 with a terminal comes up.

@ollieparanoid it works. I try. But backround in xterm is blue, normal color is white, but it my problem with phone. How fix inverted colors? I have not all colors inverted, only 2: blue replace red, red replace blue. It error look like red screen in weston. I think cannot find visual format error, because I have inverted colors.

I have error with xfce4 and mate in all system. Android with linuxdeploy, twrp with chroot,and postmarkrtos. I think I have it and inverted colors bug,because I have not normal framebuffer device.

Thanks for trying it out! You could try to create a Xorg configuration file, that sets another color mode (ARGB instead of RGBA fixed the weston red screen bug).

I've tried running hildon on the hammerhead, that also doesn't show me anything but I get other errors in the xorg log

https://gist.github.com/anonymous/88ea9e5c1fd0be4a3cb54362ecea7c7a

@MartijnBraam can you send prebuilt hildon binaries? If you send i try configure xorg to need configuration and send it you.
Now you can try this configuration:
create file /etc/X11/xorg.conf or change it to:

Section "ServerLayout"
        Identifier "Layout0"
        Screen "Screen0"
EndSection

Section "Device"
        Identifier "Card0"
        Driver "fbdev"
        Option "fbdev" "/dev/fb0"
        #Option "Rotate" "CW"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device "Card0"
        DefaultDepth 24
        SubSection "Display"
                Depth 24
        EndSubSection
EndSection

But please send prebuilt hildon package.

Just to chime in, sorry for not much information. I have a grouper and I chose xfce4 as my display. Upon boot I get an orange screen with onscreen keyboard (and this is with encryption).
Without encryption, with xfce4 upon boot I get a black screen.
Edit - with @ollieparanoid 's help it builds just fine though.

@computer777: you wrote in #834, that weston and networking is available now, but X11 based desktops still don't work. Could you flash an image with Hildon or X11 and report what the syslog says? To do that, log in via SSH and run:

logread | grep x11

@zhenyolka: here's a WIP binary repo with some pre-built packages:
https://github.com/postmarketOS/binary-package-repo

@MartijnBraam hildon not work for me, but i known how start xfce. I think need patch kernel to fix visual format error.I try and write in this issue.

@MartijnBraam need "fix_mdss_fb_rgb_mode" patch. You can find patch in linux-huawei-y530 package.
I successfull start xfce4, and all works.
P.S.For correct start xfce4 need this xorg.conf

Section "ServerLayout"
        Identifier "Layout0"
        Screen "Screen0"
EndSection

Section "Device"
        Identifier "Card0"
        Driver "fbdev"
        Option "fbdev" "/dev/fb0" #linuxdeploy
        #Option "Rotate" "CW"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device "Card0"
        DefaultDepth 24
        SubSection "Display"
                Depth 32
        EndSubSection
EndSection

Section "ServerFlags"
        Option "Pixmap" "24"
EndSection

Can anybody write my solve of this problem to wiki page? I cant(not have permission).

Thanks a lot for figuring this out! I've posted it in the wiki:
https://wiki.postmarketos.org/wiki/Troubleshooting:Xorg

You should be able to edit the wiki though, were you logged in? Registration doesn't even require an e-mail address.

PS: Since compiling takes long on your PC, in case you missed it, we have the binary repository officially integrated now \o/

@MartijnBraam: could you verify that this also works on your device, and adjust your device's packaging, so we can close this issue?

I've testted and packaged @zhenyolka's suggestions in #924

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhuowei picture zhuowei  ·  4Comments

erhoof picture erhoof  ·  4Comments

craftyguy picture craftyguy  ·  7Comments

MartijnBraam picture MartijnBraam  ·  5Comments

ollieparanoid picture ollieparanoid  ·  5Comments