This repository has been archived by the owner. It is now read-only.

[hammerhead] Xorg doesn't start properly #779

Closed
MartijnBraam opened this Issue Oct 16, 2017 · 26 comments

Comments

Projects
None yet
6 participants
@MartijnBraam
Member

MartijnBraam commented Oct 16, 2017

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.

@MartijnBraam MartijnBraam self-assigned this Oct 16, 2017

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 16, 2017

Contributor

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

Contributor

zhenyolka commented Oct 16, 2017

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

@zhuowei

This comment has been minimized.

Show comment
Hide comment
@zhuowei

zhuowei Oct 16, 2017

Collaborator

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

Collaborator

zhuowei commented Oct 16, 2017

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

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 16, 2017

Member

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.

Member

ollieparanoid commented Oct 16, 2017

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.

@AeternaMia

This comment has been minimized.

Show comment
Hide comment
@AeternaMia

AeternaMia Oct 17, 2017

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?

AeternaMia commented Oct 17, 2017

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?

@MartijnBraam

This comment has been minimized.

Show comment
Hide comment
@MartijnBraam

MartijnBraam Oct 17, 2017

Member

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)

Member

MartijnBraam commented Oct 17, 2017

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)

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 17, 2017

Member

@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?

Member

ollieparanoid commented Oct 17, 2017

@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?

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 18, 2017

Contributor

@AeternaMia device LG d285

Contributor

zhenyolka commented Oct 18, 2017

@AeternaMia device LG d285

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 18, 2017

Member

It would also be interesting if Hildon worked.

Member

ollieparanoid commented Oct 18, 2017

It would also be interesting if Hildon worked.

@zhuowei zhuowei referenced this issue Oct 22, 2017

Merged

Add SYSVIPC kernel config check #809

18 of 18 tasks complete
@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 22, 2017

Member

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

Member

ollieparanoid commented Oct 22, 2017

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

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 23, 2017

Contributor

@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

Contributor

zhenyolka commented Oct 23, 2017

@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

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 23, 2017

Member

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

Member

ollieparanoid commented Oct 23, 2017

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

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 24, 2017

Contributor

@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?

Contributor

zhenyolka commented Oct 24, 2017

@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?

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 24, 2017

Member

@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.
Member

ollieparanoid commented Oct 24, 2017

@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.
@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 24, 2017

Contributor

@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.

Contributor

zhenyolka commented Oct 24, 2017

@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.

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 24, 2017

Contributor

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.

Contributor

zhenyolka commented Oct 24, 2017

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.

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 24, 2017

Member

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).

Member

ollieparanoid commented Oct 24, 2017

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).

@MartijnBraam

This comment has been minimized.

Show comment
Hide comment
@MartijnBraam

MartijnBraam Oct 24, 2017

Member

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

Member

MartijnBraam commented Oct 24, 2017

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

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Oct 25, 2017

Contributor

@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.

Contributor

zhenyolka commented Oct 25, 2017

@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.

@computer777

This comment has been minimized.

Show comment
Hide comment
@computer777

computer777 Oct 28, 2017

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 commented Oct 28, 2017

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.

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Oct 30, 2017

Member

@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
Member

ollieparanoid commented Oct 30, 2017

@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
@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Nov 7, 2017

Member

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

Member

ollieparanoid commented Nov 7, 2017

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

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Nov 8, 2017

Contributor

@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.

Contributor

zhenyolka commented Nov 8, 2017

@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.

@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Nov 20, 2017

Contributor

@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
Contributor

zhenyolka commented Nov 20, 2017

@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
@zhenyolka

This comment has been minimized.

Show comment
Hide comment
@zhenyolka

zhenyolka Nov 20, 2017

Contributor

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

Contributor

zhenyolka commented Nov 20, 2017

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

@ollieparanoid

This comment has been minimized.

Show comment
Hide comment
@ollieparanoid

ollieparanoid Nov 20, 2017

Member

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?

Member

ollieparanoid commented Nov 20, 2017

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?

@MartijnBraam

This comment has been minimized.

Show comment
Hide comment
@MartijnBraam

MartijnBraam Nov 20, 2017

Member

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

Member

MartijnBraam commented Nov 20, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.