Lenovo ThinkPad W530

This board is designed for a w530 with the K1000M Nvidia Quadro dGPU. Initialization of the dGPU is necessary in order to use an external monitor whether through the in-build VGA or mini-DisplayPort or via the dock. In order to build this the relevant script in the blobs directory must be run (or self-pulled roms placed in that directory) and after building the rom, the nvramtool must be run on the 12MB rom to change the default graphics mode away from integrated-only graphics (see README_vbios in the blobs directory).

RE: External monitor.

The issue highlighted earlier still remains for me on this machine despite the nvram settings, is it working for you?

External monitor is not working, either with internal VGA or using vga/dvi & Dport display outputs on dock. I have tried with NVRAM settings for Discrete GPU, Integrated only and will try Dual GPU next (note, this seems to be along standing issue with the dual GPU models)

Ohh shoot sorry :frowning:

I just saw it mentioned in the HCL (Was looking for other w530 experiences) and went straight to the replies.

I haven’t tested mine with an external monitor yet. I successfully got HEADS running but I’ve been struggling with performance issues that I’m trying to figure out.

Walk before I run :stuck_out_tongue:

I’ll message you with any details of my experience once I get around to it.

Edit - My W530 with Heads is working great now, the issue was with RAM not laptop related. I’ll create a HCL report soon.

3 Likes

Hi @KarlinQubes and everyone. Once this is applied and default graphics mode is switched, how does one split the 12MB ROM to 8+4? Or is it possible to apply nvram modidifaction to the 8+4 that were already produced?

One could split the rom the same way it is split in thr board configuration file, but im not sure why you would do it that way. If you applied nvramtool to the image and you already flashed Heads, why not simply flash that full rom internally instead?

Should we add nvramtool inside of Heads for those models? First model to need this, but dGPU support is kinda new to Heads. And the more I read the forum on the interest for gGPU support from users and the more i realise that nvram settings should have persistence between firmware upgrades.

Someone willing to open an issue over heads to discuss nvram persistence, and a pull request for the w530 missing bits of documentation over heads-wiki?

I haven’t already flashed heads on W530. I made the ROMs and was going to flash 8+4 as per instructions. Then I saw the dGPU instructions that applied to the 12 MB ROM. So now, can I flash the 12 MB ROM? I assume not.
I did some additional research and after running this command:
sudo nvramtool -C /path/to/12MB/rom -w hybrid_graphics_mode="Dual Graphics"
I ran the following two:

dd of=top.rom bs=1M if=/path/to/12MB/rom skip=8
dd of=bottom.rom bs=1M if=/path/to/12MB/rom count=8

But I have yet to flash. I just need a confirmation that the splitting was the right thing to do.
I can add W530 information to heads-wiki once I succeed flashing!

For hardware flashing, yes, you need to split. For software flashing you don’t need to.

And yes, you need nvramtool to switch the GPU mode. However I don’t believe that “Dual Graphics” / Optimus support is not yet implemented in coreboot, i.e. you might just see a black screen [1].

IIRC hybrid_graphics_mode="Discrete Only" should switch to the dGPU. I got a black screen for that, too, but I guess my dGPU is dead. Removing the CMOS battery can be used to reset nvramtool settings IIRC.

[1] Feature #186: Nvidia optimus support - coreboot - Issue Tracker

Confused here.
If Discrete only, t530 and w530 AFAIK drives external displays only. So it would be normal that iGPU gets deactivated here, and internal display would not work.

That sentence contains a double negation. Support in coreboot depends on inclusion of gGPU firmware, but the Heads payload doesn’t include nvidia drivers in its kernel as of now. So disabling iGPU from setting nvramctl to Discrete only will result in a blank screen, yes.

We could include nvidia driver into linux-x230-maximized.config, but i’m not sure this is required. In notes from merged pull requests and issues, it was thought sufficieent to have only iGPU support inside of Heads, where coreboot prepares devices to be managed by the main OS.

Short version: dGPU is not activated under Heads payload, only iGPU (laptop screen) is driven under Heads. But that could be changed by adding nvidia driver under Heads’ kernel configuration.

To clarify: Back in the days with vinalla coreboot I had a black screen on both the internal and external display in dGPU mode - probably because my dGPU hardware is simply dead. But I guess that’s irrelevant in the OP case.

And yes, my double negation was one too much. I was typing too quickly, sorry!

Anyway I think that you missed the point that there are 3 modes: iGPU, dGPU and dual mode/Optimus/both at the same time.

Dual mode probably never works due to the aforementioned lack of coreboot code, dGPU may work as you pointed out. Since it might only drive the external display (not sure), it’ll mostly be useless though unless one wants to live without the internal display or use nvramtool and reboot all of the time.

To be clear, those blobs need to be added into coreboot otherwise there is no dGPU usable on the system:

(Note: k2000m k1000m board model needs to be chosen carefully, and this documentation is missing)

And those blobs need to be downloaded/extracted to be made available at coreboot build time https://github.com/osresearch/heads/blob/master/blobs/xx30/vbios_w530.sh

More info on the READMEs heads/blobs/xx30 at master · osresearch/heads · GitHub

Those use cases were reported to be all functional under Heads with blobs and hybrid mode activated with nvramtool.

If your usage is different, using those images, please open an issue on Heads repository. It would need testing and proper fix.

This misunderstanding of how coreboot needs to be configured is the reason it didn’t work for you on vanilla coreboot. Your dGPU was just never initialized. Which is needed to go in hybrid mode as well.

That would be true if the settings were in nvram (CMOS memory, persistent through CMOS battery).

In the current use case where one modifies the default in the rom (as instructed right now), this is reapplied on boot from flash, and disconnecting the battery won’t change the default coming applied on boot. Also, upgrading the firmware would reset the settings to iGPU only.

I think if users wants to be able to activate/deactivate dGPU:
1- nvramtool should be provided as an additional and optionally packed tool inside of Heads so that CMOS settings are changed in nvram and living in cmos momory (so that disconnecting CMOS battery resets to default being iGPU only)
2- We should make sure that coreboot CMOS settings reads from nvram are read if they exist. (Not surenitnis the case)

As long as someone tunes dgpu to be hybrid or deactivated, there should not be any black screen at boot.

Any other idea to ease usage of iGPU/dGPU/hybrid inside of Heads

Looks good. Extracted from 12mb full rom.

8mb bottom:

Then 4mb top:

(Could definitely be rewritten for simplicity)

1 Like

Actually i reviewed config just now, and as opposed to x230 where coreboot graphic initialization is deactivated and delegated to linux completely, w530 has both iGPU firmware and native init. I didn’t saw that before and not sure why @eganonoa did that

Ok… I will search to buy a cheap w530… and be able to test this myself eventually. As of now, I do not own a w530.

@Plexus : can you please test Heads needs testers with external programmers - #14 by Insurgo and report under github?

Currently moving house so everything is in boxes :smiley: it will be a week at least before I can track down the old laptops.

1 Like

Could someone please clarify how it looks at the moment with the w530? Is using external monitors possible? In the Heads needs testing thread there is a remark that pull requests were merged back in September 2023. At the moment I use Skulls and it does boot in dual graphics mode but I did not use external monitors yet (so far it’s not recognized). I would like to test it though and am not sure about the right approach.

W530 under Heads comes in different flavors, with/without dGPU.
I’m still waiting for successful tests from testers to remove those dGPU boards from UNTESTED which is the nicest disclaimer I can give to next users like you expecting things to work when they are not reported working by other board owners.

A gentle reminder that QuesOS is not Heads and Heads is not QubesOS and Heads has its own community which is on github so energy is not dispersed.

I will use this opportunity to flag @Plexus

Currently moving house so everything is in boxes :smiley: it will be a week at least before I can track down the old laptops.

You owe a quick flag stating all is good under Move UNTESTED_w530-hotp-maximized UNTESTED_w530-maximized away of UNTESTED boards · Issue #1454 · linuxboot/heads · GitHub which is too dated to be valid anymore, so many things changed with libgfxinit and efifb, testing needed for those boards to not be marked as untested :slight_smile:

1 Like

I plan on trying to install coreboot on 2 of the 3 w530 shown below. the first 2 have a nvidia K1000M and the third has a K2000M. Which 2 would best serve as testing platforms?
w530 jtag cadidate #1.
Qubes-HCL-LENOVO-243856U-20231130-061636.yml (1.1 KB)


layout:
‘hcl’
type:
‘Notebook’
hvm:
‘yes’
iommu:
‘yes’
slat:
‘yes’
tpm:
‘2.0’
remap:
‘yes’
brand: |
LENOVO
model: |
243856U
bios: |
G5ETB5WW (2.75 )
cpu: |
Intel(R) Core™ i7-3740QM CPU @ 2.70GHz
cpu-short: |
FIXME
chipset: |
Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
chipset-short: |
FIXME
gpu: |
Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
NVIDIA Corporation GK107GLM [Quadro K1000M] [10de:0ffc] (rev a1) (prog-if 00 [VGA controller])
gpu-short: |
FIXME
network: |
Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)
Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)
memory: |
15927
scsi: |
CT1000MX500SSD1 Rev: 045
DVD-RW DS8A8SH Rev: KU51
usb: |
3
certified:
‘no’
versions:

  • works:
    ‘FIXME:yes|no|partial’
    qubes: |
    R4.2.0-rc4
    xen: |
    4.17.2
    kernel: |
    6.7.0-0
    remark: |
    FIXME
    credit: |
    FIXAUTHOR
    link: |
    FIXLINK

w530 jtag cadidate #2.
Qubes-HCL-LENOVO-243856U-20231130-061636.yml (1.1 KB)

layout:
‘hcl’
type:
‘Notebook’
hvm:
‘yes’
iommu:
‘yes’
slat:
‘yes’
tpm:
‘2.0’
remap:
‘yes’
brand: |
LENOVO
model: |
243856U
bios: |
G5ETA0WW (2.60 )
cpu: |
Intel(R) Core™ i7-3740QM CPU @ 2.70GHz
cpu-short: |
FIXME
chipset: |
Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
chipset-short: |
FIXME
gpu: |
Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
NVIDIA Corporation GK107GLM [Quadro K1000M] [10de:0ffc] (rev a1) (prog-if 00 [VGA controller])
gpu-short: |
FIXME
network: |
Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)
Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)
memory: |
15946
scsi: |
ADATA SU800 Rev: 7ANR
DVD-RAM UJ8C0 Rev: SB01
usb: |
3
certified:
‘no’
versions:

  • works:
    ‘FIXME:yes|no|partial’
    qubes: |
    R4.2.0-rc5
    xen: |
    4.17.2
    kernel: |
    6.6.2-1
    remark: |
    FIXME
    credit: |
    FIXAUTHOR
    link: |
    FIXLINK

w530 jtag cadidate #3.
Qubes-HCL-LENOVO-243856U-20231130-061636.yml (1.1 KB)

layout:
‘hcl’
type:
‘Notebook’
hvm:
‘yes’
iommu:
‘yes’
slat:
‘yes’
tpm:
‘2.0’
remap:
‘yes’
brand: |
LENOVO
model: |
2436CTO
bios: |
G5ETA6WW (2.66 )
cpu: |
Intel(R) Core™ i7-3720QM CPU @ 2.60GHz
cpu-short: |
FIXME
chipset: |
Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
chipset-short: |
FIXME
gpu: |
Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
NVIDIA Corporation GK107GLM [Quadro K2000M] [10de:0ffb] (rev a1) (prog-if 00 [VGA controller])
gpu-short: |
FIXME
network: |
Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)
Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)
memory: |
15925
scsi: |
CT1000MX500SSD1 Rev: 045
usb: |
3
certified:
‘no’
versions:

  • works:
    ‘FIXME:yes|no|partial’
    qubes: |
    R4.2.0-rc4
    xen: |
    4.17.2
    kernel: |
    6.1.57-1
    remark: |
    FIXME
    credit: |
    FIXAUTHOR
    link: |
    FIXLINK

@Insurgo Thank you for the hints! I’m trying to puzzle together the details. If I’m not mistaken, it might be possible to simply update from Skulls. I’m not sure if this x230 update script could be used (with some necessary minor changes) on a w530?

As the docs reveal, having Skulls installed means the process would look like

  1. building Heads,
  2. booting Linux with iomem=relaxed,
  3. copiing Heads’ 12M image file build/w530/coreboot.rom to Skulls’ w530 directory and
  4. run sudo ./w530_heads.sh - if the ported script from above can be used. As switching back to Skulls is simply running ./skulls.sh -b w530, I guess it’s not too risky to give it a try.

No. Do not flash maximized board 12mb Rom image over skulls. Never. Unless you verify unlocked state first. The official and documented way is the flash maximized board roms externally once and then upgrade internally from the menu options happily ever after.

If and only if you run flashrom -p internal on a boot with “iomum=relaxed” you get an output from flashrom that doesn’t say any region are locked as outlined here:

Then and only then you can flash a whole rom internally, but manually, wihtout specifying any specific region for flashrom to flash. You want the whole 12mb Rom content to overwrite the whole combined 4+8 Mb physical SPI flash content to match 12mb Rom image. Doing anything else will not work.

The logic behind that is that it depends if you flashed Skulls with the option of unlocking IFD.
The BIOS region under maximized board is bigger then on stock firmware and required an unlocked ifd/me/igb région under IFD to be flashed internally.

If you didn’t flash externally with an unlocked at least once, the IFD protects itself, the ME region and IGB region of the flash descriptions and prevents you from being able to overwrite them. The IFD inside of Heads is modified to extend the BIOS region with freed ME region space and contains a crafted IGB with a crafted Mac address for the Ethernet network card to apply.

If you flash internally a 12mb heads image over a initially locked firmware from skulls : getting a brick is the only thing you will get.

1 Like

I see, thank you for the explanation. Just found out IFD is the Intel Flash Descriptor. This is a data structure that is programmed on the SPI flash chip on all Intel based platforms. It contains information such as space allocated for each region of the flash image, read-write permissions for each region, chipset configuration parameters and more.

I run flashrom -p internal with iomem=relaxed enabled on the system with skulls and this was the output:

sudo flashrom -p internal
flashrom v1.2 on Linux 5.10.0-18-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
coreboot table found at 0x7ff63000.
Found chipset “Intel QM77”.
Enabling flash write… SPI Configuration is locked down.
Enabling hardware sequencing due to multiple flash chips detected.
OK.
Found Programmer flash chip “Opaque flash chip” (12288 kB, Programmer-specific) mapped at physical address 0x0000000000000000.
No operations were specified.

While flashing Skulls I used the option for later internal updates. It seems there are no references to read-only sections in the output. If it’s ok, I will give flashing the 12mb Rom a try.

As a sidenote for flashing the w530: I used a Pomona clip and a CH341a without any additional power supply. I had to enable Wake on Lan (also left the CMOS battery in place), plug in the ethernet cable (wait for the light) and this provided enough juice for the process (otherwise shorting the pins on the right chip, etc. did not work, the chip was not recognized properly).