Lenovo ThinkPad W530

@KarlinQubes This is my patch set ( I am hardestkit on github ) that allows Heads to boot QubesOS from software RAID-0 or software RAID-1 devices. So if QubesOS is installed over two drives with RAID and /boot is itself a RAID device, without these patches Heads will not be able to boot the OS nor will it be able to seal a disk decryption key to the TPM.

This means that W530 and T430 laptops can have the CDROM drive removed and an inexpensive caddy can be added which allows a 2nd SATA SSD to be added. Or other devices that support 2nd drives can now install QubesOS using RAID0/1 for /boot and luks

2 Likes

thanks @enmus that helped. A pull request has been created to resolve.

2 Likes

Thank you @Plexus for your HCL report, which is online now!

I am super excited about this machine:

Please update this thread when you got the external monitor working. I am short on free time at the moment, but sooner or later I will go and get / upgrade one myself. Super excited!

Congrats on getting the RAID-1 working. I already ordered the SSD bay and will try this too on my second T430 once I got a bit more time on my hands. So awesome!

Also: I merged your new thread into this one and I aim to maintain one thread per machine in this category

1 Like

I’m going to be getting one when I can find one, and I’ll let you know how the HEADS installation goes. I don’t think I’m going to trick it out beyond the 3840QM though, would need new heatsink

1 Like

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).

https://github.com/osresearch/heads/blob/master/boards/w530-dgpu-K1000m-maximized/w530-dgpu-K1000m-maximized.config

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:

https://github.com/osresearch/heads/blob/master/config/coreboot-w530-dgpu-K2000m-hotp-maximized.config#L11

(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 heads/blobs/xx30/vbios_w530.sh at master · linuxboot/heads · GitHub

More info on the READMEs heads/blobs/xx30 at master · linuxboot/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:

https://github.com/osresearch/heads/blob/master/boards/w530-dgpu-K2000m-hotp-maximized/w530-dgpu-K2000m-hotp-maximized.config#L87

Then 4mb top:

https://github.com/osresearch/heads/blob/master/boards/w530-dgpu-K2000m-hotp-maximized/w530-dgpu-K2000m-hotp-maximized.config#L92

(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.