linuxboot / heads

A minimal Linux that runs as a coreboot or LinuxBoot ROM payload to provide a secure, flexible boot environment for laptops, workstations and servers.
https://osresearch.net/
GNU General Public License v2.0
1.41k stars 181 forks source link

t420 dGPU NOT PORTED into Heads!!! (display port does not work after external flashing) #1685

Closed nameisnotprovided closed 1 month ago

nameisnotprovided commented 3 months ago

Context of the Build

1. What board are you trying to build? t420-hotp-maximized 2. What repository:branch are you using to build from?

3. What version of coreboot are you trying to build

CBET4000 Heads-v0.2.0-2147-g1e583e0 4. In building the rom where did you get the blobs?

5. If using the automated tools to get the blobs did you run the relevant scripts in the blobs directory

6. What operating system are you using Qubes OS 4.2

Please describe the problem

after flashing the qubes on my Lenovo 4238W2H t420 i72620M model the displayport does not work anymore. Before I had windows instaled and everything was okay. The VGA controller shows up.

Describe the bug not sure whether it depends on dGPU driver problems? I assume that displayport should work.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

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

Additional context Add any other context about the problem here.

tlaurion commented 3 months ago

Tagging t420 board testers as documented under https://github.com/linuxboot/heads/issues/692

Can someone replicate and give additional technical information (cbmem, tweaks needed under coreboot config etc) so a PR for fix can be brought up?

I do not own the platform.

@nameisnotprovided Are you technical enough to give cbmem output, journalctl -f output in OS of what is happening when display is connected and see if this is a known upstream bug issue?

natterangell commented 3 months ago

I don’t have a full size DP cable available right now, but I can check when I’m back in the office over the weekend. I have the igpu model though.

tlaurion commented 3 months ago

@nameisnotprovided so you have t420 with igpu+dgpu?

ThinkPad T420 model 4238W2H

the Lenovo ThinkPad T420 model 4238W2H comes with an Intel Core i7-2620M processor and a discrete NVIDIA NVS 4200M GPU with 1GB VRAM.

Meaning that would unfortunately to be expected with that model unless someone brings up a dGPU variant @nameisnotprovided:

https://github.com/linuxboot/heads/blob/cf080564df86a0d7afbee4a6bca54b0ef4e370b6/config/coreboot-t420-maximized.config#L125

linked to #1686

@nameisnotprovided up for the task? Otherwise not aware of anyone having dgpu model so a new need just happened which other dgpu (unmaintained for the same unfrotunate reasons that nobody maintains them) is current reality until someones rise up to the task.


I don’t have a full size DP cable available right now, but I can check when I’m back in the office over the weekend. I have the igpu model though.

@natterangell I would expect this to work out of the box on iGPU models since only those models are officially supported by coreboot.

tlaurion commented 3 months ago

Maybe all current board configs (not dgpu variants) should be migrated/renamed from BOARD_NAME to BOARD_NAME_iGPU to reduce confusion on what is supported by the board configs?

I thought dgpu variants existing were self-explanatory but I might underthought this.

tlaurion commented 3 months ago

Thoughts welcome, but I won't port dgpu boards for platforms barely tested/where no technical enough users are willing to do initial ports to fit their variant needs anymore, really sorry about that but that consumed way too much of my time before for most of them now being under the unmaintained directory with no new engaged/willing testers showing up under #692.

TLDR: this takes too much maintenance time and effort from me when comes the time to bump coreboot/kernel versions ofr boards being used by "unknown users" not standing up to the diligent testing tasks needed for this project to thrive properly. This is reality and we need to deal with reality and tendencies changing.

@nameisnotprovided if you cannot do the dgpu variant yourself, maybe you know someone technical enough that could inspire himself/herself from the other boards ports that were made for dgpu variants?

Poke me when someone is up for the task. I could help, but I won't do it myself. Hope you understand.

nameisnotprovided commented 3 months ago

Dear @tlaurion, thank you so much for the reply and already great hints! I am very new to all of the stuff (definitely not technical enough) but willing to learn and I would like to give it a try. Indeed, this model has a dGPU (NVIDIA NVS 4200M GPU with 1GB VRAM I checked the data from my system). I assume that I have to use these instructions to build the board by myself using original bin files (I have those) Is this correct? https://github.com/linuxboot/heads/blob/master/blobs/t420/readme.md The coreboot config/porting must be done using the link https://osresearch.net/Porting/? Simple solution (I will check it next week) would be to use a dock station from lenovo (supported by coreboot). I think then the display port will be used from iGPU.

tlaurion commented 3 months ago

This week has been crazy, not sure about docking station using iGPU. Porting would require de duplicating blobs scripts for dgpu and specializing it, pulling firmware from Lenovo and extracting dgpu blobs, which might be advanced and a big adventure if you are not technical, unfortunately.

You are the first user interested in that platform with dgpu.

If I don't reply to you early next week feel free to poke me back by tagging @tlaurion

fhvyhjriur commented 2 months ago

I got a T420-dGPU for this bugreport do help with testing. And this is really just for this bugreport/heads-development. I really dont like nvidia as a company ( https://pic2.zhimg.com/v2-50e21fbf6935b6a4ee309d236fa54741_b.jpg ).

The issue with the one not working external graphics port you see is just normal when the dGPU is leaved unused or even especially disabled in coreboot. For example with the Lenovo Thinkpad W500 there is a known issue with dying dGPU's inside the machine. Does this bother for example Libreboot users? No. The dGPU on W500 is disabled by default on Libreboot because its not free as in freedom. But a machine is really technically spoken broken when you have not installed coreboot/libreboot on a W500 with a "broken" dGPU.

(really offtopic quick note: You can fix the W500 dGPU by resoldering the dGPU chip. Its just the solder joints under the GPU that break because of heat problems when the thermal paste/connection get worse over time)

The dGPU on T420 is from the technical coreboot view side the same like dGPU on T520, T430 and T530 based on the information here: https://review.coreboot.org/c/coreboot/+/28392

It can be tested from linux userspace using util/pmh7tool.

To turn dGPU power off: pmh7tool -c 0x50 7 pmh7tool -c 0x50 3

To turn it on: pmh7tool -s 0x50 3 pmh7tool -s 0x50 7

@tlaurion

Maybe all current board configs (not dgpu variants) should be migrated/renamed from BOARD_NAME to BOARD_NAME_iGPU to reduce confusion on what is supported by the board configs?

There was before for example w530-dgpu-K1000m-maximized and w530-dgpu-K2000m-maximized. But after they went to https://github.com/linuxboot/heads/tree/master/unmaintained_boards there is now no device listed with dGPU that could let you expect that when dGPU is not listed in the name, its unsupported. I wont change now at the moment the naming. I would more likely add back more and more hardware to supported list. For example this t420 could get then the same naming design the now unsupported/untested W530-dGPU version. When more and more dGPU versions get back listed as supported, this should help people get the logical conclusion that if the dGPU is not listed after the model name, then the dGPU is not enabled.

nameisnotprovided commented 2 months ago

I got a T420-dGPU for this bugreport do help with testing. And this is really just for this bugreport/heads-development. I really dont like nvidia as a company ( https://pic2.zhimg.com/v2-50e21fbf6935b6a4ee309d236fa54741_b.jpg ).

@fhvyhjriur Thank you so much! I probably just bought a wrong model with dGPU. I actually did not intend to do that just got hooked with i7. I updated the heads with new rom. No changes though…

The dGPU on T420 is from the technical coreboot view side the same like dGPU on T520, T430 and T530 based on the information here: https://review.coreboot.org/c/coreboot/+/28392

It can be tested from linux userspace using util/pmh7tool. To turn dGPU power off: pmh7tool -c 0x50 7 pmh7tool -c 0x50 3 To turn it on: pmh7tool -s 0x50 3 pmh7tool -s 0x50 7

Could you please explain how to get to the linux userspace? Should it be done from recovery heads shell?

natterangell commented 2 months ago

Just confirming that DP works without issue on my iGPU T420.

nameisnotprovided commented 2 months ago

@tlaurion @natterangell @fhvyhjriur Thank you all! The issue is solved by exchanging old motherboard to one without NVIDIA dGPU chip.

fhvyhjriur commented 1 month ago

Maybe to finish this the productive way and because i have now the hardware: @tlaurion Is there enough space left in the 8MiB SPI chip for the additional vbios file? Would you like to create a test image with circleCI for me to test the Display Port connector with enabled Nvidia GPU? Adding t420-dgpu-maximized could also be seen as a preparation for https://github.com/linuxboot/heads/issues/1212 because w520 is much more often with dGPU then without.

tlaurion commented 1 month ago

Maybe to finish this the productive way and because i have now the hardware: @tlaurion Is there enough space left in the 8MiB SPI chip for the additional vbios file? Would you like to create a test image with circleCI for me to test the Display Port connector with enabled Nvidia GPU? Adding t420-dgpu-maximized could also be seen as a preparation for https://github.com/linuxboot/heads/issues/1212 because w520 is much more often with dGPU then without.

I have no clue nor time for this even less since nobody owns nor tested dgpu enough historically. We need technical enough board owners to test and report on things, minimally, or as heads history shows: technical and willing enough users willing to port their board flavor in which I will be willing to help, not the other way around.

Reread https://github.com/linuxboot/heads/issues/1685#issuecomment-2129977916 @fhvyhjriur and please stop expecting me to do PR specific to boards I do not own. You should connect to coreboot community, find board owners that use dgpu and have them propose PR if they have a need for that.

It seems that you forget how FOSS works: there needs to be a need, there needs to be a itch, there needs to be technical enough people to propose fix for their itch and time from reviewers to review and merge. All FOSS projects are like that. Otherwise they are actually paid to do the work.

The fact that you own a t420 dgpu doesn't make this model more used technically. It does not make anybody that is technical enough and has a itch to do the job for a platform they own and help others. It doesn't make issues troubleshootable nor fixed by technical enough people for others to benefit. You should watch https://archive.fosdem.org/2020/interviews/james-bottomley/ to understand minimally thr mindset in which FOSS works.

AFAIK all dgpu board went UNMAINTAINED. Please again discuss in related issues. One asking me create t420 dgpu variant won't make it haooen, not saying to a board owner please provide logs and that user deciding to buy iGPU variant as in this thread.

My time is limited and nobody uses t420 dgpu, I'm sorry, until proven otherwise and those people involving themselves helping me support their need,fix their itch. Not the other way around.