endeavour / DellXps7390-2in1-Manjaro-Linux-Fixes

Kernel patches and tweaks to get the Dell XPS 7390 2-in-1 with 10th Gen Intel CPUs functioning on Manjaro Linux
23 stars 3 forks source link

Graphics freeze #7

Closed krogala closed 4 years ago

krogala commented 4 years ago

Hi James,

Thank you for putting together this series of patches -- really nice work!

There is something I wanted to ask you. It's about freezing of my graphics display in this set up. In fact, I never got my graphics to run properly -- whether it was with your patches or without them. My version of 7390 2in1 has the Iris Plus GPU with a 4K touch display. The current drivers seem to be good enough for me to open graphics programs, but for some reason, they all freeze at the point of initial display, and there is no way I can actually use them to rotate or zoom objects. In fact, even google chrome does not start with GPU support, and I had to disable it at start.

It's a really weird behavior, so I recorded a few videos to make it easier for you to grasp what the problem is on my side.

Chimera -- I cannot smoothly rotate or zoom on the 3D object Glxgears -- no movement of gears detected despite the FPS rate being calculated Krita -- cannot zoom or rotate a 2D image

Also, for recording, I had to select particular windows for capture. Because when I decided to capture the whole screen, there was a massive flickering effect -- between windows. Please see the videos by following the dropbox link below:

https://www.dropbox.com/sh/0fym28w5htidbb8/AACrLlTYonp_bgw7pQhd-B7aa?dl=0

Any help with dealing with this issue would be much appreciated!

Cheers,

Kacper

arkadius commented 4 years ago

Hi @krogala

We need more information about your system configuration:

Cheers, Arek

krogala commented 4 years ago

Hey Arek,

Thanks for your quick response!

Here is the info that you wanted to see:

Kernel: 5.4rc7

$ uname -a
Linux velociraptor 5.4.0-1-MANJARO-DELLXPS7390-2IN1 #1 SMP PREEMPT Sat Nov 16 22:21:41 EST 2019 x86_64 GNU/Linux

Dmesg after reboot:

$ sudo dmesg | grep i915
[    3.660179] i915 0000:00:02.0: VT-d active for gfx access
[    3.660258] i915 0000:00:02.0: vgaarb: deactivate vga console
[    3.674789] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    3.676052] [drm] Finished loading DMC firmware i915/icl_dmc_ver1_07.bin (v1.7)
[    3.676273] mei_hdcp mei::b638ab7e-94e2-4ea2-a552-d1c54b627f04:01: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[    3.893614] [drm] Initialized i915 1.6.0 20190822 for 0000:00:02.0 on minor 0
[    3.928466] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.938997] fbcon: i915drmfb (fb0) is primary device
[    3.939153] i915 0000:00:02.0: fb0: i915drmfb frame buffer device

Glxgears info:

$ glxinfo | grep -i version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Version: 19.2.4
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.4
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 19.2.4
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
    GL_EXT_shader_implicit_conversions, GL_EXT_shader_integer_mix,

Dmesg outputs after glxgears, krita and chimera are on dropbox: https://www.dropbox.com/sh/0fym28w5htidbb8/AACrLlTYonp_bgw7pQhd-B7aa?dl=0

And so is journalctl after reboot.

Thank you for looking into those, Arek!

Cheers,

Kacper

arkadius commented 4 years ago

A few more info is needed:

Here you have interesting part in logs:

 17 17:43:55 velociraptor systemd-coredump[2924]: Process 2844 (krita) of user 1000 dumped core.

                                                     Stack trace of thread 2844:
                                                     #0  0x00007fbf2b7877ec _ZNK18QThreadStorageData3getEv (libQt5Core.so.5)
                                                     #1  0x00007fbf2b8380d8 n/a (libQt5Core.so.5)
                                                     #2  0x00007fbf28b82970 pcre2_jit_match_16 (libpcre2-16.so.0)
                                                     #3  0x00007fbf28b87bd6 pcre2_match_16 (libpcre2-16.so.0)
                                                     #4  0x00007fbf2b838269 n/a (libQt5Core.so.5)
                                                     #5  0x00007fbf2b83bd20 n/a (libQt5Core.so.5)
                                                     #6  0x00007fbf2b83c17c _ZNK18QRegularExpression5matchERK7QStringiNS_9MatchTypeE6QFlagsINS_11MatchOptionEE (libQt5Core.so.5)
                                                     #7  0x00007fbf2a185339 n/a (libQt5Xml.so.5)
                                                     #8  0x00007fbf2a189e96 _ZNK12QDomDocument8toStringEi (libQt5Xml.so.5)
                                                     #9  0x00007fbf2abcd7f8 _ZN18KoResourceTagStore12writeXMLFileERK7QString (libkritawidgets.so.18)
                                                     #10 0x00007fbf2abcdc8b _ZN18KoResourceTagStore13serializeTagsEv (libkritawidgets.so.18)
                                                     #11 0x00007fbf2abcde0f _ZN18KoResourceTagStoreD1Ev (libkritawidgets.so.18)
                                                     #12 0x00007fbf2dc51599 n/a (libkritaui.so.18)
                                                     #13 0x00007fbf2dc518e3 n/a (libkritaui.so.18)
                                                     #14 0x00007fbf2dc500a1 _ZN31KisResourceBundleServerProviderD1Ev (libkritaui.so.18)
                                                     #15 0x00007fbf2dc500ba n/a (libkritaui.so.18)
                                                     #16 0x00007fbf2b3336a7 __run_exit_handlers (libc.so.6)
                                                     #17 0x00007fbf2b33385e exit (libc.so.6)
                                                     #18 0x00007fbf2b31c15a __libc_start_main (libc.so.6)
                                                     #19 0x0000561192e31d7e _start (krita)

                                                     Stack trace of thread 2858:
                                                     #0  0x00007fbf2b3e99ef __poll (libc.so.6)
                                                     #1  0x00007fbf289c7170 n/a (libglib-2.0.so.0)
                                                     #2  0x00007fbf289c7241 g_main_context_iteration (libglib-2.0.so.0)
                                                     #3  0x00007fbf2b9a8b13 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #4  0x00007fbf2b94f83c _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5)
                                                     #5  0x00007fbf2b781305 _ZN7QThread4execEv (libQt5Core.so.5)
                                                     #6  0x00007fbf29524b37 n/a (libQt5DBus.so.5)
                                                     #7  0x00007fbf2b782530 n/a (libQt5Core.so.5)
                                                     #8  0x00007fbf294f44cf start_thread (libpthread.so.0)
                                                     #9  0x00007fbf2b3f42d3 __clone (libc.so.6)

It looks like QT crashes at the very beginning when it try to serializeTagsEv. I'm not familiar with QT code, but it's a good point to start with. You can report this issue to QT community and maybe they will find where the problem is. Or maybe someone else here has better ideas?

Cheers, Arek

endeavour commented 4 years ago

Does Windows work properly? I wonder if perhaps there is a hardware issue here.

krogala commented 4 years ago

Hi Arek and James,

Regarding Windows, I was foolish enough to raze it as soon as the laptop arrived, and did not check whether any of my graphics apps were able to run on it. However, I copied and saved the entire partition table, so will be able to bring it back to the original state. I'll try doing that soon, and will report back here.

Arek, below is info that you asked me about:

$ sudo dmidecode -t bios | grep Version 
    Version: 1.0.9

Before enabling GuC/HuC:

$ sudo cat /sys/kernel/debug/dri/0/i915_huc_load_status
HuC firmware: (null)
    status: N/A
    version: wanted 0.0, found 0.0
    uCode: 0 bytes
    RSA: 0 bytes

HuC status 0x00000000:
$ sudo cat /sys/kernel/debug/dri/0/i915_guc_load_status
GuC firmware: 
    status: DISABLED
    version: wanted 33.0, found 0.0
    uCode: 0 bytes
    RSA: 0 bytes

GuC status 0x00000001:
    Bootrom status = 0x0
    uKernel status = 0x0
    MIA Core status = 0x0

Scratch registers:
     0:     0x0
     1:     0x0
     2:     0x0
     3:     0x0
     4:     0x0
     5:     0x0
     6:     0x0
     7:     0x0
     8:     0x0
     9:     0x0
    10:     0x0
    11:     0x0
    12:     0x0
    13:     0x0
    14:     0x0
    15:     0x0

After enabling GuC/Huc:

$ sudo dmesg | grep i915
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 root=UUID=92db983c-6e20-44dc-94d9-b7a454639bed rw quiet apparmor=1 security=apparmor resume=UUID=baed2966-837d-43d7-a342-1bdaf6a3723f udev.log_priority=3 i915.enable_guc=2
[    0.139029] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 root=UUID=92db983c-6e20-44dc-94d9-b7a454639bed rw quiet apparmor=1 security=apparmor resume=UUID=baed2966-837d-43d7-a342-1bdaf6a3723f udev.log_priority=3 i915.enable_guc=2
[    3.124505] i915 0000:00:02.0: VT-d active for gfx access
[    3.124607] i915 0000:00:02.0: vgaarb: deactivate vga console
[    3.175834] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    3.176626] [drm] Finished loading DMC firmware i915/icl_dmc_ver1_07.bin (v1.7)
[    3.177146] mei_hdcp mei::b638ab7e-94e2-4ea2-a552-d1c54b627f04:01: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[    3.324923] i915 0000:00:02.0: GuC firmware i915/icl_guc_33.0.0.bin version 33.0 submission:disabled
[    3.324924] i915 0000:00:02.0: HuC firmware i915/icl_huc_ver8_4_3238.bin version 8.4 authenticated:yes
[    3.326631] [drm] Initialized i915 1.6.0 20190822 for 0000:00:02.0 on minor 0
[    3.559978] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.571350] fbcon: i915drmfb (fb0) is primary device
[    3.618053] i915 0000:00:02.0: fb0: i915drmfb frame buffer device
$ sudo cat /sys/kernel/debug/dri/0/i915_huc_load_status
HuC firmware: i915/icl_huc_ver8_4_3238.bin
    status: RUNNING
    version: wanted 8.4, found 8.4
    uCode: 488576 bytes
    RSA: 256 bytes

HuC status 0x00000000:
$ sudo cat /sys/kernel/debug/dri/0/i915_guc_load_status
GuC firmware: i915/icl_guc_33.0.0.bin
    status: RUNNING
    version: wanted 33.0, found 33.0
    uCode: 384896 bytes
    RSA: 256 bytes

GuC status 0x800330ec:
    Bootrom status = 0x76
    uKernel status = 0x30
    MIA Core status = 0x3

Scratch registers:
     0:     0x0
     1:     0x0
     2:     0x181fd3
     3:     0x0
     4:     0x4000
     5:     0x40
     6:     0x328
     7:     0x0
     8:     0x0
     9:     0x0
    10:     0x0
    11:     0x0
    12:     0x0
    13:     0x0
    14:     0x0
    15:     0x0

Sadly, enabling GuC/HuC does not make any difference to the odd behavior of this GPU when using any graphics apps.

$ qmake --version
QMake version 3.1
Using Qt version 5.13.2 in /usr/lib

Which QT forum do you think might be a good place to post this issue?

Thanks again for your time, guys!

Kacper

krogala commented 4 years ago

AN UPDATE.

The graphics card works flawlessly on an Ubuntu live CD (Gnome). All apps are flying. I also tried booting a fresh Cinnamon Manjaro Live CD (5.3), and saw the same graphics issues as with my Gnome Manjaro 5.4.

Not sure how to explain this, but perhaps you will have a better idea than me.

It definitely has nothing to do with drivers themselves. I razed the entire /lib/firmware/intel folder on Manjaro, and replaced it with the working copy from Ubuntu. No difference.

Cheers,

Kacper

$ uname -a
Linux ubuntu 5.3.0-18-generic #19-Ubuntu SMP Tue Oct 8 20:14:06 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ sudo more /var/log/syslog |grep VGA
Nov 19 05:48:41 ubuntu kernel: [    1.010724] pci 0000:00:02.0: vgaarb: setting as boot VGA device
Nov 19 05:48:41 ubuntu kernel: [    1.010724] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
Nov 19 05:48:41 ubuntu kernel: [    1.236246] fb0: EFI VGA frame buffer device
Nov 19 05:48:41 ubuntu kernel: [    1.474965] fb0: switching to inteldrmfb from EFI VGA
Nov 19 05:48:41 ubuntu kernel: [    1.477549] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
Nov 19 05:49:04 ubuntu /usr/lib/gdm3/gdm-x-session[1964]: (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
$ sudo more /var/log/syslog |grep i915
Nov 19 05:48:41 ubuntu kernel: [    1.475033] i915 0000:00:02.0: vgaarb: deactivate vga console
Nov 19 05:48:41 ubuntu kernel: [    1.477549] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
Nov 19 05:48:41 ubuntu kernel: [    1.477880] [drm] Finished loading DMC firmware i915/icl_dmc_ver1_07.bin (v1.7)
Nov 19 05:48:41 ubuntu kernel: [    1.622624] [drm:_wa_add [i915]] *ERROR* Discarding overwritten w/a for reg 7034 (mask: ffffffff, value: 80000280)
Nov 19 05:48:41 ubuntu kernel: [    1.624685] [drm] Initialized i915 1.6.0 20190619 for 0000:00:02.0 on minor 0
Nov 19 05:48:41 ubuntu kernel: [    2.046999] fbcon: i915drmfb (fb0) is primary device
Nov 19 05:48:41 ubuntu kernel: [    2.091783] i915 0000:00:02.0: fb0: i915drmfb frame buffer device
Nov 19 05:48:41 ubuntu kernel: [   53.753875] mei_hdcp mei::b638ab7e-94e2-4ea2-a552-d1c54b627f04:01: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
Nov 19 05:48:41 ubuntu kernel: [   53.937281] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
arkadius commented 4 years ago

Kacper,

I recommend you recovering windows and configuring dual boot. It will be hard to do a few things without it. One of it is to upgrade the bios. Currently there is 1.0.13 version. There were a few important things that this upgrade fixes.

I have no idea why with live CD it works good. Maybe you have some broken files in system and reinstallation will fix it?

endeavour commented 4 years ago

Curious. You could try switching to the modesetting driver by uninstalling the xf86-video-intel package and rebooting. I had some issues with KDE that were resolved by this. You didn't mention which desktop environment you're using.

Edit: Ok I see you did mention it - still worth a shot though.

krogala commented 4 years ago

Bingo! It was the xf86-video-intel package. After removing it, all 3D graphics software is running properly now. Is there any advantage of having that intel package over the modesetting driver though? I'm using Gnome.

Arek, I will probably stick with the set up that I currently have, as it looks like my problem is fixed now. Do you think it might be beneficial for me to update BIOS anyway?

Cheers,

Kacper

arkadius commented 4 years ago

AFAIK there were some fixes with suspend issue, but I'm not pretty sure of this - I've upgrade bios to 1.0.13 at the very beginning of using the laptop. There are still some firmware issues like not works going into deep sleep suspend mode. It happens both on Windows and Linux (hence my assumption that it is related with firmware)

danielcherubini commented 4 years ago

I’ve got a Lenovo c940, it’s almost the same hardware config, I get the same issues you have here. Especially with anything chromium based. If I uninstall the Intel driver it’s fine.

But then I might get screen corruption, where it looks like the screen suddenly melts.