[Solved] Black screen often when using graphic apps Intel i3

#1

I have recently been getting a black screen while using an app, especially a graphic app such as Krita, Inkscape, even Okular. The cursor still works and I can switch to a terminal and reboot, but it is happening so often the PC is becoming unusable. I suspect it has something to do with the intel driver. What happens is the app crashes and then I have the black screen.
I have attached a screen shot of the settings manager.

I get the following error msg with mhwd:

sudo mhwd-gpu --status
:: status
warning: could not find '/etc/X11/xorg.conf.d/90-mhwd.conf'!

The output of the inxi command is:

System:    Host: chromebox Kernel: 5.0.9-2-MANJARO x86_64 bits: 64 compiler: gcc v: 8.3.0 
           Desktop: KDE Plasma 5.15.4 Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: GOOGLE model: Panther v: 1.0 serial: <root required> UEFI: coreboot 
           v: MrChromebox date: 07/14/2017 
CPU:       Topology: Dual Core model: Intel Core i3-4010U bits: 64 type: MT MCP arch: Haswell rev: 1 
           L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 13574 
           Speed: 1097 MHz min/max: 800/1700 MHz Core speeds (MHz): 1: 1027 2: 975 3: 923 4: 936 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics vendor: Google driver: i915 v: kernel 
           bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.4 driver: intel unloaded: modesetting tty: N/A 
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 19.0.3 direct render: Yes 
Audio:     Device-1: Intel Haswell-ULT HD Audio vendor: Google driver: snd_hda_intel v: kernel 
           bus ID: 00:03.0 
           Device-2: Intel 8 Series HD Audio vendor: Google driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.0.9-2-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: N/A port: 2000 
           bus ID: 01:00.0 
           Device-2: Qualcomm Atheros AR9462 Wireless Network Adapter vendor: Lite-On driver: ath9k 
           v: kernel port: 2000 bus ID: 02:00.0 
           IF: wlp2s0 state: up mac: b8:ee:65:4e:e1:87 
Drives:    Local Storage: total: 1.93 TiB used: 1.23 TiB (63.7%) 
           ID-1: /dev/sda model: SB M2 SSD size: 111.79 GiB 
           ID-2: /dev/sdb type: USB vendor: Western Digital model: WD Elements 25A2 size: 1.82 TiB 
Partition: ID-1: / size: 28.71 GiB used: 17.75 GiB (61.8%) fs: ext4 dev: /dev/sda2 
           ID-2: /home size: 76.94 GiB used: 64.35 GiB (83.6%) fs: ext4 dev: /dev/sda4 
           ID-3: swap-1 size: 3.91 GiB used: 9.0 MiB (0.2%) fs: swap dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 99.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 186 Uptime: 24m Memory: 3.73 GiB used: 1.85 GiB (49.5%) Init: systemd Compilers: 
           gcc: 8.3.0 clang: 8.0.0 Shell: bash v: 5.0.3 inxi: 3.0.33 

After the first crash of today with Krita (but it happens even with pdf viewers), I get the following output.
dmesg:

[12018.363985] Thread (pooled)[8606]: segfault at 3 ip 00007f99316cf130 sp 00007f98fbffe3b8 error 4 in libkritaflake.so.17.0.0[7f99316a3000+179000]
[12018.364005] Code: eb 16 0f 1f 84 00 00 00 00 00 48 8b 17 8b 42 38 a8 01 74 bc a8 02 75 b8 83 e0 f7 89 42 38 eb b0 66 2e 0f 1f 84 00 00 00 00 00 <48> 8b 17 8b 4a 38 f6 c1 01 74 07 31 c0 83 e1 08 74 04 0f b6 42 3c
[12018.364082] audit: type=1701 audit(1557965234.922:146): auid=1000 uid=1000 gid=1000 ses=2 pid=8014 comm=5468726561642028706F6F6C656429 exe="/usr/bin/krita" sig=11 res=1
[12018.410742] audit: type=1130 audit(1557965234.969:147): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-8608-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[12032.951863] audit: type=1131 audit(1557965249.509:148): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-8608-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

and the following output of journalctl -xb | grep -iE 'failed|error'

May 16 10:07:21 chromebox kwin_x11[1116]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 34420, resource id: 81788961, major code: 15 (QueryTree), minor code: 0
-- This usually indicates a programming error in the crashing program and
May 16 10:07:40 chromebox plasmashell[1126]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 48502, resource id: 81788961, major code: 142 (Unknown), minor code: 3
May 16 10:07:41 chromebox plasmashell[1126]: qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 48580, resource id: 60817424, major code: 142 (Unknown), minor code: 3
May 16 10:07:41 chromebox plasmashell[1126]: qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 48581, resource id: 73400337, major code: 142 (Unknown), minor code: 3
May 16 10:07:53 chromebox kwin_x11[1116]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 41731, resource id: 75497472, major code: 18 (ChangeProperty), minor code: 0
May 16 10:07:53 chromebox kwin_x11[1116]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 41735, resource id: 75497473, major code: 18 (ChangeProperty), minor code: 0

I have been using this computer (which I know is underpowered) for some years without any problem like this.
[Solved]
There appears to be a bug introduced in kernel 4.19.26. I was running 4.19.36 and when I struck the problem I tried 5.0.9-2 but the issue remained. So I reverted to 4.14.113-1 and I haven't been able to reproduce the black screen. :grin:
See Bug report 1
and
Bug report 2