Return to Level1Techs.com

Figuring out if I can Linux Desktop and Windows Gaming VM on my laptop

iommu

#1

Hey!

I have a MSI GS63VR, it’s I think two years old at this point? It’s the Best Buy model with a i7-6700HQ and a GTX 1060. I bought it Open Box, and took it traveling with me and it’s been through a lot…

Windows is getting increasingly finnicky and it’s hard to pinpoint what the issue is because I’ve had to physically repair the wifi antenna cables, the module’s been replaced, and some things just don’t work the way they’re supposed to. I’m hoping that switching to Linux and having a bit more agency will help me do diagnostics on this stuff, but I’m also just hoping to transition to Linux as my daily OS to improve my computer literacy.

So, I want to set up Linux on this machine and use it as my operating system for surfing the web and general management of things, and when I want to play games I can boot a Windows 10 VM and pass my GTX 1060 through to it. Here’s some general questions about that, and we can get onto where I’m at in this process after:

  • Undervolting my CPU in Intel’s XTU had a pretty significant effect on my battery life for the better. Am I able to do something like that with Linux as my host OS?
  • If my plan is to run Linux on my iGPU and leave my GTX 1060 disabled until my Windows gaming VM boots, should I expect to see an improvement in my system’s battery life?
  • Do you have any general advice for saving battery life in Linux?
  • Is there any reason to pick a particular Linux distro for this project? I’d like to start playing with art assets and customizing Linux to have an attractive desktop experience–is there a distro I should consider for that?

So, my i7-6700HQ says it supports VT-d and VT-x according to Intel and my investigation seems to validate that. I have an USB drive with Antergos Live on it, and had to do some finagling around to get it to actually boot into the Live desktop. Every time I tried to boot into Live, it would hang at the white “splash” screen with the antergos logo and the progress dots. The five dots would appear, and it would hang after the first dot disappeared each time.

Googling around, adding the modprobe.blacklist=nouveau allowed me to boot into the desktop environment. From here, I could not connect to the (unsecured) Wireless network on this side of my apartment, but I was able to connect to a random nearby unsecured network? Bluetooth was not working, so I couldn’t pair my mouse, which is inconvenient. My wifi card is an aftermarket Intel 8265.

Anyways, I went to try to verify my iommu groups, so I added intel_iommu=on and iommu=pt to my arguments and booted back into Antergos Live. I followed the Arch Wiki for verifying my groups, and this is my output.

[[email protected] ~]$ dmesg | grep -e DMAR -e IOMMU
[    0.000000] ACPI: DMAR 0x000000003A53D658 0000A8 (v01 INTEL  SKL      00000001 INTL 00000001)
[    0.000000] DMAR: IOMMU enabled
[    0.003333] DMAR: Host address width 39
[    0.003333] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.003333] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0505e
[    0.003333] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.003333] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.003333] DMAR: RMRR base: 0x0000003a26e000 end: 0x0000003a28dfff
[    0.003333] DMAR: RMRR base: 0x0000003b800000 end: 0x0000003fffffff
[    0.003333] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
[    0.003333] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.003333] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
[    0.003333] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
[    0.003333] DMAR-IR: Enabled IRQ remapping in xapic mode
[    2.749309] DMAR: No ATSR found
[    2.749346] DMAR: dmar0: Using Queued invalidation
[    2.749349] DMAR: dmar1: Using Queued invalidation
[    2.749496] DMAR: Hardware identity mapping for device 0000:00:00.0
[    2.749497] DMAR: Hardware identity mapping for device 0000:00:01.0
[    2.749501] DMAR: Hardware identity mapping for device 0000:00:02.0
[    2.749503] DMAR: Hardware identity mapping for device 0000:00:14.0
[    2.749504] DMAR: Hardware identity mapping for device 0000:00:14.2
[    2.749505] DMAR: Hardware identity mapping for device 0000:00:16.0
[    2.749506] DMAR: Hardware identity mapping for device 0000:00:17.0
[    2.749507] DMAR: Hardware identity mapping for device 0000:00:1c.0
[    2.749508] DMAR: Hardware identity mapping for device 0000:00:1c.4
[    2.749509] DMAR: Hardware identity mapping for device 0000:00:1d.0
[    2.749510] DMAR: Hardware identity mapping for device 0000:00:1d.5
[    2.749512] DMAR: Hardware identity mapping for device 0000:00:1d.6
[    2.749513] DMAR: Hardware identity mapping for device 0000:00:1f.0
[    2.749514] DMAR: Hardware identity mapping for device 0000:00:1f.2
[    2.749515] DMAR: Hardware identity mapping for device 0000:00:1f.3
[    2.749516] DMAR: Hardware identity mapping for device 0000:00:1f.4
[    2.749518] DMAR: Hardware identity mapping for device 0000:01:00.0
[    2.749521] DMAR: Hardware identity mapping for device 0000:3c:00.0
[    2.749524] DMAR: Hardware identity mapping for device 0000:3d:00.0
[    2.749527] DMAR: Hardware identity mapping for device 0000:3e:00.0
[    2.749527] DMAR: Setting RMRR:
[    2.749528] DMAR: Ignoring identity map for HW passthrough device 0000:00:02.0 [0x3b800000 - 0x3fffffff]
[    2.749529] DMAR: Ignoring identity map for HW passthrough device 0000:00:14.0 [0x3a26e000 - 0x3a28dfff]
[    2.749531] DMAR: Prepare 0-16MiB unity mapping for LPC
[    2.749531] DMAR: Ignoring identity map for HW passthrough device 0000:00:1f.0 [0x0 - 0xffffff]
[    2.749549] DMAR: Intel(R) Virtualization Technology for Directed I/O
[[email protected] ~]$ #!/bin/bash/
[[email protected] ~]$ shopt -s nullglob
[[email protected] ~]$ for d in /sys/kernel/iommu_groups/*/devices/*; do
> n=${d#*/iommu_groups/*/devices/*}; n=${n%%/*}
> printf 'IOMMU Group %s ' "$n"
> lspci -nns "${d##*/}"
> done;
IOMMU Group 0000:00:00.0 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1910] (rev 07)
IOMMU Group 0000:00:1d.6 00:1d.6 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #15 [8086:a11e] (rev f1)
IOMMU Group 0000:00:1f.0 00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-H LPC Controller [8086:a14e] (rev 31)
IOMMU Group 0000:00:1f.2 00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-H PMC [8086:a121] (rev 31)
IOMMU Group 0000:00:1f.3 00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
IOMMU Group 0000:00:1f.4 00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-H SMBus [8086:a123] (rev 31)
IOMMU Group 0000:3c:00.0 3c:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 [144d:a804]
IOMMU Group 0000:3d:00.0 3d:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E2400 Gigabit Ethernet Controller [1969:e0a1] (rev 10)
IOMMU Group 0000:3e:00.0 3e:00.0 Network controller [0280]: Intel Corporation Wireless 8265 / 8275 [8086:24fd] (rev 78)
IOMMU Group 0000:00:01.0 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
IOMMU Group 0000:01:00.0 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile 3GB] [10de:1c20] (rev a1)
IOMMU Group 0000:00:02.0 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
IOMMU Group 0000:00:14.0 00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] (rev 31)
IOMMU Group 0000:00:14.2 00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131] (rev 31)
IOMMU Group 0000:00:16.0 00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] (rev 31)
IOMMU Group 0000:00:17.0 00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA Controller [AHCI mode] [8086:a103] (rev 31)
IOMMU Group 0000:00:1c.0 00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #1 [8086:a110] (rev f1)
IOMMU Group 0000:00:1c.4 00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #5 [8086:a114] (rev f1)
IOMMU Group 0000:00:1d.0 00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #9 [8086:a118] (rev f1)
IOMMU Group 0000:00:1d.5 00:1d.5 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #14 [8086:a11d] (rev f1)

Does it look like my system will support running Linux off of my iGPU, and then let me pass my GTX 1060 through to a Windows 10 VM?

Also, assuming I can run a VM–what’s the status of Qubes or looking glass IOMMU? Are they accessible to a newbie like myself? Has Qubes gotten better at gaming VMs since the L1T video showcasing it?

Thanks!


#2

I don’t know if you can do pass through on a laptop effectively. The problem as I understand it lies in the single display setup. Your grouping looks fine though.l


#3

I can see the single display being an issue, which is part of why I was wondering if “looking glass” IOMMU might be the solution. Could I either render what the gaming VM does in a (fullscreen) window, or do looking glass in a fullscreen window?

Alternatively, it shouldn’t be too problematic (assuming the gaming VM isn’t locking up) for the Gaming VM to just take over the single display while I’m doing the Windows thing. If that’s possible.


#4

Unless your GPU supports faking a monitor being connected then youll have at the very least get a dummy adapter that just fakes a being a monitor


#5

Check this out.


#6

This looks like it will do exactly what I was hoping to do. Thank you so much for sharing!


#7

Did any of this work and would it work on Ubuntu? I’m looking at doing the exact same thing with the exact same laptop.


#8

Sorry, this didn’t end up working out for me. I’m not super savvy at this sort of thing, so I didn’t do a good job of retaining what was off about my laptop.

The issue was that my laptop doesn’t have a specific chip that’s supposed to be helpful to this procedure, in spite of the fact that I have Nvidia Optimus. Also, the MSI GS63VR has weird issues with running Linux in the first place.

It might be possible, but there were enough barriers and headaches, and it’s all over my head as a lay person. I gave up.


#9

I got it to work using Pop_os! they bundle the nvidia drivers so it will work out of the box. a lot more tweaks are needed to make it perfect but it actually starts up.