microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.33k stars 814 forks source link

WSL 2: Enabling 'Virtual Machine Platform' feature causes Realtek Gaming Gbe Family Controller driver to fail to load #5911

Closed rinfimate closed 3 years ago

rinfimate commented 4 years ago

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.508]
Your Distribution version: Ubuntu (but doesn't matter, since it's Windows issue).
Whether the issue is on WSL 2 and/or WSL 1: WSL2

System Details: HP Omen 2020 with AMD Ryzen 4800H with Windows Home

Steps to reproduce

  1. Install the 'Virtual Machine Platform' features, following steps here to install WSL 2.
  2. Reboot machine.
  3. Open Device manage, and notice that Realtek Gaming Gbe Family Controller fails with: The driver for this device has been blocked from starting because it is known to have problems with Windows. Contact the hardware vendor for a new driver. (Code 48). The ethernet card is no longer visible in network settings and cannot be used anymore.
  4. Open WSL 2 based distro (Ubuntu), and verify that it works.
  5. Disable 'Virtual Machine Platform'
  6. Reboot.
  7. Observe that resolution is restored to normal, and Realtek Gaming Gbe Family Controller driver loads successfully and the ethernet card can be used again.
  8. WSL 2 image no longer work. WSL 1 based image works fine.

Expected behavior

I would like to run WSL 2 based Linux and be able to use my ethernet card.

Actual behavior

Some conflict occurs between the Virtual Machine Platform feature and Realtek Ethernet drivers. BTW, i tried installing the latest drivers too but they don't work. The problem right now is that they cannot co-exist.

I'd like to know whether this is a Windows or Realtek issue, so I can followup for support accordingly. Any other logs/debugging I can gather or provide?

MingLu8 commented 3 years ago

I just updated my BIOS to 1.0.7, and now my WiFi is working. I follow this instruction at my own risk with my Eluktrionic THINN 15, which I believe is the same as MechRevo S2 Air, or SCHENKER Via 15 Pro https://www.reddit.com/r/XMG_gg/comments/kb1p9i/solution_for_hyperv_and_wsl2_issues_on_various/ and the instruction here. WARNING: DO THIS AT YOUR OWN RISK, YOU COULD MESS UP YOUR PC IF SOMETHING GOES WRONG.

qinywolf commented 3 years ago

Update. I contacted HP. After testing, the wired network card works normally under Windows 10 version 1909. What is certain is that the problem only occurs in version 2004. Due to time constraints, I did not test it on my machine (OMEN Ryzen 4800h).

mdkathon commented 3 years ago

Update. I contacted HP. After testing, the wired network card works normally under Windows 10 version 1909. What is certain is that the problem only occurs in version 2004. Due to time constraints, I did not test it on my machine (OMEN Ryzen 4800h).

I am on 20h2, same issue noted above. Interesting, what you're saying if I am correct is that the Realtek RTL8168 does not show the code 48 error in 1909 if WSL/Hyper-V are enabled? If that's the case I wonder if this is a mix of WSL2 preperation and also driver/addressing/memory isolation issues. Hoping that the other vendor BIOS fix commends trickle over to HP for a fix. My Omen 15 is kind of dead in the water without wired ethernet and I don't really want to upgrade my infrastructure to 802.11ax(cost..) at the moment.

qinywolf commented 3 years ago

Update. HP engineers have been able to reproduce this problem in 20h2, but after he reported it to the technical department, the technical department said that it would not make a repairable BIOS update for this problem. I tried to contact AMD, and AMD suggested that I contact the OEM. Therefore, the only possibility for us is to give feedback to Microsoft. Before that, I had raised this issue in the Microsoft community. What is certain is that this problem appears after the 20h1 version, maybe Microsoft will fix it, or not. The repair may take a long time.

qinywolf commented 3 years ago

In the 18363.778 (1909) version (no backported WSL2), starting hyper-v everything is normal. The same problem as the issue will occur when hyper-v is started in the 20h2 version. I don't have an additional hard drive to test with the 1909 version with wsl2.

davidfregoli commented 3 years ago

All of the problems end up relating to the UMA (unified memory acrhitecture) buffer size setting, as you can see here the Tongfang BIOS fix involves that.

What's not clear to me is what changes windows > 2004 made to how it interfaces with UMA and whether the wsl 2 backport would include those.

techno-disaster commented 3 years ago

it would not make a repairable BIOS update for this problem

it would not make a repairable BIOS update for this problem why tho :( maybe if xmg peeps tell us what the fix was someone from the community can get a bios up

Edit: The only reply I got from xmg on reddit ->Share memory still cannot over 2GB after enabling the Hyper-V (AMD PI solution) is this line

davwheat commented 3 years ago

@Techno-Disaster XMG don't know, you need to contact TongFang for that info as they make the BIOSes.

I have copies of before and after these updates available I believe if someone wants to create their own bios update at their own risk.

davidfregoli commented 3 years ago

maybe if xmg peeps tell us what the fix was someone from the community can get a bios up

Edit: The only reply I got from xmg on reddit ->Share memory still cannot over 2GB after enabling the Hyper-V (AMD PI solution) is this line

I think the OEMs got the bios from Tongfang and didn't do much else apart from validation, so they genuinely don't know. That line is probably a poor translation from Chinese but it's evident that is something related to the UMA buffer size setting (which has caused issues also on previous Ryzen platforms, see here)

davwheat commented 3 years ago

@davidfregoli The QA XMG did was them sending me the bios and telling them it fixed it! 😂

It is indeed the UMA buffer which caused the issue. My guess is that it could be to do with the BIOS not informing windows correctly about the reserved RAM, so when Windows reserved resources for Hyper-V, it tried to reserve RAM used by the GPU and that failed.

No clue, but that's just a guess I made.

Either way, I'm collecting a history of bios updates here: https://github.com/davwheat/tongfang-pn5nu1g

I went through the differences with a hex editor, and there were a significant amount. I don't have experience with reading assembly, so I can't really decipher the real changes.

davidfregoli commented 3 years ago

I did some digging and it appears that the ability to change UMA settings was already added by MechRevo back in August, still version 1.06 bios link.

Tom from XMG tested that version out (link) and produced a video where you can see there are lots of different settings for UMA. Not sure which OEMs have the bios with the configurable settings but someone with one should mess around with them and advise the HP folks on which ones are compatible with WSL.

davwheat commented 3 years ago

@davidfregoli

Yes, but those UMA options didn't work with Hyper-V. The main fix is to provide whichever fix TongFang have applied.

No options on the 1.06 TongFang BIOS to do with UMA worked with Hyper-V.

Ettore495 commented 3 years ago

I have an HP laptop with AMD ryzen 5 4500u processor and I'm experiancing this BSOD when enabling virtual machine platform or hyper V platform windows features. I checked the event viewer and see this error:

The virtualization-based security enablement policy check at phase 0 failed with status: Virtual Secure Mode (VSM) is not initialized. The hypervisor or VSM may not be present or enabled.

Virtualization is enabled in the bios. I need WSL 2 installed on my machine in order to use docker. Does anyone have a workaround? Are we just going to wait for a bios update that hopefully comes soon?

arrrrgghhhh

minedeljkovic commented 3 years ago

@Ettore495 if you also have a Realtek wifi network card, disable it before enabling Virtual machine platform. That solved BSOD for me. Though, then you would have no working network adapter (you will experience main issue stated here with ethernet card). I "solved" that by bying external wifi adapter.

techno-disaster commented 3 years ago

@Ettore495 if you also have a Realtek wifi network card, disable it before enabling Virtual machine platform. That solved BSOD for me. Though, then you would have no working network adapter (you will experience main issue stated here with ethernet card). I "solved" that by bying external wifi adapter.

The bsod is mostly caused due to the ryzen master sdk. Of you find this in your control panel feel free to uninstall it.

Ettore495 commented 3 years ago

@minedeljkovic thanks for the tip. Unfortunately I need to use the net on my machine while also using virtual machine platform. On second thought that seems to be the only option I have for now.

@Techno-Disaster will have a look if its installed on my machine thanks

techno-disaster commented 3 years ago

Small update: got a reply from xmg hope you can share this with your OEMS and get the issue fixed.

The solution is to avoid PCIE Device Memory Mapping conflicts when Hyper-V is enabled.

matthewgrzegorczyk commented 3 years ago

Hello,

I've recently purchased the HP Omen 15 Ryzen 4800H. (15-en0020nw) I also have an issue with the Realtek Gaming GbE Family Controller. mmc_DigWcdoGyZ

WSL2 is enabled. OS: Windows 10 Pro 20H2. Build: 19042.685

@qinywolf Is there any news from the HP Support / AMD / Microsoft? Could you paste the link the the thread you started on the microsoft forums so I can follow it?

qinywolf commented 3 years ago

Hello,

I've recently purchased the HP Omen 15 Ryzen 4800H. (15-en0020nw) I also have an issue with the Realtek Gaming GbE Family Controller. mmc_DigWcdoGyZ

WSL2 is enabled. OS: Windows 10 Pro 20H2. Build: 19042.685

@qinywolf Is there any news from the HP Support / AMD / Microsoft? Could you paste the link the the thread you started on the microsoft forums so I can follow it?

You can look back at the previous response.HP's answer to me is that it will not release a repairable BIOS for this bug.

adarshnm commented 3 years ago

I'm also facing the same issue. Tried updating Realtek driver to version 10.45.928.2020 from realtek website but the issue still persists.

Ettore495 commented 3 years ago

Does anyone know how we can get AMD, Realtek, HP or even microsoft to look at this issue? Do we need a petition? :D

I have emailed realtek and I'm waiting on a reply.

techno-disaster commented 3 years ago

The solution is to avoid PCIE Device Memory Mapping conflicts when Hyper-V is enabled.

@Ettore495 try and include this in your report when talking with HP

FelixTUD commented 3 years ago

Same Problem for me on the HP Omen (Ryzen R7 4800h) with the Realtek driver, any Solutions or workarounds for the Omen yet? Maybe it is unrelated, but I also get no device errors on WSL 2 trying to use Cuda.

Sokwva commented 3 years ago

Same Problem on the HP Omen. Only to wait the BIOS update.

0ssamaak0 commented 3 years ago

Anyone contacted HP?

pankaj-nikam commented 3 years ago

Speaking of HP, do you know they officially sent me an email that they wont fix it because our laptops come with "Windows Home"? In their words, its mentioned in email which says, "the system is shipped with Windows 10 Home Single Language 64... which might not support virtualization/ hyper-v support.
If you have upgraded the OS to Pro, it does not fall in scope of support. you"ve to contact MS for this isuue.
"

All the best to those like me who purchased this and nobody there to support us.

FelixTUD commented 3 years ago

@pankaj-nikam I got a very similar answer from the HP support, but my experience was even worse, as I bought a student version of the HP Omen without any windows installation, so they wouldn't even help me with any issue regarding driver or any version of windows, with the justification that they sold it to me without windows...

So I don't think that we get any help from HP at all regarding this issue, any thread on their forum regarding problems with wsl 2 are ignored by HP without any solution or promise that they look into it.

matthewgrzegorczyk commented 3 years ago

Out of the curiosity, for how long did HP Omen worked for you on battery?

Mine was only running for 2-3h with WSL2 enabled. I really got tired of that lack of support from HP and decided to run linux natively again. Maybe I will again go for dual boot if needed. Those issues really driving me crazy, and working with VMs in Windows is a pain due to lack official nfs support.

techno-disaster commented 3 years ago

Speaking of HP, do you know they officially sent me an email that they wont fix it because our laptops come with "Windows Home"? In their words, its mentioned in email which says, "the system is shipped with Windows 10 Home Single Language 64... which might not support virtualization/ hyper-v support. If you have upgraded the OS to Pro, it does not fall in scope of support. you"ve to contact MS for this isuue."

All the best to those like me who purchased this and nobody there to support us.

Well you could just reply that this issue happens when you enable Virtual Machine Platform in features settings and that comes with windows home. That's what I told them and they elevated my case to tech team

techno-disaster commented 3 years ago

Also had a few logs and fixes from xmg that I shared above. Feel free to forward them to HP

thewavelength commented 3 years ago

@pankaj-nikam @qinywolf How did you manage to officially contact HP and get such an answer? I'm not able to find any contact options for human support. Thank you!

pankaj-nikam commented 3 years ago

@thewavelength , When the virtual chat opens, just type "Talk to a person" and it transfers to a person. He / she doesn't understand the problem and keep on escalating the issue till the person says, "OK, you will get an email from us"

This is in short what I did to get an official response from them.

Thanks.

pankaj-nikam commented 3 years ago

@Techno-Disaster , nice to see that you could get through them. I sent the screenshot of my mail to Amazon as denial of service. Let us see what they say about that.

danielsavi commented 3 years ago

Speaking of HP, do you know they officially sent me an email that they wont fix it because our laptops come with "Windows Home"? In their words, its mentioned in email which says, "the system is shipped with Windows 10 Home Single Language 64... which might not support virtualization/ hyper-v support. If you have upgraded the OS to Pro, it does not fall in scope of support. you"ve to contact MS for this isuue."

All the best to those like me who purchased this and nobody there to support us.

Pure B.S.! I do have Windows 10 Home and I'm facing the same issue, so? HP Omen Model 15-en0xxx OS: Windows 10 Home Build: 19041.746

saitejach1998 commented 3 years ago

The team that receives these complaints/bug reports in India is just a plain old tech support team and has no extensive knowledge about advanced issues or connection to the people who are responsible for updates and bug fixes. Therefore, There is no way of making the update team aware of such a situation. Maybe folks from other countries can try talking to their HP support and get this issue escalated.

There's another thread on WSL which may have the same root cause here.

techno-disaster commented 3 years ago

This is the reply i got from thr technical team today.

Subjected case elevated to technical team for LAN Connection Issue on Virtual Machine.

Got below revert from team

If the unit LAN Connection is working fine on Standalone windows.

However we do not support virtualization on a consumer model, Please contact the Application vendor.

I honestly believe that whoever saw my case in the tech team is just retarded or too lazy too actually work on the problem. Giving up now.

thewavelength commented 3 years ago

I also gave up yesterday and will send it back. It's so sad because everything else is a true masterpiece for the given price point.

pankaj-nikam commented 3 years ago

@Techno-Disaster , @thewavelength , Check the official drivers page, I did it today and found the F.20 version for the BIOS. It is working well without any crash and the Realtek GBE is also working fine.

FelixTUD commented 3 years ago

@pankaj-nikam sadly not available for the HP Omen Model 15-en0xxx

0ssamaak0 commented 3 years ago

@Techno-Disaster , @thewavelength , Check the official drivers page, I did it today and found the F.20 version for the BIOS. It is working well without any crash and the Realtek GBE is also working fine.

Which model do u have?

pankaj-nikam commented 3 years ago

@FelixTUD thats sad :( Let us hope that they release a patch soon for your model too. @0ssamaak0 , model number is HP Pavilion Gaming Laptop 15-ec1xxx.

0ssamaak0 commented 3 years ago

@FelixTUD thats sad :( Let us hope that they release a patch soon for your model too. @0ssamaak0 , model number is HP Pavilion Gaming Laptop 15-ec1xxx.

When did this patch release?

pankaj-nikam commented 3 years ago

@0ssamaak0 I did it today. The date says that it was released in December. However I can confirm that it was not visible in December.

techno-disaster commented 3 years ago

@pankaj-nikam any changelog available?

pankaj-nikam commented 3 years ago

@Techno-Disaster , the change log simply states "- Provides support for Windows 10 v20H2."

This is the drivers page: https://support.hp.com/in-en/drivers/selfservice/hp-pavilion-gaming-15-ec1000-laptop-pc-series/32612064/model/38031343?sku=1N1G1PA

techno-disaster commented 3 years ago

@Techno-Disaster , the change log simply states "- Provides support for Windows 10 v20H2."

This is the drivers page: https://support.hp.com/in-en/drivers/selfservice/hp-pavilion-gaming-15-ec1000-laptop-pc-series/32612064/model/38031343?sku=1N1G1PA

Can you confirm if Realtek Ethernet drivers are working when you turn on virtual machine platform in windows features settings. Also can you mention your exact ethernet card and the current driver version. Screenshots on VMP enabled and device manager with etherent would be apperciated, will share the same with HP tech team tommorow

rinfimate commented 3 years ago

Hopefully they will have a BIOS Update for HP Omen to provide support for Windows 10 v20H2 and this fixes this issue once and for all.

pankaj-nikam commented 3 years ago

@Techno-Disaster Yes, the drivers are working fine. I have the Hyper V and Virtual Machine Platform enabled. Please find below the screenshot for the driver version:

image

image

VMP: image

pankaj-nikam commented 3 years ago

@rinfimate Yes, agreed. Let us hope for the best.

thewavelength commented 3 years ago

@pankaj-nikam Did they also state they wouldn't update your specific model?