18.04 login screen is skewed/distorted (incorrect stride) when using hibmc_drm graphics

Bug #1780076 reported by Bin Li on 2018-07-04
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Bin Li
mutter (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[Impact]

 * The login screen is blur, with Huawei's Hi1710 chipset. And below is the hardware information.

05:00.0 VGA compatible controller [0300]: Huawei Technologies Co., Ltd. Hi1710 [iBMC Intelligent Management system chip w/VGA support] [19e5:1711] (rev 01)

 * It's really big effect for our customer when they use the arm server. It's an hardware specific issue, and I've debugged with the mutter for a while upstream's help, but no luck. And the workaround patches was accepted by upstream and now in 18.10.

[Test Case]

 * It's an hardware specific issue, installed the 18.04 on Huawei's Hi1710 arm server. After boot up, you will found the login screen is distorted.

[Regression Potential]

 * It's just a kind of workaround, we add one the udev rule to skip Huawei's chipset, which won't affects other platform.

[Other Info]

 * Upstream: https://gitlab.gnome.org/GNOME/mutter/issues/219

Related branches

Bin Li (binli) wrote :
affects: sddm (Ubuntu) → gdm3 (Ubuntu)
Bin Li (binli) wrote :

I enabled the gdm debug, and here is the syslog.
And I attached the screenshot on above comments.

Bin Li (binli) wrote :

In 18.04 we don't use the wayland, but in gdm3 we used xwayland for login screen, could we disable it by default.

For the the Nvidia card, we didn't use the gdm-wayland-session, use the gdm-x-session. It was handled by debian/patches/ubuntu_nvidia_prime.patch.

Subject: Add hook to run prime-offload (as root) move Prime helpers into the gdm-x-session wrapper.

The attachment "disable-wayland-bydefault.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch

I'm going to say that patch is rejected. It will hurt more users than it helps and this problem only occurs on rack server graphics chips (also seen on Matrox ones too).

Please run 'lspci -k' and send us the output.

summary: - 18.04 login screen is blur
+ 18.04 login screen is skewed/distorted (incorrect stride)
tags: removed: patch
Changed in gdm3 (Ubuntu):
status: New → Incomplete
Changed in mutter (Ubuntu):
status: New → Incomplete
Changed in mesa (Ubuntu):
status: New → Incomplete
Bin Li (binli) wrote :

Hi Daniel,

 Thanks for your review. I'm OoO and can't get it now. Will provide to you later. Thanks!

Bin Li (binli) wrote :

A new patch to disable Huawei chipsets in udev rules.

First, the udev rules was placed in wrong place. /usr/lib/udev/rules.d/ can't be read, we need push it into /lib/udev/rules.d/.

/usr/lib/udev/rules.d/61-gdm.rules => /lib/udev/rules.d/61-gdm.rules

Second, the rules need change the running time directory from /run/gdm to /run/gdm3.

# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="/bin/sh -c '/bin/mkdir /run/gdm3 ; /usr/bin/printf \"[daemon]\nWaylandEnable=false\" >> /run/gdm3/custom.conf'"

Daniel van Vugt (vanvugt) wrote :

Thanks for the patch, but again that's only a workaround. We would like to aim for a fix instead, but if it's an uncommon chipset then that may take a long time...

Please provide a full listing of 'lspci -k' and then we can do the right thing and log an upstream bug. After that's done it will be fine to just patch in a workaround.

Bin Li (binli) wrote :

Daniel,

 Thanks a lot! I will ask someone to help it.

Bin Li (binli) wrote :

Here is the log from Huawei arm server. Thanks!

Changed in gdm3 (Ubuntu):
status: Incomplete → New
Daniel van Vugt (vanvugt) wrote :

Thanks. Please report the bug to upstream here:

  https://gitlab.gnome.org/GNOME/mutter/issues

also mentioning it is:

05:00.0 VGA compatible controller: Huawei Technologies Co., Ltd. Hi1710 [iBMC Intelligent Management system chip w/VGA support] (rev 01)
 Kernel driver in use: hibmc-drm
 Kernel modules: hibmc_drm

Bin Li (binli) wrote :

Daniel,

 Thanks for your help, I've report a new one.

https://gitlab.gnome.org/GNOME/mutter/issues/219

Daniel van Vugt (vanvugt) wrote :

Cheers

summary: - 18.04 login screen is skewed/distorted (incorrect stride)
+ 18.04 login screen is skewed/distorted (incorrect stride) when using
+ hibmc_drm graphics
Changed in mesa (Ubuntu):
status: Incomplete → New
Changed in mutter (Ubuntu):
status: Incomplete → New
Bin Li (binli) wrote :

Talked with Jonas Ådahl, he suggest we try below patch, I will try it when back office.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/155

description: updated
Bin Li (binli) wrote :

@Daniel,

 Now this issue in my side is not related to https://gitlab.gnome.org/GNOME/mutter/merge_requests/160, I've updated the latest mutter(3.28.3-2~ubuntu18.04.1), this issue is still exist, and I tried to make it with small patch, but I'm failed.

 So could we used the patch in comment #7?

Now I just found the gdm3 was updated to 3.28.3-0ubuntu18.04.1, the previous patch also need be changed.
And I found the gdm-disable-wayland binary is missed, so I report an issue for it.

https://gitlab.gnome.org/GNOME/gdm/issues/412

Daniel van Vugt (vanvugt) wrote :

Yes, the patch in comment #7 is only a workaround but that might be as good as it gets while no developer ever has access to the hardware.

Please reformat the gdm3 patch with more details about what's being fixed, and then:

1. Attach a patch for Ubuntu 18.10, and subscribe 'ubuntu-sponsors'.

2. When the fix (workaround) has been released to 18.10 then we can start on the SRU process to get the fix into 18.04 (https://wiki.ubuntu.com/StableReleaseUpdates#Procedure).

Bin Li (binli) wrote :

@Daniel,

 Got it, and the issue 412 was fixed. I will work on the patch today. Thanks a lot!

Bin Li (binli) wrote :

For 18.10, I made a patch for it.

  * Disable wayland for Huawei Hi1710. (LP: #1780076)
    + Add ubuntu_disable_wayland_huawei_chipsets.patch
    + gdm3.install: Fix udev path from /usr/lib/udev to lib/udev.

And I my code is based on cosmic-devel.
https://code.launchpad.net/~binli/ubuntu/+source/gdm3/+git/lp1780076

Bin Li (binli) wrote :

@ubuntu-sponsors,

 Could you helped reviewed the 0001-Disable-wayland-for-Huawei-Hi1710-LP-1780076.patch for 18.10? Thanks!

Bin Li (binli) wrote :

I made two patches for upstream. Now the !35 was accepted, just wait for !38.

https://gitlab.gnome.org/GNOME/gdm/merge_requests/35

https://gitlab.gnome.org/GNOME/gdm/merge_requests/38

Sebastien Bacher (seb128) wrote :

Since you have your changes in git, could you open a merge request against the packaging branch directly? that makes more sense than having a debdiff in the bug

Bin Li (binli) wrote :
Bin Li (binli) wrote :

@seb128,

 Fine, let met try, could you tell me which one is used for packaging branch. Thanks!

remotes/origin/ubuntu/cosmic
remotes/origin/ubuntu/cosmic-devel
remotes/origin/ubuntu/cosmic-proposed

remotes/origin/applied/ubuntu/cosmic
remotes/origin/applied/ubuntu/cosmic-devel
remotes/origin/applied/ubuntu/cosmic-proposed

Bin Li (binli) wrote :

Here is the patch for upstream, we need merge it into 3.29.91.

https://gitlab.gnome.org/GNOME/gdm/merge_requests/35

Bin Li (binli) wrote :

@seb128,

 Could you help check if this debdiff is ok? Thanks!

Bin Li (binli) wrote :

I made a merge request on packaging tree, is it ok? Thanks!

Bin Li (binli) on 2018-08-30
Changed in gdm3 (Ubuntu):
assignee: nobody → Bin Li (binli)
status: New → In Progress
Bin Li (binli) wrote :

The !35 has some side effect for other distribution, after discuss, I made a new patch !44, it was accepted by upstream.

https://gitlab.gnome.org/GNOME/gdm/merge_requests/35

https://gitlab.gnome.org/GNOME/gdm/merge_requests/44

Bin Li (binli) wrote :

@vanvugt,

 Now the workaround patches were merged into 18.10, I thought we could start the SRU process for 18.04. Could you help it? Thanks!

https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/gdm3

commit 53a5db08ae0b6e8e65b2bc0a99d374a5783a3e9b
Author: Didier Roche <email address hidden>
Date: Wed Sep 5 09:40:04 2018 +0200

    install udev rules in the correct folder

    * debian/gdm3.install:
      - install udev rules in the correct folder (following upstream build
        fixes)

commit e7c108779b23f10da71953fefa2ba5eacc76fac1
Author: Bin Li <email address hidden>
Date: Wed Aug 29 16:47:46 2018 +0800

    data: 61-gdm.rules.in

    Disable wayland for Huawei Hi1710 chipsets.

    The login screen is skewed/distorted on arm server, and I couldn't
    find root cause, and no other developer ever has access to the hardware.

    https://gitlab.gnome.org/GNOME/mutter/issues/219

Bin Li (binli) wrote :

@vanvugt,

 I've updated the Description with the 'Template of SRU', do you need anything else? Thanks!

description: updated
Changed in gdm3 (Ubuntu):
assignee: Bin Li (binli) → nobody
Bin Li (binli) on 2018-09-13
Changed in gdm3 (Ubuntu):
status: In Progress → New
Daniel van Vugt (vanvugt) wrote :

Sounds like the fix is finally working in cosmic gdm version 3.30.0-0ubuntu2...?

I don't have the power to sponsor things or help any more. You will just need to prepare a new patch for bionic, attach it here and wait for ubuntu-sponsors.

Changed in gdm3 (Ubuntu):
status: New → Fix Released
no longer affects: mesa (Ubuntu)
Changed in mutter (Ubuntu):
status: New → Won't Fix
Bin Li (binli) wrote :

@vanvugt,

 Thanks a lot!

Bin Li (binli) wrote :
Bin Li (binli) wrote :
Bin Li (binli) wrote :
Bin Li (binli) wrote :

For 18.04, we need above 3 patches.

0001-data-61-gdm.rules.in.patch
0002-debian-gdm3.install.patch
0003-data-Makefile.am.patch

Bin Li (binli) wrote :

@Ubuntu Sponsors Team,

 What should I do for next step? Thanks!

Iain Lane (laney) on 2018-09-14
Changed in mutter (Ubuntu Bionic):
status: New → Invalid
Changed in gdm3 (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Bin Li (binli)
Iain Lane (laney) on 2018-09-14
Changed in mutter (Ubuntu Bionic):
status: Invalid → Won't Fix
Bin Li (binli) wrote :

@Iain Lane,

 So when the new changes of gdm3 could be pushed into updates channel? Do I need do something else? Thanks!

Hello Bin, or anyone else affected,

Accepted gdm3 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gdm3/3.28.3-0ubuntu18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gdm3 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Bin Li (binli) wrote :

Just verified it, found we still missing the gdm-disable-wayland.

commit 2dc57da31781dedfe374ce353b0f5fd6aa9da56f
Author: Ray Strode <email address hidden>
Date: Mon May 21 11:03:29 2018 -0400

    utils: add new gdm-disable-wayland binary

    We currently disable wayland for cirrus by calling printf
    from a udev rule. This works, but it's a little too open
    coded to easily write SELinux policy for.

    This commit introduces a new program, gdm-disable-wayland,
    that does the same thing, but in a dedicated binary.

    A future commit will change the udev rule to use the binary.

    https://bugzilla.gnome.org/show_bug.cgi?id=796315

Bin Li (binli) wrote :

I made a new merge request for missing the gdm-disable-wayland binary.

https://code.launchpad.net/~binli/ubuntu/+source/gdm3/+git/gdm3/+merge/356297

Iain Lane (laney) wrote :

v-failed until that is uploaded then

tags: added: verification-failed verification-failed-bionic
removed: verification-needed verification-needed-bionic
Iain Lane (laney) wrote :

re-uploaded to the queue with a fix for that

Bin Li (binli) wrote :

@Iain,

 Thanks a lot!

Timo Aaltonen (tjaalton) wrote :

Hello Bin, or anyone else affected,

Accepted gdm3 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gdm3/3.28.3-0ubuntu18.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-bionic
removed: verification-failed verification-failed-bionic
Bin Li (binli) wrote :

Tested the 3.28.3-0ubuntu18.04.3, it worked fine on Huawei arm server.

Thanks a lot!

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.