Jump to content

Arch Linux WSL2

Is there any way to have arch linux on wsl2 work like a normal arch install? I just installed arch linux on wsl2 using this: https://github.com/yuk7/ArchWSL, but I noticed that a lot of things are different:

1. It took about 20 minutes to get pacman to work

2. when it boots up it is auto signed in as root

3. xorg is not working

4. there is no boot manager

5. xrandr can't find a display

can anyone help me get this to work correctly?

Link to comment
Share on other sites

Link to post
Share on other sites

I would strongly recommend you to use Virtualbox instead of WSL.

It will save you a lot of hassle.

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, imcaspar said:

I would strongly recommend you to use Virtualbox instead of WSL.

It will save you a lot of hassle.

 

I have a VM in Virtualbox as well I'm just doing this for fun.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Lemon797 said:

I have a VM in Virtualbox as well I'm just doing this for fun.

Oh, that makes sense. Can't really help you much then, I run Linux natively.

Link to comment
Share on other sites

Link to post
Share on other sites

WSL2 is a customized hyper-v virtual machine. Id really just make a vm if you want options and normal opteration

 

But can you make more details about what errors you get when starting X?

 

things like autosign and no bootloader is normal for how its setup, if you don't want that, dont'use wsl2

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Electronics Wizardy said:

WSL2 is a customized hyper-v virtual machine. Id really just make a vm if you want options and normal opteration

 

But can you make more details about what errors you get when starting X?

 

things like autosign and no bootloader is normal for how its setup, if you don't want that, dont'use wsl2

when I run xrandr I get this:

Can't open display

when I run startx I get this:

X.Org X Server 1.20.9
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux Liam-PC 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64
Kernel command line: initrd=\initrd.img panic=-1 pty.legacy_count=0 nr_cpus=12
Build Date: 02 September 2020  06:17:44AM

Current version of pixman: 0.40.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 19 14:15:30 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, imcaspar said:

Did you install a graphics driver?

Yes I tried to install the nvidia driver for my GTX 1050.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Lemon797 said:

Yes I tried to install the nvidia driver for my GTX 1050.

I believe WSL doesn't support graphics passthrough, unless you are on a Beta or Dev channel as the feature is still to come, so you'd have to do it traditionally.
 

https://research.wmz.ninja/articles/2017/11/setting-up-wsl-with-graphics-and-audio.html

^This is the method I know, but I'm not too sure how up-to-date it is.
 

https://www.zdnet.com/article/windows-10-linux-subsystem-you-get-gpu-acceleration-with-intel-amd-nvidia-drivers/#:~:text=AMD%2C Intel and Nvidia have,Ubuntu 18.04 and Ubuntu 20.04.
 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×