FreeBSD vs Windows Battery Life Comparison

jardows

[H]ard|Gawd
Joined
Jun 10, 2015
Messages
1,823
I have a Dell Precision M4800, which has a 2.5" and an mSATA slot, so I am dual-booting Windows and FreeBSD on separate drives, using the Dell boot menu. I wanted as close to an Apples-to-Apples comparison to working with FreeBSD vs Windows, especially when it came to performance and battery life.

One challenge in making a true Apples-to-Apples comparison is that this laptop has an MXM module AMD M5100M graphics card. FreeBSD drivers do not work with switchable graphics enabled in the BIOS, but Windows does not work properly without switchable graphics enabled in the BIOS. The switchable graphics feature would allow the system to use only the integrated Intel video until the power of the discrete card was needed. This has a significant impact on battery life.

In FreeBSD, with switchable graphics enabled, the accelerated drivers will crash the system. Without proper video drivers, you lose out on any potential energy savings, and certainly lose out on performance. In Windows, with switchable graphics disabled, the video does not properly output to the laptop screen, and an external monitor is required to properly use the system. I understand that the Nvidia MXM cards and drivers have settings that allow for Windows to properly work with switchable graphics turned off, and there is experimental support for the Optimus feature in the FreeBSD Nvidia drivers. I'm not spending a couple hundred dollars to get the equivalent performance Nvidia MXM card though, so I have to work with what I have.

On to the battery life test. I ran the test with switchable graphics Off, and in Windows had an external monitor connected. I used only the laptop screen in FreeBSD. For FreeBSD, I used the latest 12.1-RELEASE version, with the included radeonkms.ko driver, and powerd enabled. XFCE is the desktop environment. Windows is a clean install of 1909, with the latest video drivers from AMD. I do have running on the Windows computer the Nexus dock (free edition) and in the power plan set the computer to never go to sleep. Other than this, there are no tweaks to either system.

I first tested FreeBSD. From 100% battery power to 6%, the drain time was 3 hrs, 6 minutes.
In Windows, from 100% battery power to 5%, the drain time was 3 hrs, 21 minutes.

A couple of caveats to my tests:
1. I am doing this test while at work, so the drain time should be giving a couple of minutes either way. It got busy during the Windows test, so I don't recall the exact time that Windows was at 5%, so it is possible that the battery drain could have been up to 10 minutes less.
2. Windows at some point switches to a lower performance mode to save battery life. FreeBSD out of the box does not do this.
3. There are tweaks that can be done on FreeBSD that could potentially give better power savings. I will be looking into those to see what can be done.

So what is the conclusion of this test? It is murky. If I am going to use Windows with battery power on this laptop, I wouldn't be using it with an external monitor, which means I would have the switchable graphics enabled in the system BIOS. This should allow for significantly longer battery life (I will test this to see what is gained), but makes a true apples-to-apples comparison difficult. This does indicate that if someone were using a laptop just with integrated Intel graphics, there would be no significant loss in battery performance using FreeBSD vs. Windows.
 

IdiotInCharge

[H]F Junkie
Joined
Jun 13, 2003
Messages
13,848
In general, FreeBSD's relatively small support infrastructure makes it a very poor candidate for use on the most modern hardware or even anything outside of the mainstream. For where it does work, it's stable, and has the combined advantage and disadvantage of being its own thing.

That doesn't mean that it can't be made to work, as obviously you did, but you're also using older hardware that is still missing features. Even Linux hasn't gotten switchable graphics really figured yet.
 

jardows

[H]ard|Gawd
Joined
Jun 10, 2015
Messages
1,823
In general, FreeBSD's relatively small support infrastructure makes it a very poor candidate for use on the most modern hardware or even anything outside of the mainstream. For where it does work, it's stable, and has the combined advantage and disadvantage of being its own thing.

That doesn't mean that it can't be made to work, as obviously you did, but you're also using older hardware that is still missing features. Even Linux hasn't gotten switchable graphics really figured yet.
There has been major progress made in consumer level hardware support over the last few versions, and even with 12.1 over 12.0. Other than Wi-Fi 6, there isn't anything hardware-wise that would be considered modern it cannot use. There is specific hardware that does not have drivers, but you can run FreeBSD on a Ryzen 3700x and a Nvidia RTX 2080 without any issues. Laptop-wise, it will work with most, but some features may not work (Alps touchpads won't get multi-touch, but Synaptics will for example). Pretty much anything that is a business-class laptop will work. The only reason I am using an older laptop is because it is what I have. Come next year's tax return, I am debating on trading in the M4800 for an HP ProBook 450/455 G6, which I am confident will work with FreeBSD without issue. This current system gives me a great opportunity for comparison, and I like to share my findings, and will do so here as most people in my personal life really aren't interested in hearing about computer OS comparison tests!
 
Top