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

Bug #1780076 reported by Bin Li
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Bin Li
mutter (Ubuntu)
Won't Fix
Undecided
Unassigned
Bionic
Won't Fix
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

Revision history for this message
Bin Li (binli) wrote :
affects: sddm (Ubuntu) → gdm3 (Ubuntu)
Revision history for this message
Bin Li (binli) wrote :

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

Revision history for this message
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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: 18.04 login screen is skewed/distorted (incorrect stride)

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
Revision history for this message
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!

Revision history for this message
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'"

Revision history for this message
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.

Revision history for this message
Bin Li (binli) wrote :

Daniel,

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

Revision history for this message
Bin Li (binli) wrote :

Here is the log from Huawei arm server. Thanks!

Changed in gdm3 (Ubuntu):
status: Incomplete → New
Revision history for this message
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

Revision history for this message
Bin Li (binli) wrote :

Daniel,

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

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

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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

Revision history for this message
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).

Revision history for this message
Bin Li (binli) wrote :

@Daniel,

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

Revision history for this message
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

Revision history for this message
Bin Li (binli) wrote :

@ubuntu-sponsors,

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

Revision history for this message
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

Revision history for this message
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

Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
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

Revision history for this message
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

Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Bin Li (binli) wrote :

@seb128,

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

Revision history for this message
Bin Li (binli) wrote :

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

Bin Li (binli)
Changed in gdm3 (Ubuntu):
assignee: nobody → Bin Li (binli)
status: New → In Progress
Revision history for this message
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

Revision history for this message
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

Revision history for this message
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)
Changed in gdm3 (Ubuntu):
status: In Progress → New
Revision history for this message
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
Revision history for this message
Bin Li (binli) wrote :

@vanvugt,

 Thanks a lot!

Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
Bin Li (binli) wrote :
Revision history for this message
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

Revision history for this message
Bin Li (binli) wrote :

@Ubuntu Sponsors Team,

 What should I do for next step? Thanks!

Iain Lane (laney)
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)
Changed in mutter (Ubuntu Bionic):
status: Invalid → Won't Fix
Revision history for this message
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!

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

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
Revision history for this message
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

Revision history for this message
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

Revision history for this message
Iain Lane (laney) wrote :

v-failed until that is uploaded then

tags: added: verification-failed verification-failed-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Iain Lane (laney) wrote :

re-uploaded to the queue with a fix for that

Revision history for this message
Bin Li (binli) wrote :

@Iain,

 Thanks a lot!

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm3 - 3.28.3-0ubuntu18.04.3

---------------
gdm3 (3.28.3-0ubuntu18.04.3) bionic; urgency=medium

  [ Bin Li ]
  * Add utils-add-new-gdm-disable-wayland-binary.patch, cherry-picked
    from cosmic. (LP: #1780076)

 -- Bin Li <email address hidden> Tue, 09 Oct 2018 09:42:42 +0100

Changed in gdm3 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for gdm3 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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