# [SOLVED] Kernel 5.3.11 hangs intel GPU

## Cazzantonio

I recently upgraded from kernel 5.3.8 to 5.3.11, so it's just a minor upgrade.

Curiously, when I launch libreoffice, the system freezes for few seconds and I get this in dmesg output:

```
i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
```

This is 100% reproducible

Switching back to 5.3.8 the problem disappears

Here my system specs:

```
heavensdoor ~ # inxi -Fzm

System:    Host: heavensdoor Kernel: 5.3.8-gentoo x86_64 bits: 64 Desktop: Xfce 4.14.1 Distro: Gentoo Base System release 2.6 

Machine:   Type: Laptop System: Notebook product: P9XXRC v: N/A serial: N/A 

           Mobo: Notebook model: P9XXRC serial: N/A UEFI: INSYDE v: 1.07.04 date: 05/03/2019 

Battery:   ID-1: BAT0 charge: 59.2 Wh condition: 59.2/56.2 Wh (105%) 

Memory:    RAM: total: 31.08 GiB used: 803.1 MiB (2.5%) 

           Array-1: capacity: 32 GiB slots: 2 EC: None 

           Device-1: ChannelA-DIMM0 size: 16 GiB speed: 3000 MT/s 

           Device-2: ChannelB-DIMM0 size: 16 GiB speed: 3000 MT/s 

CPU:       Topology: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP L2 cache: 12.0 MiB 

           Speed: 800 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 800 2: 800 3: 801 4: 800 5: 801 6: 800 7: 800 8: 800 

           9: 800 10: 800 11: 801 12: 801 

Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 

           Device-2: NVIDIA TU116M [GeForce GTX 1660 Mobile] driver: N/A 

           Display: server: X.Org 1.20.5 driver: intel unloaded: modesetting,vesa resolution: 1920x1080~144Hz 

           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2) v: 4.5 Mesa 19.1.8 

Audio:     Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel 

           Device-2: NVIDIA driver: snd_hda_intel 

           Sound Server: ALSA v: k5.3.8-gentoo 

Network:   Device-1: Qualcomm Atheros AR9462 Wireless Network Adapter driver: ath9k 

           IF: wlp8s0 state: up mac: <filter> 

           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 

           IF: enp9s0 state: down mac: <filter> 

           IF-ID-1: sit0 state: down mac: <filter> 

           IF-ID-2: tunl0 state: down mac: <filter> 

Drives:    Local Storage: total: 1.38 TiB used: 173.88 GiB (12.3%) 

           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 PRO 512GB size: 476.94 GiB 

           ID-2: /dev/sda vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB 

Partition: ID-1: / size: 100.00 GiB used: 7.93 GiB (7.9%) fs: btrfs dev: /dev/dm-0 

           ID-2: /home size: 276.45 GiB used: 4.57 GiB (1.7%) fs: btrfs dev: /dev/dm-1 

Sensors:   System Temperatures: cpu: 58.0 C mobo: N/A 

           Fan Speeds (RPM): N/A 

Info:      Processes: 296 Uptime: 44m Shell: bash inxi: 3.0.36 

```

Anyone has a clue about whant happened in 5.3.11?

[edit]

The problem is not present also in 5.3.10, so it must have appeared between these two versions...

----------

## Perfect Gentleman

Haswell, xf86-video-intel. No such problem.

----------

## fturco

@Cazzantonio: you may try to use git bisect in order to find the first bad commit. See this Gentoo wiki article for details.

----------

## Hu

Can you bisect between v5.3.10 and v5.3.11 to find the specific offending patch?  Based on the error message, it's probably a patch to the i915 graphics code.

----------

## Cazzantonio

Thanks for the tip. It will take a while but I'll try to find the incriminated patch.

----------

## Perfect Gentleman

Maybe this bug - https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00260.html

----------

## Cazzantonio

Found!

```
77fc9100fc5768ca01ca2dd2cc5a515a4723a58a is the first bad commit

commit 77fc9100fc5768ca01ca2dd2cc5a515a4723a58a

Author: Jon Bloomfield <jon.bloomfield@intel.com>

Date:   Thu Sep 27 10:23:17 2018 -0700

    drm/i915/cmdparser: Use explicit goto for error paths

    

    commit 0546a29cd884fb8184731c79ab008927ca8859d0 upstream.

    

    In the next patch we will be adding a second valid

    termination condition which will require a small

    amount of refactoring to share logic with the BB_END

    case.

    

    Refactor all error conditions to jump to a dedicated

    exit path, with 'break' reserved only for a successful

    parse.

    

    Cc: Tony Luck <tony.luck@intel.com>

    Cc: Dave Airlie <airlied@redhat.com>

    Cc: Takashi Iwai <tiwai@suse.de>

    Cc: Tyler Hicks <tyhicks@canonical.com>

    Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com>

    Reviewed-by: Chris Wilson <chris.p.wilson@intel.com>

    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 drivers/gpu/drm/i915/i915_cmd_parser.c | 25 +++++++++++++------------

 1 file changed, 13 insertions(+), 12 deletions(-)
```

What do I have to do now? I signaled this both on gentoo and linux bugzilla...

----------

## fedeliallalinea

Cazzantonio you aren't in Italian forum  :Razz: 

 *it wrote:*   

> Che faccio? Lo segnalo sul bugzilla di gentoo o di linux?

 

 *en wrote:*   

> What I do? I report this on the gentoo or linux bugzilla?

 

In think that this problem is already reported in kernel bugzilla, in my opinion you can open new gentoo bug because can be useful to someone.

----------

## Cazzantonio

 *fedeliallalinea wrote:*   

> Cazzantonio you aren't in Italian forum  

 

Yes sorry I realized a minute later   :Very Happy: 

I did already sent the bug to the kernel bugzilla, now I updated with the git bisect log.

I also opened a bug on gentoo bugzilla.

In the meantime I have to stay clear of 5.3.11 and future updates...

----------

## fturco

@Cazzantonio: please post the URLs of those two bug reports you filed, so others with your same problem can benefit, too.

----------

## Cazzantonio

https://bugzilla.kernel.org/show_bug.cgi?id=205545

https://bugs.gentoo.org/700782

The problem is still present in 5.3.12

----------

## tholin

 *Cazzantonio wrote:*   

> What do I have to do now? I signaled this both on gentoo and linux bugzilla...

 

You need to send an email jon.bloomfield@intel.com and CC intel-gfx@lists.freedesktop.org and describe your problem. Kernel developers almost never check the kernel bugzilla.

----------

## Cazzantonio

The problem is still present in 5.3.13 but disappeared in 5.4.0, so I guess someone noticed and committed a patch.

I guess this closes the case  :Smile: 

----------

## mbar

5.4.0 still doesn't work for me (Skylake laptop), causes 100% power on Intel GPU.

I also found this: https://bugs.freedesktop.org/show_bug.cgi?id=111837 (please see last comment), but no solution.

How do I revert that commit?

----------

## Cazzantonio

I discovered that 5.4.0 now randomly hangs the whole notebook without any warning. No logs, just freeze.

I got a bit sick of debugging this mess, so I think I'll stick with 5.3.10 for a while...

----------

## mbar

https://bugs.freedesktop.org/show_bug.cgi?id=112315

----------

