Plasma Desktop on Hyper-V

ArtVC

New Member


Messages: 2

Hello.
I'm trying to get FreeBSD on virtual machine with modern Desltop GUI. I'm trying using Hyper-V instead of VirtualBox because of after update FreeBSD from 12.0 up to 12.1 the mouseclicks doesn't work anymore even with VB guest additions.

I've install FreeBSD 12.0 on Hyper-V and upgrade it up to 12.1. For this i used https://williamjnelson.me/technology/freebsd/install-freebsd-on-hyper-v-2012-r2
And alse I'm trying to reproduce steps from post in this forum without VirtualBox part: https://www.cyberforum.ru/post13830558.html
For VirtualBox it working great and Plasma Desktop running fine.

My host: Windows 10 Pro Version 2004 build 19041.208

When i try to test something installed, i'm getting:
Code:
$ startkde
-sh: startkde: not found
Code:
$ xorg
-sh: xorg: not found

But when i trying to insall again Xorg, for example:
Code:
# pkg install xorg
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed

So, nothing happening when system has booted and i don't see any errors on my screen. And also i guess that there could be a video driver issue in Hyper-V - maybe need to install some driver, but i didn't find anything in Google and DuckDuckGo about it.
Please, help me to find a way to solve this.

Now in Hyper-V and FreeBSD i have:

Code:
# freebsd-version
12.1-RELEASE-p4

/root/.xinitrc
Code:
$ more /root/.xinitrc
exec startkde
$ ll /root/.xinitrc
-rw-r--r--  1 root  wheel  - 14 Apr 26 13:51 /root/.xinitrc


/etc/rc.conf
Code:
hostname="ArtVC-HyperV-FreeBSD"
ifconfig_hn0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
sddm_enable="YES"
dbus_enable="YES"
hald_enable="YES"

/usr/local/share/sddm/scripts/Xsetup
Code:
$ more /usr/local/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears
export LANG="en_EN.UTF-8"
export LC_ALL="en_EN.UTF-8"
export GDM_LANG="en_EN.UTF-8"
export LANGUAGE="en"
setxkbmap "us"

$ ll /usr/local/share/sddm/scripts/Xsetup

-rwxr-xr-x  1 root  wheel  - 185 Apr 26 14:04 /usr/local/share/sddm/scripts/Xsetup*

/etc/X11/xorg.conf
Code:
$ more /etc/X11/xorg.conf
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "/usr/local/share/fonts/misc/"
        FontPath     "/usr/local/share/fonts/TTF/"
        FontPath     "/usr/local/share/fonts/OTF/"
        FontPath     "/usr/local/share/fonts/Type1/"
        FontPath     "/usr/local/share/fonts/100dpi/"
        FontPath     "/usr/local/share/fonts/75dpi/"
        FontPath     "catalogue:/usr/local/etc/X11/fontpath.d"
EndSection

Section "Module"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "kmsdev"                    # <str>
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "PageFlip"                  # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "DoubleShadow"              # [<bool>]
        #Option     "Atomic"                    # [<bool>]
        Identifier  "Card0"
        Driver      "modesetting"
        BusID       "PCI:0:8:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

$ ll /etc/X11/xorg.conf
-rw-r--r--  1 root  wheel  - 2254 Apr 26 14:06 /etc/X11/xorg.conf

Code:
$ pciconf -lv | grep display -B3
vgapci0@pci0:0:8:0:     class=0x030000 card=0x00000000 chip=0x53531414 rev=0x00 hdr=0x00
    vendor     = 'Microsoft Corporation'
    device     = 'Hyper-V virtual VGA'
    class      = display
 

Emrion

Aspiring Daemon

Reaction score: 212
Messages: 678

Concerning VirtualBox, enable moused in /etc/rc.conf and/or set kern.evdev.rcpt_mask=6 in /etc/sysctl.conf.

This problem is widely documented in this forum. Make a search if you want to know more.

And there is no xorg command. It's startx.
 
OP
A

ArtVC

New Member


Messages: 2

Concerning VirtualBox, enable moused in /etc/rc.conf and/or set kern.evdev.rcpt_mask=6 in /etc/sysctl.conf.



This problem is widely documented in this forum. Make a search if you want to know more.



And there is no xorg command. It's startx.

Thank you very much! That worked:

sysctl kern.evdev.rcpt_mask=6

Also i didn't say that i tried set moused_enable="YES", but the system get working veeeeryyy slowed down - maybe because of 2 instance of demon was start working with mouse - my CPUU was loadede at 100%. But yes, click did work too :)
I seen that people write in the forums that VirtualBox Guest Aditions starting moused by self.

Hyper-V
And looks like i need Nvidia driver to start X, because
startx
show me some errors and there is
(EE) open /dev/dri/card0: No such file or directory
in /var/log/Xorg.0.log
I guess, it could take a couple of days until I will install video driver XD
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,024
Messages: 38,480

The "Howto" section is not for asking how to do things. Thread moved.
 
Top