Bug 10456

Summary: X can not launch on qemumips64
Product: [Build System, Metadata & Runtime] BSPs Reporter: Yi Zhao <yi.zhao>
Component: bsps-oe-coreAssignee: Armin Kuster <akuster>
Status: VERIFIED FIXED QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium+ CC: akuster, bruce.ashfield, jku, jose.perez.carranza, kexin.hao, randy.macleod, ross.burton, yi.zhao
Version: 2.2   
Target Milestone: 2.2.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2016-10-19 08:20:14 UTC
Git rev: morty/4b94b498e21aeba945fe7e72a6b7c4bb0314fb83

Steps:
1. Build core-image-sato for qemumips64
2. Run "runqemu qemumips64" to boot up the image

The X server doesn't and the screen is black. But the system already start up. I can ssh with it.
Comment 1 Randy MacLeod 2016-10-20 15:02:18 UTC
Yi, did this work on 2.1 or 2.2? If so then it's a Medium+ bug but if not then it's an enhancement and likley something that we would not do unless there's a clear motivation.
Comment 2 Yi Zhao 2016-10-21 08:51:37 UTC
(In reply to comment #1)
> Yi, did this work on 2.1 or 2.2? If so then it's a Medium+ bug but if not
> then it's an enhancement and likley something that we would not do unless
> there's a clear motivation.

Hi Randy,

This is a regression bug, used to work on 2.1 and in previous testing for 2.2 it also works.

Thanks,
Yi
Comment 3 Yi Zhao 2016-12-23 00:41:25 UTC
This issue still happens on 2.3 M1 rc1 build
Comment 4 Jussi Kukkonen 2017-02-12 12:55:53 UTC
I'm 99% sure X can in fact launch correctly: you can even start apps if you guess where to click. The issue almost certainly arrived at b9d90ace0055 "poky: Update to linux-yocto 4.8 for qemu* machines".
Comment 5 Jussi Kukkonen 2017-02-13 11:42:07 UTC
(In reply to comment #4)
> I'm 99% sure X can in fact launch correctly: you can even start apps if you
> guess where to click. The issue almost certainly arrived at b9d90ace0055
> "poky: Update to linux-yocto 4.8 for qemu* machines".

I tested this: That commit does introduce the issue.
Comment 6 dengke 2017-02-14 01:24:59 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I'm 99% sure X can in fact launch correctly: you can even start apps if you
> > guess where to click. The issue almost certainly arrived at b9d90ace0055
> > "poky: Update to linux-yocto 4.8 for qemu* machines".
> 
> I tested this: That commit does introduce the issue.

Yes, I change PREFERRED_VERSION_linux-yocto_qemumips64 in poky.conf to "4.4%" on the latest oe-core upstream, it is ok for the core-image-sato, I will work on this continuely.
Comment 7 dengke 2017-02-14 05:33:13 UTC
I tested it on kernel 4.9, that is ok.
Comment 8 dengke 2017-02-27 05:58:32 UTC
This is because the Upstream commit in 4.8: 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
commit d03516df837587368fc6e75591f6329c072b9eb5
Author: Matthew Leach <matthew.leach@codethink.co.uk>
Date:   Tue Jun 21 16:19:49 2016 +0100

    tty: serial: 8250: add CON_CONSDEV to flags
    
    When using the 8250 as a boot console and the main console results in
    messages being printed twice.  The console framework will only
    unregister boot consoles if a new console is registered with the
    CON_CONSDEV flag set.
    
    Set this flag for the univ8250 console to prevent double-registration.
    
    Signed-off-by: Matthew Leach <matthew.leach@codethink.co.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The version 4.4 kernel didn't contain, and the 4.9 kernel have been reverted it. I
have backport the reverted patch to yocto-2.2.1
Comment 10 Yi Zhao 2017-06-02 06:56:40 UTC
This issue still happens on 2.2.2 rc1.

Git rev: morty/d05941ae4567def4a288894717e5f550da246107

The patch had been merged into linux-yocto-4.8 repo, but seems the SRCREV_machine_qemumips64 did not update.
Comment 11 Ross Burton 2017-06-05 20:59:48 UTC
Bruce, can you do an upgrade for morty?
Comment 12 Armin Kuster 2017-06-06 16:12:49 UTC
(In reply to comment #10)
> This issue still happens on 2.2.2 rc1.
> 
> Git rev: morty/d05941ae4567def4a288894717e5f550da246107
> 
> The patch had been merged into linux-yocto-4.8 repo, but seems the
> SRCREV_machine_qemumips64 did not update.

The issue is the fix went in just after the 4.8.20 sync. Our current version is 4.8.18. The offending commit went in @ v4.10-rc3-5.



the mip32 fix went in earlier than other machines.
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-4.8/commit/?h=standard/mti-malta32&id=ecc76d8ac3c3d03fac582de1013ff02847b0d86d
Comment 13 Armin Kuster 2017-06-06 16:56:28 UTC
ok. digging a bit more in linux-yocto-4.8, the offending commit went in with via


d03516d tty: serial: 8250: add CON_CONSDEV to flags

back in 4.7 so we should have seen this issue since day one for Morty.
Comment 14 Armin Kuster 2017-06-06 16:58:38 UTC
Do we know if this was tested with morty when it was released?
Comment 15 Jose Perez C 2017-06-06 17:14:15 UTC
(In reply to comment #14)
> Do we know if this was tested with morty when it was released?

According to Comment 2 this was tested on 2.2 and was working correctly.
Comment 16 Armin Kuster 2017-06-06 20:50:17 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > Do we know if this was tested with morty when it was released?
> 
> According to Comment 2 this was tested on 2.2 and was working correctly.

ah, missed that. Then the commit noted should not fix this as 2.2 release with

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
commit d03516df837587368fc6e75591f6329c072b9eb5
Author: Matthew Leach <matthew.leach@codethink.co.uk>
Date:   Tue Jun 21 16:19:49 2016 +0100

    tty: serial: 8250: add CON_CONSDEV to flags

if I am not mistaken Morty released mips64 with
SRCREV_machine_qemumips64 ?= "64f96ba530e58456070f26b0f3fcce3f64988b72"

git log --oneline -4 drivers/tty/serial/8250/8250_core.c
5db4f7f Revert "tty/serial/8250: use mctrl_gpio helpers"
4ef03d3 tty/serial/8250: use mctrl_gpio helpers
d03516d tty: serial: 8250: add CON_CONSDEV to flags <-- the fixed noted reverts this.

issue may be else were
Comment 17 Armin Kuster 2017-06-06 22:33:19 UTC
errors I am seeing:

INIT: version 2.88 booting
Error, no support currently for 8 bpp frame buffers
Trying to change pixel format...
Error, failed to switch to a 32 bpp 8,8,8 frame buffer

later

bluetoothd
hwclock: can't open '/dev/misc/rtc': No such file or directory
[   39.369758] 
[   39.369758] do_page_fault(): sending SIGSEGV to bluetoothd for invalid read access from 0000000000000030
[   39.369882] epc = 0000007db56dfc88 in libc-2.24.so[7db5650000+192000]
[   39.369915] ra  = 0000007db56ed744 in libc-2.24.so[7db5650000+192000]
[   39.369919] 
Starting syslogd/klogd: done
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon                       [ ok ]
Starting Telephony daemon

Poky (Yocto Project Reference Distro) 2.2.2 qemumips64 /dev/ttyS0

qemumips64 login: D-BUS per-session daemon address is: unix:abstract=/tmp/dbus-ZAGNgQtPr1,guid=a3ad8bf3051e42c54ec8f96759372d3e
Using calibration data stored in /etc/pointercal.xinput
Using calibration data stored in /etc/pointercal.xinput
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed

** (process:467): WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
alloc color failed
matchbox: Cant find a keycode for keysym 269025056
matchbox: ignoring key shortcut XF86Calendar=!$contacts

matchbox: Cant find a keycode for keysym 2809
matchbox: ignoring key shortcut telephone=!$dates

matchbox: Cant find a keycode for keysym 269025050
matchbox: ignoring key shortcut XF86Start=!matchbox-remote -desktop

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[settings daemon] Forking. run with -n to prevent fork
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Activating service name='org.a11y.atspi.Registry'
Successfully activated service 'org.a11y.atspi.Registry'
SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry

** (matchbox-panel:489): WARNING **: Failed to load applet "battery" (/usr/lib/matchbox-panel/libbattery.so: cannot open shared object file: No such file or directory).
matchbox-wm: X error warning (0xa00002): BadWindow (invalid Window parameter) (opcode: 12)
Comment 18 Armin Kuster 2017-06-07 01:36:40 UTC
I manually updated the 4.8 kernel to 4.8.20 which includes the revert patch and I still have the issue.

I am going back to 2.2.1 to ensure my env will work and will march forward from there to see what change is doing this.
Comment 19 Armin Kuster 2017-06-07 14:10:51 UTC
I forgot how bloody slow this machine is.

I went back to the original release point and I got the calibration screen, then  now Icons. I started clickin in the black space and I got the system to shutdown.

I saw the "Black" screen with the 2.2.1 and assumed there was a problem. I am going to retry 2.2.1 with a bit more patients this them to see if I the the calibration screen.
Comment 20 Armin Kuster 2017-06-07 16:14:05 UTC
the linux-yocto-4.8 was updated to 4.8.24. I used that version and I get the full graphic display with the sato image.
Comment 21 Armin Kuster 2017-06-08 14:23:22 UTC
Here is my take. This issue existed since Morty was shipped so its not a regressions for Morty. More of a known issue. It will be fixed once the kernel version moved past 4.8.19.

In order to fix this all machines will have new kernel versions. Not sure what it does to the QA testing process ( ie restarts things).

If you really want this fixed and don't mind slipping schedule then updating the kernel is fine. If schedule is important, then ship with this issue and it will be fixed in kernel sync.
Comment 22 Armin Kuster 2017-06-17 15:20:59 UTC
I pinged Bruce about the 4.8 kernel cache version being 22 and the linux-yocto sources having been synced to .24 and he sent a patchset to move both to latest for the 4.8 kernel . This fixed the qemumips64 X issue. I pushed these changes to my contrib branch.
Comment 23 Armin Kuster 2017-06-19 03:13:25 UTC
this works with the updated kernel
Comment 24 Armin Kuster 2017-08-31 15:21:50 UTC
code in morty
Comment 25 Yi Zhao 2017-09-12 07:27:04 UTC
Verified with 2.2.2 rc2
git rev: morty/60402978fe3648bf560b3386c6e9dd661cdf2083