Summary: | [i915] xf86-video-intel breaks secondary display in Xorg | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | roccobaroccoSC <v_bachvarov> | ||||||||||||||
Component: | Driver/intel | Assignee: | roccobaroccoSC <v_bachvarov> | ||||||||||||||
Status: | RESOLVED DUPLICATE | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||||||||
Severity: | normal | ||||||||||||||||
Priority: | not set | CC: | peter | ||||||||||||||
Version: | git | ||||||||||||||||
Hardware: | x86-64 (AMD64) | ||||||||||||||||
OS: | Linux (All) | ||||||||||||||||
Whiteboard: | |||||||||||||||||
i915 platform: | i915 features: | ||||||||||||||||
Attachments: |
|
Description
roccobaroccoSC
2019-10-11 08:20:10 UTC
Created attachment 145701 [details]
Xorg log file.
Created attachment 145702 [details]
dmesg output
Created attachment 145703 [details]
xorg.conf snippet
Created attachment 145704 [details]
xrandr --verbose output
Created attachment 145705 [details]
xrandr --verbose, old driver version - working correctly
The bug is also reproducible with Gnome+Xorg and Gnome+Wayland. The only theory I have is that it's due to commit 581ddc5d2f55 ("sna: Fix compiler warnings due to DrawablePtr vs. PixmapPtr"). Ie. maybe this thing was working by sheer luck before. Can you build from source and revert that commit? I tried building the package from source (version 870, last known good). For some reason when I build it, it crashes somewhere in the libc, called by intel_drv. Installing a centrally built version by Arch (same code) works just fine. Apparently I somehow messed my build configuration (flags). With this in mind, I would not be able to build from source and test, really sorry about that. If I succeed running my custom build I'll let you know. I found something interesting! The last known good arch package 870 had a patch file that was deleted in the next version! The patch file explains exactly the same symptoms as mine. https://git.archlinux.org/svntogit/packages.git/plain/trunk/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch?h=packages/xf86-video-intel&id=ac52f309e918498f64b4c33e6967846cd0a551f6 I have no idea why the patch file was removed but this explains why my own built sources did not work - I did not have the Arch patch. Here is what the patch describes: " Since xorg-server 1.20, an external monitor would remain blank when used in a PRIME output slave setup. Only a cursor was visible. The cause is "Make PixmapDirtyUpdateRec::src a DrawablePtr" in xserver, the "src" pointer might point to the root window (created by the server) instead of a pixmap (as created by xf86-video-intel). Use get_drawable_pixmap to handle both cases. " For more details see the URL above. I think the change was integrated later on, that's why the patch is unnecessary. Now I can build and test. I can now confirm that the problem appears with this commit: 581ddc5d2f55efa2cf5ec76a802fb781ee142b01 "sna: Fix compiler warnings due to DrawablePtr vs. PixmapPtr" The previous commit bfeeae4de951712e9e00f681d582c6bd7f40dcd6 works with the patch I mentioned above: https://git.archlinux.org/svntogit/packages.git/plain/trunk/0001-SNA-fix-PRIME-output-support-since-xserver-1.20.patch?h=packages/xf86-video-intel&id=ac52f309e918498f64b4c33e6967846cd0a551f6 The said patch seems to have been integrated into 581ddc5d2f55efa2cf5ec76a802fb781ee142b01 but obviously the patch does not contain all the changes. The source of the problem must be in a change that is not in the patch file. I found a difference. sna_accel.c, line 17686 In git the line "src = dirty->src;" was substituted for +#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC + assert(dirty->src->type == DRAWABLE_PIXMAP); +#endif + + src = (PixmapPtr)dirty->src; however, in the applied patch file the block is: +#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC + src = get_drawable_pixmap(dirty->src); +#else src = dirty->src; +#endif This seems to be the only difference that makes xorg crash. Created attachment 145716 [details] [review] sna_accel.c_secondary_monitor.patch This patch fixed the problem for me. Arch Linux was carrying my patch from bug 100086, I should have tried harder to push it upstream. In meantime an independent patch was merged that only addressed the compiler warnings, but not the crash. A rebased patch with an updated commit message can now be found here: https://lists.freedesktop.org/archives/intel-gfx/2019-November/220136.html I will go ahead and mark this bug as duplicate of bug 100086 since it is exactly the same issue, it just did not surface before for you because of the downstream patch. *** This bug has been marked as a duplicate of bug 100086 *** |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.