Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Enabling GuC on i7-8665U CPU
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
sunox
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2022
Posts: 136

PostPosted: Sat Dec 16, 2023 7:04 pm    Post subject: Enabling GuC on i7-8665U CPU Reply with quote

My graphical performance seems a bit bad on my laptop so I thought I would try to enable GuC. From what I understand this is possible with my CPU.

To do this you need to pass a guc_enable option to i915. i915 is a module in my case so I add options i915 guc_enable=1.

When I reboot this is what I see:

Code:

[   20.730254] Setting dangerous option enable_guc - tainting kernel
[   20.730681] i915 0000:00:02.0: [drm] Incompatible option enable_guc=1 - GuC submission is N/A
[   20.806271] Loading firmware: i915/kbl_guc_70.1.1.bin
[   20.811513] i915 0000:00:02.0: [drm] GuC firmware i915/kbl_guc_70.1.1.bin version 70.1.1
[  630.572286] Loading firmware: i915/kbl_guc_70.1.1.bin
[ 1699.350786] i915 0000:00:02.0: [drm] GuC firmware i915/kbl_guc_70.1.1.bin version 70.1.1


It looks to me like the guc_enable isn't applying. It also looks like it is trying to apply before the i915 is loaded.

Another weird thing about that output is that it seems to have loaded the guc firmware for Kaby Lake. I am on Whiskey Lake which is apparently a member of the Skylake family.

If I run modinfo -p i915 | grep guc this is what I get:

Code:

enable_guc:Enable GuC load for GuC submission and/or HuC load. Required functionality can be selected using bitmask values. (-1=auto [default], 0=disable, 1=GuC submission, 2=HuC load) (int)
guc_log_level:GuC firmware logging level. Requires GuC to be loaded. (-1=auto [default], 0=disable, 1..4=enable with verbosity min..max) (int)


It looks to me like it considers guc_enable=1 to be a valid option after all. This seems like further evidence that the option is being applied too early in boot.

Any advice is appreciated.[/quote]
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4158
Location: Bavaria

PostPosted: Sat Dec 16, 2023 8:21 pm    Post subject: Re: Enabling GuC on i7-8665U CPU Reply with quote

What happens if you use as kernel command line paramteters:
Quote:
i915.enable_guc=2 i915.enable_psr=0

?

Your other question about KabyLake: If i915 loads successfully i915/kbl_guc_70.1.1.bin you can be sure it is the correct firmware.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
sunox
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2022
Posts: 136

PostPosted: Sat Dec 16, 2023 8:42 pm    Post subject: Reply with quote

Thanks for the reply. It seems to work now? I'm not getting errors this time.

Code:

[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.1.67-gentoo-x86_64 root=/dev/mapper/gentoo-root ro crypt_root=/dev/nvme0n1p5 root=/dev/mapper/gentoo-root rootfstype=ext4 dolvm quiet i915.enable_guc=2 i915.enable_psr=0
[    0.069090] Kernel command line: BOOT_IMAGE=/vmlinuz-6.1.67-gentoo-x86_64 root=/dev/mapper/gentoo-root ro crypt_root=/dev/nvme0n1p5 root=/dev/mapper/gentoo-root rootfstype=ext4 dolvm quiet i915.enable_guc=2 i915.enable_psr=0
[   20.195247] Setting dangerous option enable_guc - tainting kernel
[   20.195252] Setting dangerous option enable_guc - tainting kernel
[   20.263850] Loading firmware: i915/kbl_guc_70.1.1.bin
[   20.269587] i915 0000:00:02.0: [drm] GuC firmware i915/kbl_guc_70.1.1.bin version 70.1.1


I'm confused about all the different intel gens that seem relevant to my system (cpu is whiskey lake, sound driver takes cannon lake, some other things seem to take skylake, gpu is kaby lake, etc.) but I guess as long as things work...

Thanks again. Does that mean the modprobe option setting was indeed being applied too early? Or was guc being 'outcompeted' by this psr feature or something.[/code]
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4158
Location: Bavaria

PostPosted: Sat Dec 16, 2023 9:27 pm    Post subject: Reply with quote

sunox wrote:
Thanks again.

You are very Welcome ! :D

sunox wrote:
[...] Does that mean the modprobe option setting was indeed being applied too early? Or was guc being 'outcompeted' by this psr feature or something.

TBH ... I'm already happy when the (faulty) i915 runs ANYWAY ... sometimes it's just a simple trial and error. The next thing I would have recommended to you would have been:
Quote:
i915.enable_guc=3

(see also here: https://wiki.gentoo.org/wiki/Intel#GuC.2FHuC_firmware)


(I have also an Intel GPU from a RaptorLake ... and I am waiting for this:
https://www.phoronix.com/news/Intel-Xe-Submission-Linux-6.8 )
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
sunox
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2022
Posts: 136

PostPosted: Sat Dec 16, 2023 9:44 pm    Post subject: Reply with quote

Oh I wasn't fully paying attention. the "guc_enable=2" option tries to enable HuC which I don't really want as it requires enabling kernel features I don't want. I tried "=1" again, this time as a kernel param, and I get the same "Incompatible option; GuC submission is N/A" error in dmesg.

I looked around some more and it seems GuC is not available in Kaby Lake. So unless i915 is somehow grabbing the wrong firmware (which is apparently not possible) I am out of luck.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4158
Location: Bavaria

PostPosted: Sat Dec 16, 2023 10:55 pm    Post subject: Reply with quote

Have you tried ...=3 ?
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
sunox
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2022
Posts: 136

PostPosted: Sat Dec 16, 2023 11:11 pm    Post subject: Reply with quote

I get the same 'GuC submission is N/A' error. I take it I don't get any errors for for HuC or whatever the other thing is called because I don't have the proper kernel support for it.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4158
Location: Bavaria

PostPosted: Sat Dec 16, 2023 11:27 pm    Post subject: Reply with quote

Well, the main thing was that the DMC could be loaded.

(although I'm a little surprised, because GPU Gen. 9.5 should actually have GUC 8O )
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
sunox
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2022
Posts: 136

PostPosted: Sat Dec 16, 2023 11:41 pm    Post subject: Reply with quote

Reading some more, and if GuC isn't supported it's supposed to explicitly say so when you try to enable it. The message I'm getting seems to say that I'm trying to set the wrong option.

I see this in the guc debugging file:

Code:

localhost /sys/kernel/debug/dri/0/gt/uc # cat guc_info
GuC firmware: i915/kbl_guc_70.1.1.bin
   status: RUNNING
   version: found 70.1.1
   uCode: 206592 bytes
   RSA: 256 bytes

GuC status 0x8003f0ed:
   Bootrom status = 0x76
   uKernel status = 0xf0
   MIA Core status = 0x3

Scratch registers:
   0:    0xf0000000
   1:    0x1
   2:    0x1000
   3:    0x0
   4:    0x40
   5:    0x27fa
   6:    0x3ea00002
   7:    0x0
   8:    0x0
   9:    0x0
   10:    0x0
   11:    0x0
   12:    0x0
   13:    0x0
   14:    0x0
   15:    0x0

GuC logging stats:
   Relay full count: 0
   DEBUG:   flush count          0, overflow count          0
   CRASH:   flush count          0, overflow count          0
   CAPTURE:   flush count          0, overflow count          0


This output looks very much like how it's supposed to look when GuC is enabled, according to some intel documentation(https://cdrdv2-public.intel.com/609249/609249-final-enabling-intel-guc-huc-advanced-gpu-features-v1-1-1.pdf). When it's not working those statuses are all 0x00, and the firmware status says NONE.

"huc_info" in the same dir as "guc_info" merely says "HuC disabled".

I wonder if it's actually working?

Edit: The 'usage' file in the same dir says:

Code:

[guc] supported:yes wanted:yes used:yes
[huc] supported:yes wanted:no used:no
[submission] supported:no wanted:no used:no


I guess that makes it pretty clear! Thanks again for the help.
Back to top
View user's profile Send private message
sunox
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2022
Posts: 136

PostPosted: Sun Dec 17, 2023 12:35 am    Post subject: Reply with quote

I decided to try to add huc as well, and just adding the following in case it helps someone else.

It seems that you have to set "enable_guc" to some value to get either guc or huc to load.

enable_guc=1 seems to enable guc
enable_guc=2 seems to enable them both

I also have a feeling that I am supposed to regenerate initramfs after adding "enable_guc" to a file in modprobe.d, which I wasn't doing most of the time when testing earlier.

I now no longer get the 'invalid option' warnings in dmesg.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum