freebsd / drm-kmod

drm driver for FreeBSD
155 stars 69 forks source link

Loading firmware on alder lake freezes system #252

Closed rkoberman closed 9 months ago

rkoberman commented 1 year ago

Describe the bug Loading drm-515-kmod with gpu-firmware-intel-kmod installed causes in instant freeze with no output or log messages. The system cannot be pinged and only a power cycle and reboot can get any response. The port must be deleted to bring hte system up. Freeze occurs whether the driver is loaded during startup (kld_list or manual load after boot completion (no graphics startup.)

FreeBSD version FreeBSD ptavv 14.0-CURRENT FreeBSD 14.0-CURRENT #12 main-n262908-c16e08e5f324-dirty: Thu May 11 17:01:29 PDT 2023 root@ptavv:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 PCI Info

pciconf -lv

DRM KMOD version drm-515-kmod 5.15.25_3 To Reproduce Steps to reproduce the behavior: Load i915kms.ko

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

decke commented 1 year ago

Same here with 14.0-BETA1 on similar hardware. Any idea how to debug this?

rkoberman commented 1 year ago

On Wed, Sep 13, 2023 at 12:20 PM Bernhard Fröhlich @.***> wrote:

Same here with 14.0-BETA1 on similar hardware. Any idea how to debug this?

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1718185283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW24HAATRX2K5YU7IDIDX2IBQJANCNFSM6AAAAAAYA6EGEY . You are receiving this because you authored the thread.Message ID: @.***>

I will mention that the interface will work with drm-515-kmod if you deinstall the gpu-firmware* package/port. The graphics will "work" fine, but no hardware acceleration. Everything is software rendered, I can view 4K video with no issues, but the CPU is pretty busy. I note that Intel has released several updates to the firmware package since the February 10 version, but I have not tried making one work, so far.

I can't think of any way to debug as it simply deadlocks the system with no information. I don't know of a process to debug firmware load, but I assume there is one and I'd be VERY happy to help if I had any clue how to proceed. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

cperciva commented 11 months ago

Same here on 14.0-RC1. Happy to help test patches.

rkoberman commented 11 months ago

I see that there have been several updated versions of firmware released since the current. Could one of those help? Can I just pull down the firmware and drop in the new files? Again, I have no real expertise on this, but would really like to get my Alder Lake system to have acceleration would really be great. Happy to do testing or gather any information that might help.

cperciva commented 11 months ago

Per request from manu:

$ pciconf -lv vgapci0
vgapci0@pci0:0:2:0:     class=0x030000 rev=0x0c hdr=0x00 vendor=0x8086 device=0x46a6 subvendor=0xf111 subdevice=0x0002
    vendor     = 'Intel Corporation'
    device     = 'Alder Lake-P Integrated Graphics Controller'
    class      = display
    subclass   = VGA
djfiander commented 11 months ago

I'm seeing the same problem on 14.0-RC3, but I do see some messages in the log between the call to kldload and the system hanging:

Oct 28 16:32:41 victoria kernel: iic0: <I2C generic I/O> on iicbus0 Oct 28 16:32:42 victoria kernel: drmn0: on vgapci0 Oct 28 16:32:42 victoria kernel: vgapci0: child drmn0 requested pci_enable_io Oct 28 16:32:42 victoria syslogd: last message repeated 1 times Oct 28 16:32:42 victoria kernel: drmn0: [drm] Incompatible option enable_guc=-1 - undocumented flag Oct 28 16:32:42 victoria kernel: [drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19). Oct 28 16:32:42 victoria kernel: [drm] Got stolen memory base rx4b800000, size 0x4000000 Oct 28 16:32:42 victoria kernel: lkpi_iic0: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus1: on lkpi_iic0 Oct 28 16:32:42 victoria kernel: iic1: <I2C generic I/O> on iicbus1 Oct 28 16:32:42 victoria kernel: lkpi_iic1: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus2: on lkpi_iic1 Oct 28 16:32:42 victoria kernel: iic2: <I2C generic I/O> on iicbus2 Oct 28 16:32:42 victoria kernel: lkpi_iic2: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus3: on lkpi_iic2 Oct 28 16:32:42 victoria kernel: iic3: <I2C generic I/O> on iicbus3 Oct 28 16:32:42 victoria kernel: lkpi_iic3: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus4: on lkpi_iic3 Oct 28 16:32:42 victoria kernel: iic4: <I2C generic I/O> on iicbus4 Oct 28 16:32:42 victoria kernel: lkpi_iic4: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus5: on lkpi_iic4 Oct 28 16:32:42 victoria kernel: iic5: <I2C generic I/O> on iicbus5 Oct 28 16:32:42 victoria kernel: lkpi_iic5: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus6: on lkpi_iic5 Oct 28 16:32:42 victoria kernel: iic6: <I2C generic I/O> on iicbus6 Oct 28 16:32:42 victoria kernel: lkpi_iic6: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus7: on lkpi_iic6 Oct 28 16:32:42 victoria kernel: iic7: <I2C generic I/O> on iicbus7 Oct 28 16:32:42 victoria kernel: lkpi_iic7: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus8: on lkpi_iic7 Oct 28 16:32:42 victoria kernel: iic8: <I2C generic I/O> on iicbus8 Oct 28 16:32:42 victoria kernel: lkpi_iic8: Oct 28 16:32:42 victoria kernel: on drmn0 Oct 28 16:32:42 victoria kernel: iicbus9: on lkpi_iic8 Oct 28 16:32:42 victoria kernel: iic9: <I2C generic I/O> on iicbus9 Oct 28 16:32:42 victoria kernel: drmn0: successfully loaded firmware image 'i915/adls_dmc_ver2_01.bin' Oct 28 16:32:42 victoria kernel: drmn0: [drm] Finished loading DMC firmware i915/adls_dmc_ver2_01.bin (v2.1) Oct 28 16:32:42 victoria kernel: drmn0: successfully loaded firmware image 'i915/tgl_guc_62.0.0.bin' Oct 28 16:32:42 victoria kernel: drmn0: successfully loaded firmware image 'i915/tgl_huc_7.9.3.bin'

ko56 commented 11 months ago

I have the same problem. 14.0-RC4, Intel Alderlake-S graphics, and drm-515-kmod, version 5.15.118. See the tail end of #232.

neelchauhan commented 11 months ago

I had a similar issue back on 14-CURRENT. I gave up on FreeBSD because modern hardware support isn't a priority.

FreeBSD can't even support graphics on a 12th Gen HP Spectre. Linux has graphics on a M2 Mac, despite reverse engineered drivers. OpenBSD has graphics on 12th and 13th Gen Intel. Trust me, I've had them all.

bapt commented 11 months ago

@neelchauhan first this is bullshit andgratuicious claim. There are people who spend a countless amount of time on drm drivers! and your comment is clearly inappropriate to them and also a totally useful comment, it helps noone here.

decke commented 11 months ago

And to make it clear. My NUC 12 Pro (i5-1240p) runs great on FreeBSD 14.0-RC4 even without this gpu firmware. It is my daily driver for half a year now and I have yet to find something that it can't handle. (*)

(*) I am not playing any modern games on it so don't know about that but multimedia and usual browser stuff is just fine.

thewanderingtraderm commented 10 months ago

Same problem here. When is it going to be fixed?

tdm4 commented 10 months ago

Same issue here:

vgapci0@pci0:0:2:0:     class=0x030000 rev=0x0c hdr=0x00 vendor=0x8086 device=0x4628 subvendor=0x1558 subdevice=0x4150
     vendor    = 'Intel Corporation'
     device    = 'Alder Lake-UP3 GT2 [UHD Graphics]'
     class     = display
     subclass  = VGA

Had to use the scfb driver in Xorg to get any kind of graphics. Running kldload i915kms causes the system to completely lock up and freeze. Holding down the power button is the only way to bring the machine back.

rkoberman commented 10 months ago

And, as in 252, deleting the firmware port will allow it to run... with software rendering. Not great, but better than scfb. Among other things, screen brightness management work.

On Fri, Dec 8, 2023, 13:41 Tom Murphy @.***> wrote:

Same issue here:

@.***:0:2:0: class=0x030000 rev=0x0c hdr=0x00 vendor=0x8086 device=0x4628 subvendor=0x1558 subdevice=0x4150 vendor = 'Intel Corporation' device = 'Alder Lake-UP3 GT2 [UHD Graphics]' class = display subclass = VGA

Had to use the scfb driver in Xorg to get any kind of graphics. Running kldload i915kms causes the system to completely lock up and freeze. Holding down the power button is the only way to bring the machine back.

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1847876370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW27N4QEFYY3JVRRREULYIOCPBAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXHA3TMMZXGA . You are receiving this because you authored the thread.Message ID: @.***>

tdm4 commented 10 months ago

@rkoberman - I copied away these files from /boot/modules: i915_adlp_*.ko and once I loaded i915kms, it worked and I could load X using modesetting, just no 3D acceleration as you mention. It's better than scfb (I can get redshift to work in it)

ko56 commented 9 months ago

I am also using scfb right now, and I have removed the drm-515 package entirely. But did you have any problems with DPMS? See https://forums.freebsd.org/threads/xlib-extension-dpms-missing-on-display-0-0-14-0-release-xfce4.91257/. (The problem seems related to running xfce4-screensaver.) If so, did what you did help?

@rkoberman - I copied away these files from /boot/modules: i915_adlp_*.ko and once I loaded i915kms, it worked and I could load X using modesetting, just no 3D acceleration as you mention. It's better than scfb (I can get redshift to work in it)

rkoberman commented 9 months ago

On Tue, Dec 12, 2023 at 6:07 AM ko56 @.***> wrote:

I am also using scfb right now, and I have removed the drm-515 package entirely. But did you have any problems with DPMS? See https://forums.freebsd.org/threads/xlib-extension-dpms-missing-on-display-0-0-14-0-release-xfce4.91257/. If so, did what you did help?

@rkoberman https://github.com/rkoberman - I copied away these files from /boot/modules: i915adlp*.ko and once I loaded i915kms, it worked and I could load X using modesetting, just no 3D acceleration as you mention. It's better than scfb (I can get redshift to work in it)

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1852107041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW246ZIGIYLD4ORH2HVDYJBQLLAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSGEYDOMBUGE . You are receiving this because you were mentioned.Message ID: @.***>

scfb is extremely limited in its capabilities. It works, but that's about it. Things like redshift and backlight all work. Pretty much all that is lost is acceleration. For hte most part, not being a gamer, the only time I notice this is when attempting to play an HD video while doing a big compile (e.g. firefox or llvm). I have seen no downsides to using drm-515-kmod. Before drm-515-knod I used scfb (no alternative) and am much happier, now.

I just deleted the gpu-firmware-intel-kmod port and it worked. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

rkoberman commented 9 months ago

Forgot to mention that I have not seen any issues with DPMS, though I have only used the laptop's display. No errors logged.

On Tue, Dec 12, 2023 at 12:04 PM Kevin Oberman @.***> wrote:

On Tue, Dec 12, 2023 at 6:07 AM ko56 @.***> wrote:

I am also using scfb right now, and I have removed the drm-515 package entirely. But did you have any problems with DPMS? See https://forums.freebsd.org/threads/xlib-extension-dpms-missing-on-display-0-0-14-0-release-xfce4.91257/. If so, did what you did help?

@rkoberman https://github.com/rkoberman - I copied away these files from /boot/modules: i915adlp*.ko and once I loaded i915kms, it worked and I could load X using modesetting, just no 3D acceleration as you mention. It's better than scfb (I can get redshift to work in it)

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1852107041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW246ZIGIYLD4ORH2HVDYJBQLLAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSGEYDOMBUGE . You are receiving this because you were mentioned.Message ID: @.***>

scfb is extremely limited in its capabilities. It works, but that's about it. Things like redshift and backlight all work. Pretty much all that is lost is acceleration. For hte most part, not being a gamer, the only time I notice this is when attempting to play an HD video while doing a big compile (e.g. firefox or llvm). I have seen no downsides to using drm-515-kmod. Before drm-515-knod I used scfb (no alternative) and am much happier, now.

I just deleted the gpu-firmware-intel-kmod port and it worked.

Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

-- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

ko56 commented 9 months ago

Doesn't work for me. Deleted the gpu-firmware-intel-kmod-alderlake package. Then added drm-515-kmod. Without a 20-scfb.conf file in /usr/local/etc/X11/xorg.conf.d, the system freezes.

rkoberman commented 9 months ago

On Tue, Dec 12, 2023, 15:26 ko56 @.***> wrote:

Doesn't work for me. Deleted the gpu-firmware-intel-kmod-alderlake package. Then added drm-515-kmod. Without a 20-scfb.conf file in /usr/local/etc/X11/xorg.conf.d, the system freezes.

Check your boot messages for a message about firmware load. 'dmesg -a'. This should show any error prior to the freeze, though not the actual trigger. Also, are you manually loading i915, /etc/rc.conf or other method

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1852995658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW2ZT3ZOG3GGYOZGHCCDYJDRZZAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJSHE4TKNRVHA . You are receiving this because you were mentioned.Message ID: @.***>

ko56 commented 9 months ago

I checked dmesg -a after the freeze, by powering down and then booting single-user. No error messages. I do not explicitly load anything in /etc/rc.conf. And I have nothing in /usr/local/etc/X11/xorg.conf.d. The whole thing is very mysterious. Maybe the difference with you has something to do with my system not being a laptop?

rkoberman commented 9 months ago

If you are not loading i915kms via rc.conf, how do you load it? Are you loading it manually (kldload)? The only ways that load it safely are manually or in rc.conf via the kld_load statement.

I am not surprised that you found no messages about the freeze, but I was hoping for something that might either help or point to a different issue. It is also odd that you did not get a message about the missing firmware if it is not present on your system. That should happen before the driver actually loads.

On Wed, Dec 13, 2023 at 2:40 PM ko56 @.***> wrote:

I checked dmesg -a after the freeze, by powering down and then booting single-user. No error messages. I do not explicitly load anything in /etc/rc.conf. The whole thing is very mysterious. Maybe the difference with you has something to do with my system not being a laptop?

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1854808917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW23Q7ABPHAS4I4X7IUDYJIVGBAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJUHAYDQOJRG4 . You are receiving this because you were mentioned.Message ID: @.***>

-- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

ko56 commented 9 months ago

I don't load it manually either. Somehow the X server loads it by itself. Probably because of the /usr/local/etc/X11/xorg.conf.d/20-scfb.conf After removing drm-515-kmod, what is on my system is drm-510-kmod, and gpu-firmware-intel-kmod-alderlake20230210_1 and gpu-firmware-intel-kmod-tigerlake-20230210_1.

rkoberman commented 9 months ago

On Sat, Dec 16, 2023 at 6:15 AM ko56 @.***> wrote:

I don't load it manually either. Somehow the X server loads it by itself. Probably because of the /usr/local/etc/X11/xorg.conf.d/20-scfb.conf What is on my system is drm-510-kmod (not 515), and gpu-firmware-intel-kmod-alderlake20230210_1 and gpu-firmware-intel-kmod-tigerlake-20230210_1.

That explains it. drm-510-kmod does not support Alder Lake cards. You need drm-515-kmod. You also must be running 14.0 or newer. I'm pretty sure that older versions like the lkpi support for drm-515-kmod. This assumes that your CPU is Alder Lake. You can confirm with "pciconf -lv | grep -B3 -A1 display".

E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

rkoberman commented 9 months ago

On Sat, Dec 16, 2023 at 10:54 AM Kevin Oberman @.***> wrote:

On Sat, Dec 16, 2023 at 6:15 AM ko56 @.***> wrote:

I don't load it manually either. Somehow the X server loads it by itself. Probably because of the /usr/local/etc/X11/xorg.conf.d/20-scfb.conf What is on my system is drm-510-kmod (not 515), and gpu-firmware-intel-kmod-alderlake20230210_1 and gpu-firmware-intel-kmod-tigerlake-20230210_1.

That explains it. drm-510-kmod does not support Alder Lake cards. You need drm-515-kmod. You also must be running 14.0 or newer. I'm pretty sure that older versions like the lkpi support for drm-515-kmod. This assumes that your CPU is Alder Lake. You can confirm with "pciconf -lv | grep -B3 -A1 display".

E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

Sorry. Typo. "older versions lack the lkpi support"

-- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

ko56 commented 9 months ago

Yes, of course. See my original post (and some of the later ones) in this thread. Now I am at 14.0-RELEASE-p3 with the same problem: drm-515-kmod freezes the system, so I've reverted to drm-510-kmod.

rkoberman commented 9 months ago

On Sat, Dec 16, 2023 at 5:10 PM ko56 @.***> wrote:

Yes, of course. See my original post (and some of the later ones) in this thread. Now I am at 14.0-RELEASE-p3 with the same problem: drm-515-kmod freezes the system, so I've reverted to drm-510-kmod.

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-1859004440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW2YEHFGZY6QAPJRYPBTYJZBAHAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGAYDINBUGA . You are receiving this because you were mentioned.Message ID: @.***>

Sorry for the late response, but this has been a really busy week plus I lot my system after a bad update to head.

Last suggestion... What does "locate i915_adlp" show?. Or try "ls /boot/modules/i915_adlp-*". If it is not found, I am out of ises. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

ko56 commented 9 months ago

This is in my /boot/modules:

i915_adlp_dmc_bin.ko          i915_adlp_dmc_ver2_12_bin.ko
i915_adlp_dmc_ver2_10_bin.ko  i915_adlp_guc_62_0_3_bin.ko

As I said above, this is with the drm-510-kmod pkg, I've removed drm-515-kmod.

It would be helpful if you could send the following info, so I could compare with my system, and, hopefully, nail this down better: 1) CPU and GPU. 2) What drm-5xx-mod pkg you have. 3) What /etc/rc.conf loads, or you otherwise load. 4) What you have removed from gpu-firmware-intel by hand. 5) Anything else that you think may be relevant. Maybe smth. from /var/log/Xorg.0.log ? 6) What is the result of all this, i.e. what GPU does your OS think it is supporting. Maybe Xorg.0.log has all that's needed.

IN any case, thanks for all your help.

rkoberman commented 9 months ago

On Tue, Dec 26, 2023 at 1:27 PM ko56 @.***> wrote:

This is in my /boot/modules:

i915_adlp_dmc_bin.ko i915_adlp_dmc_ver2_12_bin.ko i915_adlp_dmc_ver2_10_bin.ko i915_adlp_guc_62_0_3_bin.ko

As I said above, this is with the drm-510-kmod pkg, I've removed drm-515-kmod.

It would be helpful if you could send the following info, so I could compare with my system, and, hopefully, nail this down better:

  1. CPU and GPU.

    12th Gen Intel(R) Core(TM) i5-1235U (2496.00-MHz K8-class CPU) Alder Lake-UP3 GT2 [Iris Xe Graphics

  2. What drm-5xx-mod pkg you have.

    drm-515-kmod-5.15.118_3

  3. What /etc/rc.conf loads, or you otherwise load.

    kld_list="cpuctl acpi_ibm acpi_video filemon" I am manually loading drm-515-kmod due to issues with the iwlwifi driver.

  4. What you have removed from gpu-firmware-intel by hand.

Nothing. I remove the gpu-firmware-intel-kmod-alderlake ( @.***) completely.

  1. Anything else that you think may be relevant. Maybe smth. from /var/log/Xorg.0.log ?

I keep hoping for something, but have never found anything.

  1. What is the result of all this, i.e. what GPU does your OS think it is supporting. Maybe Xorg.0.log has all that's needed.'

I run the modesetting driver. (I don't have the old Intel driver as it has not been maintained for a long time. [ 175.846] (II) modeset(0): Refusing to try glamor on llvmpipe [ 175.866] (II) modeset(0): glamor initialization failed [ 175.866] (II) modeset(0): ShadowFB: preferred YES, enabled YES [ 175.866] (II) modeset(0): Double-buffered shadow updates: off [ 175.868] (II) modeset(0): Output eDP-1 has no monitor section [ 175.868] (II) modeset(0): Output DP-1 has no monitor section [ 175.870] (II) modeset(0): Output DP-2 has no monitor section [ 175.870] (II) modeset(0): Output DP-3 has no monitor section [ 175.872] (II) modeset(0): Output DP-4 has no monitor section [ 175.874] (II) modeset(0): EDID for output eDP-1 [ 175.874] (II) modeset(0): Manufacturer: CMN Model: 1614 Serial#: 0 [ 175.874] (II) modeset(0): Year: 2021 Week: 16 [ 175.874] (II) modeset(0): EDID Version: 1.4 [ 175.874] (II) modeset(0): Digital Display Input [ 175.874] (II) modeset(0): 8 bits per channel [ 175.874] (II) modeset(0): Digital interface is DisplayPort [ 175.874] (II) modeset(0): Max Image Size [cm]: horiz.: 34 vert.: 22 [ 175.874] (II) modeset(0): Gamma: 2.20 [ 175.874] (II) modeset(0): No DPMS capabilities specified [ 175.874] (II) modeset(0): Supported color encodings: RGB 4:4:4 [ 175.874] (II) modeset(0): First detailed timing is preferred mode [ 175.874] (II) modeset(0): Preferred mode is native pixel format and refresh rate 175.874] (II) modeset(0): Display is continuous-frequency [ 175.874] (II) modeset(0): redX: 0.590 redY: 0.350 greenX: 0.330 greenY: 0.555 [ 175.874] (II) modeset(0): blueX: 0.153 blueY: 0.119 whiteX: 0.313 whiteY: 0.329 [ 175.874] (II) modeset(0): Manufacturer's mask: 0 [ 175.874] (II) modeset(0): Supported detailed timing: [ 175.874] (II) modeset(0): clock: 154.3 MHz Image Size: 344 x 215 mm [ 175.874] (II) modeset(0): h_active: 1920 h_sync: 1968 h_sync_end 2000 h_blank_end 2080 h_border: 0 [ 175.874] (II) modeset(0): v_active: 1200 v_sync: 1210 v_sync_end 1216 v_blanking: 1236 v_border: 0 [ 175.874] (II) modeset(0): Ranges: V min: 40 V max: 60 Hz, H min: 75 H max: 75 kHz, PixClock max 165 MHz [ 175.874] (II) modeset(0): CMN [ 175.874] (II) modeset(0): N160JCA-EEL [ 175.874] (II) modeset(0): EDID (in hex): [ 175.874] (II) modeset(0): 00ffffffffffff000dae141600000000 [ 175.874] (II) modeset(0): 101f0104a52216780328659759548e27 [ 175.874] (II) modeset(0): 1e505400000001010101010101010101 [ 175.874] (II) modeset(0): 010101010101423c80a070b024403020 [ 175.874] (II) modeset(0): a60058d710000018000000fd00283c4b [ 175.874] (II) modeset(0): 4b10010a202020202020000000fe0043 [ 175.874] (II) modeset(0): 4d4e0a202020202020202020000000fe [ 175.874] (II) modeset(0): 004e3136304a43412d45454c0a200018 [ 175.874] (II) modeset(0): Not using default mode "1920x1080" (bad mode clock/interlace/doublescan) [ 175.874] (II) modeset(0): Not using default mode "1440x810" (bad mode clock/interlace/doublescan) [ 175.874] (II) modeset(0): Printing probed modes for output eDP-1 [ 175.874] (II) modeset(0): Modeline "1920x1200"x60.0 154.26 1920 1968 2000 2080 1200 1210 1216 1236 -hsync -vsync (74.2 kHz eP) [ 175.874] (II) modeset(0): Modeline "1920x1200"x60.0 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync (74.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1920x1080"x59.9 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync (66.6 kHz d) [ 175.874] (II) modeset(0): Modeline "1600x1200"x60.0 162.00 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync (75.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1680x1050"x60.0 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync (65.3 kHz d) [ 175.874] (II) modeset(0): Modeline "1680x1050"x59.9 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync (64.7 kHz d) [ 175.874] (II) modeset(0): Modeline "1400x1050"x60.0 122.00 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync (64.9 kHz d) [ 175.874] (II) modeset(0): Modeline "1600x900"x59.9 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync (56.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1600x900"x59.8 97.50 1600 1648 1680 1760 900 903 908 926 +hsync -vsync (55.4 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x1024"x60.0 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync (64.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1400x900"x60.0 103.50 1400 1480 1624 1848 900 903 913 934 -hsync +vsync (56.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1400x900"x59.9 86.50 1400 1448 1480 1560 900 903 913 926 +hsync -vsync (55.4 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x960"x60.0 108.00 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync (60.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1440x810"x60.0 151.88 1440 1464 1480 1520 810 811 814 833 doublescan +hsync -vsync (99.9 kHz d) [ 175.874] (II) modeset(0): Modeline "1368x768"x59.9 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync (47.8 kHz d) [ 175.874] (II) modeset(0): Modeline "1368x768"x59.9 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync (47.3 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x800"x60.0 134.25 1280 1304 1320 1360 800 801 804 823 doublescan +hsync -vsync (98.7 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x800"x59.8 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync (49.7 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x800"x59.9 71.00 1280 1328 1360 1440 800 803 809 823 +hsync -vsync (49.3 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x720"x60.0 156.12 1280 1376 1512 1744 720 721 724 746 doublescan -hsync +vsync (89.5 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x720"x60.0 120.75 1280 1304 1320 1360 720 721 724 740 doublescan +hsync -vsync (88.8 kHz d) 175.874] (II) modeset(0): Modeline "1280x720"x59.9 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync (44.8 kHz d) [ 175.874] (II) modeset(0): Modeline "1280x720"x59.7 63.75 1280 1328 1360 1440 720 723 728 741 +hsync -vsync (44.3 kHz d) [ 175.874] (II) modeset(0): Modeline "1024x768"x60.0 133.47 1024 1100 1212 1400 768 768 770 794 doublescan -hsync +vsync (95.3 kHz d) [ 175.874] (II) modeset(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz d) [ 175.874] (II) modeset(0): Modeline "960x720"x60.0 117.00 960 1024 1128 1300 720 720 722 750 doublescan -hsync +vsync (90.0 kHz d) [ 175.874] (II) modeset(0): Modeline "928x696"x60.1 109.15 928 976 1088 1264 696 696 698 719 doublescan -hsync +vsync (86.4 kHz d) [ 175.874] (II) modeset(0): Modeline "896x672"x60.0 102.40 896 960 1060 1224 672 672 674 697 doublescan -hsync +vsync (83.7 kHz d) [ 175.874] (II) modeset(0): Modeline "1024x576"x60.0 98.50 1024 1092 1200 1376 576 577 580 597 doublescan -hsync +vsync (71.6 kHz d) [ 175.874] (II) modeset(0): Modeline "1024x576"x60.0 78.38 1024 1048 1064 1104 576 577 580 592 doublescan +hsync -vsync (71.0 kHz d) [ 175.874] (II) modeset(0): Modeline "1024x576"x59.9 46.50 1024 1064 1160 1296 576 579 584 599 -hsync +vsync (35.9 kHz d) [ 175.874] (II) modeset(0): Modeline "1024x576"x59.8 42.00 1024 1072 1104 1184 576 579 584 593 +hsync -vsync (35.5 kHz d) [ 175.874] (II) modeset(0): Modeline "960x600"x59.9 96.62 960 1028 1128 1296 600 601 604 622 doublescan -hsync +vsync (74.6 kHz d) [ 175.874] (II) modeset(0): Modeline "960x600"x60.0 77.00 960 984 1000 1040 600 601 604 617 doublescan +hsync -vsync (74.0 kHz d) [ 175.874] (II) modeset(0): Modeline "960x540"x60.0 86.50 960 1024 1124 1288 540 541 544 560 doublescan -hsync +vsync (67.2 kHz d) [ 175.874] (II) modeset(0): Modeline "960x540"x60.0 69.25 960 984 1000 1040 540 541 544 555 doublescan +hsync -vsync (66.6 kHz d) [ 175.874] (II) modeset(0): Modeline "960x540"x59.6 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync (33.5 kHz d) [ 175.874] (II) modeset(0): Modeline "960x540"x59.8 37.25 960 1008 1040 1120 540 543 548 556 +hsync -vsync (33.3 kHz d) [ 175.874] (II) modeset(0): Modeline "800x600"x60.0 81.00 800 832 928 1080 600 600 602 625 doublescan +hsync +vsync (75.0 kHz d) [ 175.874] (II) modeset(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz d) [ 175.874] (II) modeset(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz d) [ 175.874] (II) modeset(0): Modeline "840x525"x60.0 73.12 840 892 980 1120 525 526 529 544 doublescan -hsync +vsync (65.3 kHz d) [ 175.874] (II) modeset(0): Modeline "840x525"x59.9 59.50 840 864 880 920 525 526 529 540 doublescan +hsync -vsync (64.7 kHz d) 175.874] (II) modeset(0): Modeline "864x486"x59.9 32.50 864 888 968 1072 486 489 494 506 -hsync +vsync (30.3 kHz d) [ 175.874] (II) modeset(0): Modeline "864x486"x59.6 30.50 864 912 944 1024 486 489 494 500 +hsync -vsync (29.8 kHz d) [ 175.874] (II) modeset(0): Modeline "700x525"x60.0 61.00 700 744 820 940 525 526 532 541 doublescan +hsync +vsync (64.9 kHz d) [ 175.874] (II) modeset(0): Modeline "800x450"x59.9 59.12 800 848 928 1056 450 451 454 467 doublescan -hsync +vsync (56.0 kHz d) [ 175.874] (II) modeset(0): Modeline "800x450"x59.8 48.75 800 824 840 880 450 451 454 463 doublescan +hsync -vsync (55.4 kHz d) [ 175.874] (II) modeset(0): Modeline "640x512"x60.0 54.00 640 664 720 844 512 512 514 533 doublescan +hsync +vsync (64.0 kHz d) [ 175.874] (II) modeset(0): Modeline "700x450"x60.0 51.75 700 740 812 924 450 451 456 467 doublescan -hsync +vsync (56.0 kHz d) [ 175.874] (II) modeset(0): Modeline "700x450"x59.9 43.25 700 724 740 780 450 451 456 463 doublescan +hsync -vsync (55.4 kHz d) [ 175.874] (II) modeset(0): Modeline "640x480"x60.0 54.00 640 688 744 900 480 480 482 500 doublescan +hsync +vsync (60.0 kHz d) [ 175.875] (II) modeset(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz d) [ 175.875] (II) modeset(0): Modeline "720x405"x59.5 22.50 720 744 808 896 405 408 413 422 -hsync +vsync (25.1 kHz d) [ 175.875] (II) modeset(0): Modeline "720x405"x59.0 21.75 720 768 800 880 405 408 413 419 +hsync -vsync (24.7 kHz d) [ 175.875] (II) modeset(0): Modeline "684x384"x59.9 42.62 684 720 788 892 384 385 390 399 doublescan -hsync +vsync (47.8 kHz d) [ 175.875] (II) modeset(0): Modeline "684x384"x59.9 36.12 684 708 724 764 384 385 390 395 doublescan +hsync -vsync (47.3 kHz d) [ 175.875] (II) modeset(0): Modeline "640x400"x59.9 41.75 640 676 740 840 400 401 404 415 doublescan -hsync +vsync (49.7 kHz d) [ 175.875] (II) modeset(0): Modeline "640x400"x60.0 35.50 640 664 680 720 400 401 404 411 doublescan +hsync -vsync (49.3 kHz d) [ 175.875] (II) modeset(0): Modeline "640x360"x59.9 37.25 640 672 736 832 360 361 364 374 doublescan -hsync +vsync (44.8 kHz d) [ 175.875] (II) modeset(0): Modeline "640x360"x59.8 31.88 640 664 680 720 360 361 364 370 doublescan +hsync -vsync (44.3 kHz d) [ 175.875] (II) modeset(0): Modeline "640x360"x59.8 18.00 640 664 720 800 360 363 368 376 -hsync +vsync (22.5 kHz d) [ 175.875] (II) modeset(0): Modeline "640x360"x59.3 17.75 640 688 720 800 360 363 368 374 +hsync -vsync (22.2 kHz d) [ 175.875] (II) modeset(0): Modeline "512x384"x60.0 32.50 512 524 592 672 384 385 388 403 doublescan -hsync -vsync (48.4 kHz d) [ 175.875] (II) modeset(0): Modeline "512x288"x60.0 23.25 512 532 580 648 288 289 292 299 doublescan -hsync +vsync (35.9 kHz d) [ 175.875] (II) modeset(0): Modeline "480x270"x59.6 20.38 480 496 544 608 270 271 274 281 doublescan -hsync +vsync (33.5 kHz d) [ 175.875] (II) modeset(0): Modeline "480x270"x59.8 18.62 480 504 520 560 270 271 274 278 doublescan +hsync -vsync (33.3 kHz d) [ 175.875] (II) modeset(0): Modeline "400x300"x60.3 20.00 400 420 484 528 300 300 302 314 doublescan +hsync +vsync (37.9 kHz d) [ 175.875] (II) modeset(0): Modeline "400x300"x56.3 18.00 400 412 448 512 300 300 301 312 doublescan +hsync +vsync (35.2 kHz d) [ 175.875] (II) modeset(0): Modeline "432x243"x59.9 16.25 432 444 484 536 243 244 247 253 doublescan -hsync +vsync (30.3 kHz d) [ 175.875] (II) modeset(0): Modeline "432x243"x59.6 15.25 432 456 472 512 243 244 247 250 doublescan +hsync -vsync (29.8 kHz d) [ 175.875] (II) modeset(0): Modeline "320x240"x60.1 12.59 320 328 376 400 240 245 246 262 doublescan -hsync -vsync (31.5 kHz d) [ 175.875] (II) modeset(0): Modeline "360x202"x59.5 11.25 360 372 404 448 202 204 206 211 doublescan -hsync +vsync (25.1 kHz d) [ 175.875] (II) modeset(0): Modeline "360x202"x59.1 10.88 360 384 400 440 202 204 206 209 doublescan +hsync -vsync (24.7 kHz d) [ 175.875] (II) modeset(0): Modeline "320x180"x59.8 9.00 320 332 360 400 180 181 184 188 doublescan -hsync +vsync (22.5 kHz d) [ 175.875] (II) modeset(0): Modeline "320x180"x59.3 8.88 320 344 360 400 180 181 184 187 doublescan +hsync -vsync (22.2 kHz d) [ 175.875] (II) modeset(0): EDID for output DP-1 [ 175.877] (II) modeset(0): EDID for output DP-2 [ 175.877] (II) modeset(0): EDID for output DP-3 [ 175.879] (II) modeset(0): EDID for output DP-4 [ 175.879] (II) modeset(0): Output eDP-1 connected [ 175.879] (II) modeset(0): Output DP-1 disconnected [ 175.879] (II) modeset(0): Output DP-2 disconnected [ 175.879] (II) modeset(0): Output DP-3 disconnected [ 175.879] (II) modeset(0): Output DP-4 disconnected [ 175.879] (II) modeset(0): Using exact sizes for initial modes [ 175.879] (II) modeset(0): Output eDP-1 using initial mode 1920x1200 +0+0 [ 175.879] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0) [ 175.879] (==) modeset(0): DPI set to (96, 96) [ 175.879] (II) Loading sub module "fb" [ 175.879] (II) LoadModule: "fb" [ 175.879] (II) Module "fb" already built-in [ 175.879] (II) Loading sub module "shadow" [ 175.879] (II) LoadModule: "shadow" [ 175.879] (II) Loading /usr/local/lib/xorg/modules/libshadow.so [ 175.880] (II) Module shadow: vendor="X.Org Foundation" [ 175.880] compiled for 1.21.1.10, module version = 1.1.0 [ 175.880] ABI class: X.Org ANSI C Emulation, version 0.4 [ 175.880] (II) UnloadModule: "scfb" [ 175.880] (II) Unloading scfb [ 175.880] (II) UnloadModule: "vesa" [ 175.880] (II) Unloading vesa [ 175.887] (==) modeset(0): Backing store enabled [ 175.887] (==) modeset(0): Silken mouse enabled [ 175.964] (II) modeset(0): Initializing kms color map for depth 24, 8 bpc. [ 175.966] (==) modeset(0): DPMS enabled

If you are running the Intel driver, that could be an issue as it won't work with Alder Lake. It worked with my old Sandy Lake GPU that I bought in 2011, but Comet Lake worked badly with it and I suspect that Alder Lake doesn't work at all.

I have only the stuff to enable evdev support (20-evdev-kbd.conf), and libinput (20-libinput.conf) and the quirks file (10-quirks.conf) in xorg.conf.d. I believe all three are defaults. Basically, I let Xorg configure itself. Message ID: @.***>

-- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: @.*** PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

hirairaka5 commented 9 months ago

I have a Lenovo ThinkPad E15 Gen 4 Intel laptop (Alder Lake P) and I decided to install FreeBSD 14 on it. The problem described here is pretty much exactly the same as what I've been seeing. I spent some time with ddb and figured out what was going on, and now the laptop is running Xorg without any obvious problems.

The laptop wasn't actually hanging, it turns out. The drm-515-kmod driver disabled writes to the console framebuffer because the efifb bios uses the same framebuffer mapping as the driver. I diked out the code that disabled writes and all of a sudden I could see the logging that I had turned on, and ddb worked:

commit 2bd315d861ceea3ab9c19aa1c2d2ef6adc2b281a (HEAD -> vt_freeze_main_vd-1)
Author: Donn Seeley <donn@xmission.com>
Date:   Sat Dec 30 15:22:13 2023 -0700

    fb: Don't suppress console writes with vt_freeze_main_vd()

    The vt_freeze_main_vd() function sets FB_FLAG_NOWRITE on the console
    framebuffer if the framebuffer is also used for graphics.  That
    suppresses debug logging (and ddb) on the console.  With modesetting, it
    appears to be unnecessary to disable the console framebuffer; dike out
    the code in vt_freeze_main_vd() until someone comes up with a better
    solution.

diff --git a/drivers/gpu/drm/linux_fb.c b/drivers/gpu/drm/linux_fb.c
index 5575676629..401006417f 100644
--- a/drivers/gpu/drm/linux_fb.c
+++ b/drivers/gpu/drm/linux_fb.c
@@ -61,6 +61,7 @@ static int __unregister_framebuffer(struct linux_fb_info *fb_info);
 static void
 vt_freeze_main_vd(struct apertures_struct *a)
 {
+#if 0
        struct fb_info *fb;
        int i;
        bool overlap = false;
@@ -87,6 +88,7 @@ vt_freeze_main_vd(struct apertures_struct *a)
                if (overlap == true)
                        fb->fb_flags |= FB_FLAG_NOWRITE;
        }
+#endif
 }

 void

After getting ddb to work, I was able to see that the kernel was segfaulting in the xarray code. I made a small change to that code to avoid the problem; my commit message describes the issue:

commit 52d9683e62220c468b5928376b039975d3064d0d (HEAD -> xarray-1)
Author: Donn Seeley <donn@xmission.com>
Date:   Sat Dec 30 13:15:28 2023 -0700

    xa_destroy: leave the xarray re-usable, like Linux does

    When trying to get graphics to work on an Alder Lake P laptop, I got a
    crash.  I copied down the information from ddb:

      --- trap 0xc, rip=0xffffffff80b302ec, rsp=0xfffffe013acf44e0 ...
      __mtx_lock_sleep() at __mtx_lock_sleep+0xbc
      xa_load() at xa_load+0x73
      guc_lrc_desc_pin() at guc_lrc_desc_pin+0x49
      intel_guc_submission_enable() at intel_guc_submission_enable+0x7d
      __uc_init_hw() at __uc_init_hw+0x46f
      intel_gt_init_hw() at intel_gt_init_hw+0x481
      intel_gt_resume() at intel_gt_resume+0x5cc
      intel_gt_init() at intel_gt_init+0x213
      i915_gem_init() at i915_gem_init+0x92
      i915_driver_probe() at i915_driver_probe+0x40
      i915_pci_probe() at i915_pci_probe+0x40
      linux_pci_attach_device() at linux_pci_attach_device+0x420
      device_attach() at device_attach+0x3be
      bus_generic_driver_added() at bus_generif_driver_added+0xa1
      [etc.]

    We got a segfault in __mtx_lock_sleep() when trying to dereference a
    null thread pointer.  The sequence of events looks like this:

      intel_guc_submission_enable(guc)
        guc_init_lrc_mapping(guc)
          xa_destroy(&guc->context_lookup)
            mtx_destroy(&xa->mtx)
              _mtx_destroy(&(m)->mtx_lock)
                m->mtx_lock = MTX_DESTROYED
          guc_kernel_context_pin(guc, ce)
            guc_lrc_desc_pin(guc, loop=true)
              lrc_desc_registered(guc, id)
                __get_context(guc, id)
                  xa_load(xa=&guc->context_lookup, index=id)
                    xa_lock(xa)
                      mtx_lock(&(xa)->mtx)
                        mtx_lock_flags((m), 0)
                          _mtx_lock_flags((m), (opts), (file), (line))
                            __mtx_lock_flags(&(m)->mtx_lock, o, f, l)
                              _mtx_obtain_lock_fetch(m, &v, tid)
                                atomic_fcmpset_acq_ptr(&(mp)->mtx_lock, vp, (tid))
                              _mtx_lock_sleep(m, v, opts, file, line)
                                __mtx_lock_sleep(&(m)->mtx_lock, v)
                                  owner = lv_mtx_owner(v)
                                    ((struct thread *)((v) & ~MTX_FLAGMASK))
                                  TD_IS_RUNNING(owner)
                                    TD_GET_STATE(td) == TDS_RUNNING
                                      (td)->td_state

    We crash because v == MTX_DESTROYED, which means that td, the thread
    pointer part of the owner cookie, is NULL and we can't dereference it.

    The Linux version of xa_destroy() is careful to fix up the xarray so
    that it can be used again.  The FreeBSD version is simpler: we just need
    to maintain the xarray flags when we reinitialize the xarray structure.

diff --git a/sys/compat/linuxkpi/common/src/linux_xarray.c b/sys/compat/linuxkpi/common/src/linux_xarray.c
index 44900666242f..856a67ba7e3c 100644
--- a/sys/compat/linuxkpi/common/src/linux_xarray.c
+++ b/sys/compat/linuxkpi/common/src/linux_xarray.c
@@ -352,6 +352,9 @@ xa_destroy(struct xarray *xa)
        radix_tree_for_each_slot(ppslot, &xa->root, &iter, 0)
                radix_tree_iter_delete(&xa->root, &iter, ppslot);
        mtx_destroy(&xa->mtx);
+
+       /* Linux leaves the xarray re-usable after xa_destroy().  */
+       xa_init_flags(xa, xa->flags);
 }

 /*

I don't know whether the change to vt_freeze_main_vd() will cause problems for other systems, but it doesn't seem to be an issue on my system. I'd love to hear whether these changes fix other folks' problems.

ko56 commented 9 months ago

@rkoberman Thanks. I duplicated what you did as much as I could, including the modesetting driver, but no luck. My CPU is i5-13600 and the GPU Intel 770 UHD (Alderlake S). However, the next post by @hirairaka5 seems hopeful.

decke commented 9 months ago

i5-13600 is Raptor Lake so 13. Generation.

ko56 commented 9 months ago

Is your comment referring to the discussion with @rkoberman , or to the one with @hirairaka5 ?

hirairaka5 commented 9 months ago

I submitted the xarray kernel bug to FreeBSD BugZilla as bug 276057.

FWIW, I thought that it was annoying that Xorg wouldn't default to using the modesetting driver for my recent Intel chipset. I don't have a fix for that, but I thought that I'd provide my trivial /usr/local/etc/X11/xorg.conf file:

  Section "Screen"
      Identifier "LaptopScreen"
      Device     "LaptopDevice"
  EndSection

  Section "Device"
      Identifier "LaptopDevice"
      Driver     "modesetting"
  EndSection
ko56 commented 9 months ago

I looked at the bug 276057 on Bugzilla. I am interested in how this turns out, as I've been having the "freezing"problem for a while, with no resolution.

nenjan72 commented 9 months ago

I have got AlderLake-P graphics working on my Thinkpad X1 Extreme gen 5 with @hirairaka5 patch on Freebsd 14 and drm-515-kmod and gpu-firmware-intel-kmod from /usr/ports. No more kernel panic/freezing :)

evadot commented 9 months ago

Alderlake support was recent in 5.15, for Alderlake (-P or -S) systems please use 6.1-lts

tdm4 commented 5 months ago

I have an Alder Lake - U (i7-1255U) in my laptop and I get this lockup. Do I need to wait for FreeBSD 14.1 and use 6.1-LTS or will 5.15 work with it?

evadot commented 5 months ago

I have an Alder Lake - U (i7-1255U) in my laptop and I get this lockup. Do I need to wait for FreeBSD 14.1 and use 6.1-LTS or will 5.15 work with it?

Alder Lake will not work with 5.15 so you need to wait.

hirairaka5 commented 5 months ago

I've been using graphics with Alder Lake-P on 14.0 without a problem for months, after applying the kernel patch that I provided above. I don't know whether the fix would help Alder Lake-U, but it might be worth a shot.

nwildner commented 3 months ago

Sup folks.

Still reproducible on FreeBSD 14.1. Asus Dash TUF15, i7 12650H + Intel 630

If I kdload i915kms without the gpu-firmware-intel-kmod-alderlake firmware package installed, it works.

But, if I try to load this module with the firmware package installed, laptop will hang for 5 seconds and reset completely and power cycle. No video output, no log messages, nothing.

evadot commented 3 months ago

Sup folks.

Still reproducible on FreeBSD 14.1. Asus Dash TUF15, i7 12650H + Intel 630

If I kdload i915kms without the gpu-firmware-intel-kmod-alderlake firmware package installed, it works.

But, if I try to load this module with the firmware package installed, laptop will hang for 5 seconds and reset completely and power cycle. No video output, no log messages, nothing.

With which drm-kmod ? You need 6.1 so on 14.1 you will need to compile/install the port directly, no package is available.

nwildner commented 3 months ago

Sup folks. Still reproducible on FreeBSD 14.1. Asus Dash TUF15, i7 12650H + Intel 630 If I kdload i915kms without the gpu-firmware-intel-kmod-alderlake firmware package installed, it works. But, if I try to load this module with the firmware package installed, laptop will hang for 5 seconds and reset completely and power cycle. No video output, no log messages, nothing.

With which drm-kmod ? You need 6.1 so on 14.1 you will need to compile/install the port directly, no package is available.

Hi @evadot . Using the default drm-kmod which will point to drm-515-kmod.

Ok. I'll compile the port and let you know here as soon as I get my laptop.

Edit: OK, using drm-61-kmod from ports did the trick.

rkoberman commented 3 months ago

Just confirmed that drm-61-kmod is default for 14.1. 515 will fail to load firmware forever. It will not be fixed as support was not ready in 5.15 of the Linux kernel.

You probably need to build the port and will need kernel sources as packages are built for the oldest supported minor release of a major release. That is still 14.0.

On Wed, Jul 3, 2024, 02:38 nwildner @.***> wrote:

Sup folks. Still reproducible on FreeBSD 14.1. Asus Dash TUF15, i7 12650H https://www.intel.com/content/www/us/en/products/sku/226066/intel-core-i712650h-processor-24m-cache-up-to-4-70-ghz/specifications.html

  • Intel 630 If I kdload i915kms without the gpu-firmware-intel-kmod-alderlake firmware package installed, it works. But, if I try to load this module with the firmware package installed, laptop will hang for 5 seconds and reset completely and power cycle. No video output, no log messages, nothing.

With which drm-kmod ? You need 6.1 so on 14.1 you will need to compile/install the port directly, no package is available.

Hi @evadot https://github.com/evadot . Using the default drm-kmod which will point to drm-515-kmod.

Ok. I'll compile the port and let you know here as soon as I get my laptop.

— Reply to this email directly, view it on GitHub https://github.com/freebsd/drm-kmod/issues/252#issuecomment-2205577132, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGXPW263PWYD3G6UDPBSLJ3ZKPA7DAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVGU3TOMJTGI . You are receiving this because you were mentioned.Message ID: @.***>

ko56 commented 3 months ago
OK, I finally built the port from source, and everything works fine.
At last my Intel UHD 770 graphics card is detected!

On 07/03/24 20:23, Kevin Oberman wrote:

  Just confirmed that drm-61-kmod is default for 14.1. 515 will fail
  to load

  firmware forever. It will not be fixed as support was not ready in
  5.15 of

  the Linux kernel.

  You probably need to build the port and will need kernel sources
  as

  packages are built for the oldest supported minor release of a
  major

  release. That is still 14.0.

  On Wed, Jul 3, 2024, 02:38 nwildner ***@***.***> wrote:

  > Sup folks.

  > Still reproducible on FreeBSD 14.1. Asus Dash TUF15, i7
  12650H

  >

https://www.intel.com/content/www/us/en/products/sku/226066/intel-core-i712650h-processor-24m-cache-up-to-4-70-ghz/specifications.html

  • Intel 630

If I kdload i915kms without the gpu-firmware-intel-kmod-alderlake

firmware package installed, it works.

But, if I try to load this module with the firmware package installed,

laptop will hang for 5 seconds and reset completely and power cycle. No

video output, no log messages, nothing.

With which drm-kmod ? You need 6.1 so on 14.1 you will need to

compile/install the port directly, no package is available.

Hi @evadot https://github.com/evadot . Using the default drm-kmod which

will point to drm-515-kmod.

Ok. I'll compile the port and let you know here as soon as I get my laptop.

Reply to this email directly, view it on GitHub

https://github.com/freebsd/drm-kmod/issues/252#issuecomment-2205577132, or unsubscribe

https://github.com/notifications/unsubscribe-auth/AGXPW263PWYD3G6UDPBSLJ3ZKPA7DAVCNFSM6AAAAAAYA6EGE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBVGU3TOMJTGI .

You are receiving this because you were mentioned.Message ID:

@.***>

  —
    Reply to this email directly, view it on GitHub, or unsubscribe.
    You are receiving this because you commented.Message
      ID: ***@***.***>
  [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/freebsd/drm-kmod/issues/252#issuecomment-2207638886", "url": "https://github.com/freebsd/drm-kmod/issues/252#issuecomment-2207638886", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]