Laptop with two GPUs

Greetings all,

I have acquired a W540 laptop with two GPUs, Intel HD Graphics 4600 and NVIDIA Quadro K1100M. I found on vermaden's web-site article about installing FreeBSD on a predecessor -W520, https://vermaden.wordpress.com/2022/04/14/freebsd-13-1-on-thinkpad-w520/.

Unfortunately, the W540 does not have any UEFI/BIOS settings for disabling one of the GPUs. Will I have a problem with having the two cards when installing FreeBSD?

Kindes regards,

M
 
What I can tell you is that I once had Lenovo Thinkpad P2000 mobile workstation for a few years. It had a Xeon processor, 32 GB ECC RAM and Quadro P2000 GPU. FreeBSD did run on it.
Initially I did have to enable/disable either of the GPUs in the UEFI. However, later I did get Nvidia Optimus working (that is their marketing term for Intel integrated GPU + Nvidia dedicated). There is x11/nvidia-hybrid-graphics and a wiki article somewhere.

 
Greetings all,

I have acquired a W540 laptop with two GPUs, Intel HD Graphics 4600 and NVIDIA Quadro K1100M. I found on vermaden's web-site article about installing FreeBSD on a predecessor -W520, https://vermaden.wordpress.com/2022/04/14/freebsd-13-1-on-thinkpad-w520/.

Unfortunately, the W540 does not have any UEFI/BIOS settings for disabling one of the GPUs. Will I have a problem with having the two cards when installing FreeBSD?

Kindes regards,

M
The *40 line of ThinkPads was one of the worst. Besides the fact that the now legendary 7-row keyboard was abandoned in W530 (and I have used FreeBSD on W530 for more then 3 years) - the @lenovo went one more level up and on *40 also touchpads were fucked up ... seems what BIOS setting were also hit.

I learned hard that it is a real PITA to use FreeBSD (or any operating system that is not welcomed) on unsupported hardware.

IMHO - put that W540 laptop on a GTFO stage (just sell it on EBAY/AMAZON or any other platform you know You can sell it on) - and get one that You know is supported - or You can try to use one of the Nvidia Optimus on FreeBSD guides - https://github.com/pouya-eghbali/freebsd-nvidia-optimus - with one available here.

My comment is not here to scare You away from FreeBSD.

My comment here is like a red pill in The Matrix movie - its better to get hardware that is known to more or less work with FreeBSD - then to try to fix the humanity and run FreeBSD on a laptop that is known to NOT work.

The choice is yours :)

Regards,
vermaden
 
Hi vermaden,

you must love Matrix (the movie). ;)

Kindest regards,

M

Its a really good movie - one of the best actually - but it also has some interesting connection with FreeBSD.

Here: https://www.freebsd.org/press/press-rel-1/

The Matrix movie was rendered on 32 FreeBSD servers because it was faster to run the rendering software on FreeBSD in Linux Binary Compatibility mode (its not emulation) then to run the same workload natively on Linux in that time (1998-1999).

Regards,
vermaden
 
"Dual GPU" - I think that's a misunderstanding. The Intel graphics are integrated (The specs as listed on vermaden 's blog will tell you as much) with the Intel CPU. The NVidia GPU is the discrete one.

I can't remember exactly where, but I do recall seeing info that using a discrete GPU inside a laptop is only possible if you're using an external monitor. So, in the BIOS, you really have to enable/disable your HDMI input. That's what connects the dots to using or not using the internal discrete card. Yeah, not exactly intuitive.
 
Hi astyle,

thank you for the clarification, you are, of course, correct in that the Intel graphics is integrated; I just did not know what terminology to use to describe the configuration.

Kindest regards,

M
 
I can't remember exactly where, but I do recall seeing info that using a discrete GPU inside a laptop is only possible if you're using an external monitor. So, in the BIOS, you really have to enable/disable your HDMI input. That's what connects the dots to using or not using the internal discrete card. Yeah, not exactly intuitive.
I cannot confirm that at least for the Lenovo Thinkpads I had with both integrated and dedicated GPUs. Both GPUs were able to be used with either an internal or an external monitor (or even internal and external monitors at the same time). That is where that "Nvidia Optimus" magic comes in so you can not only switch from one to the other but actually use both at the same time (i.e. the integrated GPU for "light" applications and the dedicated one for your CAD applications.

I do however not know what the current state of FreeBSD's support for that is. I certainly was able to use both by switching from one to the other, not sure anymore about "both at the same time". I think VirtualGL supports that.
 
Which desktop environment?

NVIDIA Quadro K1100M

I have the same in an HP ZBook 17 G2, which I normally use with x11/nvidia-driver-470 and hybrid graphics disabled.

Not long ago, I experimented with inferior x11/nvidia-driver-390 to tell whether fewer bugs would be encountered. Not so; 470 is better in my case (FreeBSD-CURRENT), YMMV.

For hybrid graphics, the FreeBSD Handbook makes no mention of essentials such as the secondary drivers. I was aware of x11/nvidia-secondary-driver.

In Discord, I learnt of x11/nvidia-secondary-driver-390. x11/nvidia-secondary-driver-470 is non-existent.

A couple of years ago I used Intel graphics alone, with limited success.

A few days ago I enabled hybrid graphics and tried graphics/drm-61-kmod. I couldn't get an X11 session. This was before firmware updates were packaged.
 
Interesting...

I've been struggling to get a configuration that works in my W530.
I created a small script that loads correct modules and custom xorg.conf files based on which GPU I have activated in BIOS.

However, I would be very keen into using Optimus, because I need to encrypt my Windows disk with bitlocker and when I change GPUs in BIOS, bitlocker stops working and I need to enter a recovery key manually.

So I created an xorg.conf that assigns the monitor to the modesetting driver via BusID and also loads the nvidia driver. It works fine, but during start, the nvidia driver gets unloaded.

I also tried the nvidia-optimus-driver but I don't think it works with FreeBSD 14.

Also, after upgrading to FreeBSD 14, adjusting brightness stopped working on Intel driver (I think it works with modesetting). Using the backlight command works, though. And it freezes the machine on the nvidia 470 driver.

My questions would be:
1. I think I am wasting my time and Optimus doesn't work in FreeBSD on a ThinkPad W530. Anyone to confirm? I sometimes use the NVIDIA GPU, but not often, so I tend just to set Intel and forget about it. But the bitlocker issue annoys me.
2. Anyone else having issues setting brightness after upgrading to FreeBSD 14?
 
I am not sure if necro is good etiquette in our forum. Please let me know if I am off best practices here.

I was rocking daily the W530 until two days ago. I "upgraded" to a P1 Gen 4. Too many episodes of bit rot, and I want to retire my 2009 Mac Pro. Gone is the nice keyboard (I had mine upgraded with the W520 keyboard), removable battery, and hello tons of thermal throttling.

Anyway, installation went well. 1 nvme is half windows , half zfs and the mirror is on the 2nd nvme. Boot works perfectly, everything installed fine, and I was hoping to keep using my script to load correct modules and X configuration depending on the GPU I have enabled in BIOS. On my W530, I have it docked 90% of the time, so NVIDIA stayed on and I'd switch to Intel when I'd go out of town.

However, to my horror, the ThinkPad P1 has only "hybrid", or "nvidia" options. There's no Intel only.

So Cath O'Deray , I managed to get X up in the configuration you described. However, once I load kernel modules for the Intel GPU, powermon shows the CPU going from 5W to 15W every 5-6 seconds, then immediately back. The BIOS has some special S3 mode for "versions of Linux that are not compatible with Suspend-to-Idle". Maybe this would help?

Running the nvidia-secondary-driver managed to get me with X up, and by using that nvgfx script, glxinfo gives me NVIDIA instead of Intel. Starting blender this way gives me segmentation fault, though. But if I start blender using the Intel and take and export of the settings, it tells me it is on software renderer - so, I am not sure if I am reding the report wrong or if I am still missing something when it comes to the configuration.

I looked arount the forums, but it seems also that some packages have changed names, so I am a bit at a loss. If NVIDIA on hybrid mode is a no go, I am happy to settle for the Intel, as I don't game and nothing I do requires much of a GPU. But it would be nice to see it working.

Anyone with a similar setup willing to comment?
 
After following again Vermaden's wonderful documentation and installing GPU firmwares, CPU sits at 5W when idle, without the spikes. X is up and the Intel seems to be hardware accelerating fine.

Unlike the W530 that lasts longer in FreeBSD (after configuring everything), the computer is still warmer. I suspect the NVIDIA is still running. I will work on it and report back.

edit:
thread for this: https://forums.freebsd.org/threads/...gen-4-configuration-reducing-cpu-usage.95445/
 
Back
Top