Launchpad has imported 23 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=105518.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2018-03-15T09:31:00+00:00 Daniel van Vugt wrote:

Xorg sessions are suddenly showing corruption upon login, briefly before
the shell starts up.

This seems to be related to the use of "-background none" by the DM. If
I remove "-background none" from the DM code then the corruption is
replaced by a less bad second or two of blackness.

This problem seems to have started when Mesa 18.0.0 was introduced to
Ubuntu 18.04. I can't seem to correlate it with anything else, and can't
relate it to a specific Xorg update.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/24

------------------------------------------------------------------------
On 2018-03-15T09:34:21+00:00 Michel Dänzer wrote:

Please attach the corresponding Xorg log file.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/25

------------------------------------------------------------------------
On 2018-03-15T09:37:24+00:00 Daniel van Vugt wrote:

There's a log in the downstream bug:
https://launchpad.net/bugs/1753776

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/27

------------------------------------------------------------------------
On 2018-03-15T09:41:27+00:00 Michel Dänzer wrote:

FWIW, you're more likely to get action on this if you reassign to the
Mesa i965 driver.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/29

------------------------------------------------------------------------
On 2018-03-15T09:42:48+00:00 Daniel van Vugt wrote:

I'm not sure if the problem is confined to the Mesa i965 driver. It is
possible.

I have verified that the corruption occurs with both Xorg drivers
though: modesetting and intel.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/30

------------------------------------------------------------------------
On 2018-03-15T12:54:52+00:00 Timo Aaltonen wrote:

seems to be limited to gen9 (and up?), can't reproduce on BDW but can on
SKL/KBL/CFL

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/32

------------------------------------------------------------------------
On 2018-03-16T01:24:54+00:00 Daniel van Vugt wrote:

I agree with that assessment so far. KBL is affected, but HAS is not.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/40

------------------------------------------------------------------------
On 2018-03-16T01:42:34+00:00 Daniel van Vugt wrote:

KBL is affected, but HSW is not.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/41

------------------------------------------------------------------------
On 2018-03-16T05:53:12+00:00 Daniel van Vugt wrote:

OK, if the problem is only Intel and only gen9 then I am less concerned.
But I will try to bisect this by next week. Certainly sounds like a Mesa
18 bug now.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/42

------------------------------------------------------------------------
On 2018-03-19T01:40:58+00:00 Daniel van Vugt wrote:

I can now also confirm in more detail that:

HSW is not affected
BDW is not affected
SKL is affected
KBL is affected

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/46

------------------------------------------------------------------------
On 2018-03-19T09:42:52+00:00 Daniel van Vugt wrote:

Bisected:

1efd73df39b39589d26f44d4927d2c65697bbe6e is the first bad commit
commit 1efd73df39b39589d26f44d4927d2c65697bbe6e
Author: Ben Widawsky <b...@bwidawsk.net>
Date:   Tue May 30 17:24:06 2017 +0530

    i965: Advertise the CCS modifier
    
    v2: Rename modifier to be more smart (Jason)
    
    FINISHME: Use the kernel's final choice for the fb modifier
    
    bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) 
~/scripts/measure_bandwidth.sh ./kmscube none
    Read bandwidth: 603.91 MiB/s
    Write bandwidth: 615.28 MiB/s
    bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) 
~/scripts/measure_bandwidth.sh ./kmscube ytile
    Read bandwidth: 571.13 MiB/s
    Write bandwidth: 555.51 MiB/s
    bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) 
~/scripts/measure_bandwidth.sh ./kmscube ccs
    Read bandwidth: 259.34 MiB/s
    Write bandwidth: 337.83 MiB/s
    
    v2: Move all references to the new fourcc code(s) to this patch.
    v3: Rebase, remove Yf_CCS (Daniel)
    
    Signed-off-by: Ben Widawsky <b...@bwidawsk.net>
    Signed-off-by: Jason Ekstrand <ja...@jlekstrand.net>
    Acked-by: Daniel Stone <dani...@collabora.com>
    Reviewed-by: Chad Versace <chadvers...@chromium.org>

:040000 040000 1770769b46d6a9425e80b380e8338059841921e2
f790e3c0d1c5246c4d1385f14eac032b90acf68c M      src

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/47

------------------------------------------------------------------------
On 2018-03-19T14:51:16+00:00 Andriy-khulap wrote:

I am able to reproduce this issue on Skylake GT2 (0x1916) with Ubuntu 18.04 
beta default mesa. Downgrading mesa to mesa-17.3.6 doesn't help.
Reverting the bisected commit (1efd73df39b3) solved the issue. As well as using 
mesa-17.2.8 where that commit was not applied.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/49

------------------------------------------------------------------------
On 2018-03-19T15:52:07+00:00 2-jason-v wrote:

This isn't a mesa bug.  The problem is that, if '-background none' is
set, X use whatever random garbage happens to be in the framebuffer when
it starts up.  I think what is likely going on is that it's suddenly
treating that data as compressed and so it gets corrupted.  In any case,
I think this is highly unlikely to be an actual mesa bug.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/50

------------------------------------------------------------------------
On 2018-03-19T16:50:12+00:00 Daniel Stone wrote:

That's really odd. -background none will just do GBM_BO_IMPORT_FD (which
passes DRM_FORMAT_MOD_INVALID) from the current DRM FB to get a gbm_bo,
then import that BO into an EGLImage, which it copies from.

I wonder if the original image we try to import is Y_CCS, but we import
it as plain Y (no CCS) because drmModeGetFb doesn't tell us the
modifier.

Daniel, do either of the following fix this for your users?

a) inlined kernel patch to refuse getfb for modifiers we can't determine via 
implicit means, or multi-planar
b) in whatever your DM (GDM? LightDM?) uses to create a KMS display, filtering 
the supported modifier set to DRM_FORMAT_MOD_LINEAR / I915_FORMAT_MOD_X_TILED / 
I915_FORMAT_MOD_Y_TILED

I think the kernel patch is the most correct, but then we might have to
create a getfb2 to support -background none. :(


diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 92d94d2684f4..ef157585fc32 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13934,6 +13934,16 @@ static int intel_user_framebuffer_create_handle(struct 
drm_framebuffer *fb,
                return -EINVAL;
        }
 
+       switch (fb->modifier) {
+       case DRM_FORMAT_MOD_LINEAR:
+       case I915_FORMAT_MOD_X_TILED:
+       case I915_FORMAT_MOD_Y_TILED:
+               break;
+       default:
+               DRM_DEBUG_KMS("rejecting getfb for exotic modifier\n");
+               return -EINVAL;
+       }
+
        return drm_gem_handle_create(file, &obj->base, handle);
 }

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/53

------------------------------------------------------------------------
On 2018-03-20T08:32:54+00:00 Daniel van Vugt wrote:

(In reply to Daniel Stone from comment #13)

> a) inlined kernel patch to refuse getfb for modifiers we can't determine via
> implicit means, or multi-planar

Your provided kernel patch replaces the corruption with blackness, which
was probably expected. So the seamless transition from gdm3 into gnome-
shell (or whatever) is gone. We can achieve the same blackness
workaround by removing '-background none' from the gdm3 source, but that
hurts all users including Broadwell and earlier who are not yet affected
by the bug.

> b) in whatever your DM (GDM? LightDM?) uses to create a KMS display,
> filtering the supported modifier set to DRM_FORMAT_MOD_LINEAR /
> I915_FORMAT_MOD_X_TILED / I915_FORMAT_MOD_Y_TILED

It's gdm3 so the code you want is mutter, right? I think we'd lean more
toward patching the offending commit out of Mesa before we go proposing
more mutter patches. I'm hesitant to do either right now. New ideas are
welcome.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/54

------------------------------------------------------------------------
On 2018-03-20T08:49:56+00:00 Daniel Stone wrote:

(In reply to Daniel van Vugt from comment #14)
> (In reply to Daniel Stone from comment #13)
> 
> > a) inlined kernel patch to refuse getfb for modifiers we can't determine via
> > implicit means, or multi-planar
> 
> Your provided kernel patch replaces the corruption with blackness, which was
> probably expected. So the seamless transition from gdm3 into gnome-shell (or
> whatever) is gone. We can achieve the same blackness workaround by removing
> '-background none' from the gdm3 source, but that hurts all users including
> Broadwell and earlier who are not yet affected by the bug.

Correct.

> > b) in whatever your DM (GDM? LightDM?) uses to create a KMS display,
> > filtering the supported modifier set to DRM_FORMAT_MOD_LINEAR /
> > I915_FORMAT_MOD_X_TILED / I915_FORMAT_MOD_Y_TILED
> 
> It's gdm3 so the code you want is mutter, right? I think we'd lean more
> toward patching the offending commit out of Mesa before we go proposing more
> mutter patches. I'm hesitant to do either right now. New ideas are welcome.

That's not a long-term fix I'm suggesting, but to very specifically
narrow down the problem, i.e. prove the thesis that the issue is caused
by attempting to infer the tiling layout of a framebuffer with auxiliary
compression planes. The whitelist I suggested would make sure Mutter
only picks single-plane formats: if that results in the corruption
disappearing, then we know the problem is exactly that and nothing else.

There are exactly three options to fix this:
  a) stop using -background none (I didn't notice this since my DM launches a 
Wayland session, and Xorg is something I only start from a VT without bg none); 
or
  b) revert the Mesa commit and take a hit from not having renderbuffer 
compression enabled; or
  c) add a GetFB2 ioctl to the kernel + libdrm which includes multi-planar and 
modifier information, use that in Xorg as well as a modifier-aware gbm_bo 
import interface.

The latter is obviously the most complete, but it's not zero work.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/55

------------------------------------------------------------------------
On 2018-03-20T08:59:24+00:00 Daniel van Vugt wrote:

(In reply to Daniel Stone from comment #15)

> There are exactly three options to fix this:
>   a) stop using -background none (I didn't notice this since my DM launches
> a Wayland session, and Xorg is something I only start from a VT without bg
> none); or

I think (a) is worse than doing nothing. At least if we do nothing then
a subset of users still have a nice seamless login.

>   b) revert the Mesa commit and take a hit from not having renderbuffer
> compression enabled; or

We might do this in the short term for Ubuntu at least. Not having
compression enabled is better than us having to deal with recurring bug
reports from users about their corrupt screens.

>   c) add a GetFB2 ioctl to the kernel + libdrm which includes multi-planar
> and modifier information, use that in Xorg as well as a modifier-aware
> gbm_bo import interface.

Sounds like a good long term solution.

Medium-term there's probably also another option:

  d) Add a small feature to mutter to allow the caller (gdm3) to specify
that only simple (linear?) formats are allowed, so as to enable easy
transitions for all display server types. gdm3 probably cares less about
the benefits of compression than gnome-shell-proper does.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/56

------------------------------------------------------------------------
On 2018-03-20T09:01:47+00:00 Daniel Stone wrote:

(In reply to Daniel van Vugt from comment #16)
>   d) Add a small feature to mutter to allow the caller (gdm3) to specify
> that only simple (linear?) formats are allowed, so as to enable easy
> transitions for all display server types. gdm3 probably cares less about the
> benefits of compression than gnome-shell-proper does.

It should be enough to exclude any modifier for which
gbm_device_get_format_modifier_plane_count() returns > 1. I don't have
any plans to do this in Mutter, I can look at the long-term getfb2
solution.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/57

------------------------------------------------------------------------
On 2018-03-21T12:08:03+00:00 Daniel Stone wrote:

The first part of the fix to reject multi-plane buffers for getfb is in 
drm-misc-fixes:
https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-fixes&id=b24791fe00f8b089d5b10cb7bcc4e1ae88b4831b

I'm working on a getfb2 ioctl, but that won't land for a little while.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/59

------------------------------------------------------------------------
On 2018-03-22T01:43:52+00:00 Daniel van Vugt wrote:

Thanks.

I slightly fear that the RESOLVED FIXED status might mislead people
though. How many of the fixes will we need before the symptom is gone?
Does the drm fix restore seamless logins or will that only be after the
kernel fix? Or another?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/60

------------------------------------------------------------------------
On 2018-03-22T08:00:28+00:00 Daniel Stone wrote:

(In reply to Daniel van Vugt from comment #19)
> I slightly fear that the RESOLVED FIXED status might mislead people though.
> How many of the fixes will we need before the symptom is gone? Does the drm
> fix restore seamless logins or will that only be after the kernel fix? Or
> another?

That will only come after we add a GetFB2 ioctl to the kernel, a wrapper
to libdrm, and then make Xorg use it. I've typed most of that up now.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/61

------------------------------------------------------------------------
On 2018-03-23T13:52:44+00:00 Daniel Stone wrote:

Lo and behold:
https://lists.freedesktop.org/archives/dri-devel/2018-March/170512.html
https://lists.x.org/archives/xorg-devel/2018-March/056363.html

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/67

------------------------------------------------------------------------
On 2018-11-29T08:52:00+00:00 Timo Aaltonen wrote:

getfb2 is not upstream yet, so reopening

Reply at:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1753776/comments/68


** Changed in: mesa
       Status: Fix Released => Confirmed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to mesa in Ubuntu.
https://bugs.launchpad.net/bugs/1753776

Title:
  Graphics corruption just before login animation to Xorg sessions
  (Intel gen9 GPUs only)

Status in Mesa:
  Confirmed
Status in gdm3 package in Ubuntu:
  Invalid
Status in mesa package in Ubuntu:
  Fix Released
Status in wayland package in Ubuntu:
  Invalid
Status in gdm3 source package in Bionic:
  Invalid
Status in mesa source package in Bionic:
  Fix Released
Status in wayland source package in Bionic:
  Invalid

Bug description:
  Immediately after login (I enter the password and hit enter) the screen 
"crumbles" for few seconds, then all becomes normal and the system works fine. 
I have done apt update+upgrade many times, also with proposed enabled, I have 
also installed a new ISO (now i'm using the Alpha dated 20180305) but the 
problem remains. The problem happens with the x11 session but not with wayland. 
  Also problem does not show with different hardware. 

  corrado@corrado-p7-bb-0305:~$ inxi -Fx
  System:    Host: corrado-p7-bb-0305 Kernel: 4.15.0-10-generic x86_64 bits: 64 
gcc: 7.3.0
             Desktop: Gnome 3.27.92 (Gtk 3.22.28-1ubuntu3) Distro: Ubuntu 
Bionic Beaver (development branch)
  Machine:   Device: desktop Mobo: ASRock model: H110M-G/M.2 serial: N/A UEFI: 
American Megatrends v: P1.10 date: 05/11/2017
  CPU:       Dual core Intel Core i3-7100 (-MT-MCP-) arch: Skylake rev.9 cache: 
3072 KB
             flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 15648
             clock speeds: max: 3900 MHz 1: 1018 MHz 2: 3150 MHz 3: 3153 MHz 4: 
3081 MHz
  Graphics:  Card: Intel HD Graphics 630 bus-ID: 00:02.0
             Display Server: x11 (X.Org 1.19.6 ) driver: i915 Resolution: 
1920x1080@60.00hz
             OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2)
             version: 4.5 Mesa 18.0.0-rc4 Direct Render: Yes
  Audio:     Card Intel Sunrise Point-H HD Audio driver: snd_hda_intel bus-ID: 
00:1f.3
             Sound: Advanced Linux Sound Architecture v: k4.15.0-10-generic
  Network:   Card: Intel Ethernet Connection (2) I219-V driver: e1000e v: 
3.2.6-k bus-ID: 00:1f.6
             IF: enp0s31f6 state: up speed: 100 Mbps duplex: full mac: 
70:85:c2:44:7b:86
  Drives:    HDD Total Size: 1000.2GB (1.3% used)
             ID-1: /dev/sda model: TOSHIBA_DT01ACA1 size: 1000.2GB
  Partition: ID-1: / size: 32G used: 4.3G (15%) fs: ext4 dev: /dev/sda7
             ID-2: swap-1 size: 8.59GB used: 0.00GB (0%) fs: swap dev: /dev/sda2
  RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
  Sensors:   System Temperatures: cpu: 38.5C mobo: N/A
             Fan Speeds (in rpm): cpu: N/A
  Info:      Processes: 234 Uptime: 11 min Memory: 1144.7/7680.8MB Init: 
systemd runlevel: 5 Gcc sys: N/A
             Client: Shell (bash 4.4.181) inxi: 2.3.56 
  corrado@corrado-p7-bb-0305:~$

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: xorg 1:7.7+19ubuntu5
  ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
  Uname: Linux 4.15.0-10-generic x86_64
  ApportVersion: 2.20.8-0ubuntu10
  Architecture: amd64
  BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
  CompositorRunning: None
  CurrentDesktop: ubuntu:GNOME
  Date: Tue Mar  6 15:47:50 2018
  DistUpgraded: Fresh install
  DistroCodename: bionic
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, if not too technical
  GraphicsCard:
   Intel Corporation HD Graphics 630 [8086:5912] (rev 04) (prog-if 00 [VGA 
controller])
     Subsystem: ASRock Incorporation HD Graphics 630 [1849:5912]
  InstallationDate: Installed on 2018-03-05 (0 days ago)
  InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180305)
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
   Bus 001 Device 002: ID 058f:6377 Alcor Micro Corp. AU6375 4-LUN card reader
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-10-generic.efi.signed 
root=UUID=9a36b498-59f5-4a36-81db-3046ff6bdeaa ro quiet splash
  SourcePackage: xorg
  Symptom: display
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 05/11/2017
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: P1.10
  dmi.board.name: H110M-G/M.2
  dmi.board.vendor: ASRock
  dmi.chassis.asset.tag: To Be Filled By O.E.M.
  dmi.chassis.type: 3
  dmi.chassis.vendor: To Be Filled By O.E.M.
  dmi.chassis.version: To Be Filled By O.E.M.
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvrP1.10:bd05/11/2017:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnH110M-G/M.2:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
  dmi.product.family: To Be Filled By O.E.M.
  dmi.product.name: To Be Filled By O.E.M.
  dmi.product.version: To Be Filled By O.E.M.
  dmi.sys.vendor: To Be Filled By O.E.M.
  version.compiz: compiz N/A
  version.libdrm2: libdrm2 2.4.90-1
  version.libgl1-mesa-dri: libgl1-mesa-dri 18.0.0~rc4-1ubuntu3
  version.libgl1-mesa-glx: libgl1-mesa-glx 18.0.0~rc4-1ubuntu3
  version.xserver-xorg-core: xserver-xorg-core 2:1.19.6-1ubuntu2
  version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
  version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
  version.xserver-xorg-video-intel: xserver-xorg-video-intel 
2:2.99.917+git20171229-1
  version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

To manage notifications about this bug go to:
https://bugs.launchpad.net/mesa/+bug/1753776/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to