Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to start X in VirtualBox's Gentoo guest VM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mayride
n00b
n00b


Joined: 21 Oct 2019
Posts: 8

PostPosted: Mon Oct 21, 2019 4:59 pm    Post subject: Unable to start X in VirtualBox's Gentoo guest VM Reply with quote

Hello,

I'm unable to startx on a fresh Gentoo guest in Virtualbox. I tried following the Gentoo VirtualBox wiki page https://wiki.gentoo.org/wiki/VirtualBox.
If I change the VIDEO_CARDS and add vesa, X is started well with the vesa driver.

The host is Windows 10 latest update.
Host version: 6.0.12 r 133076

Latest gentoo-sources kernel version:
Code:

woody@tux ~ $ uname -a
Linux tux 4.19.72-gentoo #8 SMP Mon Oct 21 12:41:41 BST 2019 x86_64 Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz GenuineIntel GNU/Linux


Kernel configuration:
http://dpaste.com/2HZF6H3

dmesg:
http://dpaste.com/1B1TX5W

Destktop profile is used:
Code:

woody@tux ~ $ uname -a
Linux tux 4.19.72-gentoo #8 SMP Mon Oct 21 12:41:41 BST 2019 x86_64 Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz GenuineIntel GNU/Linux
woody@tux ~ $ eselect profile list
Available profile symlink targets:
  [1]   default/linux/amd64/17.0 (stable)
  [2]   default/linux/amd64/17.0/selinux (stable)
  [3]   default/linux/amd64/17.0/hardened (stable)
  [4]   default/linux/amd64/17.0/hardened/selinux (stable)
  [5]   default/linux/amd64/17.0/desktop (stable)
  [6]   default/linux/amd64/17.0/desktop/gnome (stable)
  [7]   default/linux/amd64/17.0/desktop/gnome/systemd (stable)
  [8]   default/linux/amd64/17.0/desktop/plasma (stable)
  [9]   default/linux/amd64/17.0/desktop/plasma/systemd (stable)
  [10]  default/linux/amd64/17.0/developer (stable)
  [11]  default/linux/amd64/17.0/no-multilib (stable)
  [12]  default/linux/amd64/17.0/no-multilib/hardened (stable)
  [13]  default/linux/amd64/17.0/no-multilib/hardened/selinux (stable)
  [14]  default/linux/amd64/17.0/systemd (stable)
  [15]  default/linux/amd64/17.0/x32 (dev)
  [16]  default/linux/amd64/17.1 (stable)
  [17]  default/linux/amd64/17.1/selinux (stable)
  [18]  default/linux/amd64/17.1/hardened (stable)
  [19]  default/linux/amd64/17.1/hardened/selinux (stable)
  [20]  default/linux/amd64/17.1/desktop (stable) *
  [21]  default/linux/amd64/17.1/desktop/gnome (stable)
  [22]  default/linux/amd64/17.1/desktop/gnome/systemd (stable)
  [23]  default/linux/amd64/17.1/desktop/plasma (stable)
  [24]  default/linux/amd64/17.1/desktop/plasma/systemd (stable)
  [25]  default/linux/amd64/17.1/developer (stable)
  [26]  default/linux/amd64/17.1/no-multilib (stable)
  [27]  default/linux/amd64/17.1/no-multilib/hardened (stable)
  [28]  default/linux/amd64/17.1/no-multilib/hardened/selinux (stable)
  [29]  default/linux/amd64/17.1/systemd (stable)
  [30]  default/linux/amd64/17.0/musl (exp)
  [31]  default/linux/amd64/17.0/musl/hardened (exp)
  [32]  default/linux/amd64/17.0/musl/hardened/selinux (exp)
  [33]  default/linux/amd64/17.0/uclibc (exp)
  [34]  default/linux/amd64/17.0/uclibc/hardened (exp)


xorg-x11 set for opengl:
Code:

woody@tux ~ $ eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *


/etc/portage/make.conf file:
Code:

woody@tux ~ $ cat /etc/portage/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
USE="X -ldap -ipv6 -plasma -gtk -qt -gnome -kde -audio -alsa -pulseaudio bash-completion -bluetooth -vorbis -wavpack vim-syntax"
GRUB_PLATFORMS="pc"
# INPUT_DEVICES="virtualbox"
VIDEO_CARDS="virtualbox


Unmasked packages:
Code:

woody@tux ~ $ cat /etc/portage/package.accept_keywords
=app-emulation/virtualbox-guest-additions-6.0.12 ~amd64
woody@tux ~ $ cat /etc/portage/package.use/
all            zz-autounmask
woody@tux ~ $ cat /etc/portage/package.use/*
dev-lang/python sqlite
sys-boot/grub -sdl


Installed packages:
Code:

woody@tux ~ $ cat /var/lib/portage/world
app-admin/sudo
app-admin/syslog-ng
app-emulation/virtualbox-guest-additions
app-portage/gentoolkit
app-text/wgetpaste
net-misc/dhcpcd
net-misc/netifrc
sys-apps/pciutils
sys-boot/grub
sys-kernel/gentoo-sources
sys-libs/timezone-data
sys-process/anacron
x11-apps/xclock
x11-base/xorg-server
x11-misc/dmenu
x11-misc/i3lock
x11-misc/i3status
x11-terms/xterm
x11-wm/i3
x11-wm/twm


Installed useful packages use flags
Code:

woody@tux ~ $ emerge -pv virtualbox-guest-additions xorg-server xorg-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-base/xorg-drivers-1.20::gentoo  INPUT_DEVICES="keyboard libinput mouse -elographics -evdev -joystick -synaptics -vmmouse -void -wacom" VIDEO_CARDS="virtualbox -amdgpu -ast -dummy -fbdev (-freedreno) (-geode) -glint -i915 -i965 -intel -mga -nouveau -nv -nvidia (-omap) -qxl -r128 -radeon -radeonsi -siliconmotion (-tegra) (-vc4) -vesa -via -vmware" 0 KiB
[ebuild   R   ~] app-emulation/virtualbox-guest-additions-6.0.12::gentoo  USE="X" 0 KiB
[ebuild   R    ] x11-base/xorg-server-1.20.5:0/1.20.5::gentoo  USE="glamor suid udev xorg -debug -dmx -doc -elogind -ipv6 -kdrive (-libglvnd) -libressl -minimal (-selinux) -static-libs -systemd -unwind -wayland -xcsecurity -xephyr -xnest -xvfb" 0 KiB

Total: 3 packages (3 reinstalls), Size of downloads: 0 KiB

 * IMPORTANT: 7 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


Xorg.0.log output after typing startx as woody user:
http://dpaste.com/2BF7VNN

Now, if I copy the Xorg.conf file provided by virtualbox-guest-additions, it tries to load the right module, but still fails starting X. I'm missing something, but I can't find what.
http://dpaste.com/1Jg5RY2

And its associated Xorg.0.log output:
http://dpaste.com/1Jg5RY2

Any help?

Thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44477
Location: 56N 3W

PostPosted: Mon Oct 21, 2019 5:25 pm    Post subject: Reply with quote

mayride,

Code:
[    74.098] (EE) open /dev/dri/card0: No such file or directory


Your kernel is missing Direct Render Manager (DRM) support.
Video drivers that don't need DRM will still work.

However
Code:
CONFIG_DRM=y
says its there. Good.
You also need
Code:
CONFIG_DRM_VBOXVIDEO
which is missing.

Code:
The configuration item CONFIG_DRM_VBOXVIDEO:

    prompt: Virtual Box Graphics Card
    type: tristate
    depends on: CONFIG_DRM && CONFIG_X86 && CONFIG_PCI
    defined in drivers/staging/vboxvideo/Kconfig
    found in Linux kernels: 4.13–4.20, 5.0–5.1, 5.1+HEAD
    modules built: vboxvideo, vboxvideo

So its in the Staging menu for you and you have
Code:
# CONFIG_STAGING is not set


Fix your kernel.

When you reboot into the new kernel, check the time and date in
Code:
uname -a

Thats the time ad date of the running kernel.

Fixing you problem with a kernel rebuild, then not booting the new kernel is a common beginners mistake here.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mayride
n00b
n00b


Joined: 21 Oct 2019
Posts: 8

PostPosted: Tue Oct 22, 2019 2:08 pm    Post subject: Reply with quote

Thanks for your reply NeddySeagoon.

I've enabled 3 more features in the kernel http://dpaste.com/25W67DK and reemerged xorg-server, xorg-drivers and virtualbox-guest-additions.
Code:

Device Drivers
    General setup
        <*> Kernel .config support
        [*]   Enable access to .config through /proc/config.gz
    [*] Staging drivers  --->
        <M>   Virtual Box Graphics Card
    [*] Virtualization drivers  --->
        <M>   Virtual Box Guest integration support


I can confirm that I've rebooted on the freshly compiled kernel:
Code:

tux /usr/src/linux # uname -a
Linux tux 4.19.72-gentoo #14 SMP Tue Oct 22 14:30:29 BST 2019 x86_64 Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz GenuineIntel GNU/Linux
tux /usr/src/linux # zgrep -e VBOX -e DRM -e IKCONFIG /proc/config.gz
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_DRM=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DEBUG_SELFTEST is not set
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_DP_CEC is not set
CONFIG_DRM_TTM=y
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VKMS is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
CONFIG_DRM_VIRTIO_GPU=y
CONFIG_DRM_PANEL=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_HISI_HIBMC is not set
# CONFIG_DRM_TINYDRM is not set
# CONFIG_DRM_LEGACY is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
CONFIG_VBOXGUEST=m
CONFIG_DRM_VBOXVIDEO=m


But still experiencing the same issue http://dpaste.com/14QJQAQ.

It's pretty weird that vboxvideo isn't listed during Xorg autoconfigure:
Code:

[    27.700] (==) Matched vmware as autoconfigured driver 0
[    27.700] (==) Matched modesetting as autoconfigured driver 1
[    27.700] (==) Matched fbdev as autoconfigured driver 2
[    27.700] (==) Matched vesa as autoconfigured driver 3


Forcing Xorg to use the recommended xorg.conf file by virtualbox-guest-additions doesn't solve the issue neither http://dpaste.com/070CYN7

emerge --info output: http://dpaste.com/0D8A3FN
/var/log/dmesg: http://dpaste.com/3CJJKHP
lsmod:
Code:

tux /usr/src/linux # lsmod
Module                  Size  Used by
vboxsf                 81920  0
vboxguest             286720  2 vboxsf
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7332
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 22, 2019 2:31 pm    Post subject: Reply with quote

mayride,

I have to say I've never run Gentoo in VBox, no first hand experience.

First, vboxvideo is not Xorg driver, it is a kernel driver.
Second, you still miss the DRI device node.

Have you tried loading vboxvideo by hand and see if /dev/dri/card0 appears?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44477
Location: 56N 3W

PostPosted: Tue Oct 22, 2019 2:39 pm    Post subject: Reply with quote

mayride,

Code:
[   379.577] (II) VBoxVideo: guest driver for VirtualBox: vbox
[   379.577] (--) using VT number 7

[   379.581] (EE) No devices detected.

That says it can't find the emulated video card.

What does
Code:
lspci
say in the guest?

Code:
[    27.733] (EE) open /dev/dri/card0: No such file or directory

So your kernel is still not connect.

What does
Code:
uname -a
output?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mayride
n00b
n00b


Joined: 21 Oct 2019
Posts: 8

PostPosted: Tue Oct 22, 2019 3:31 pm    Post subject: Reply with quote

Manually loading vboxvideo doesn't solve the /dev/dri/card0 issue:
Code:

tux /usr/src/linux # lsmod
Module                  Size  Used by
vboxsf                 81920  0
vboxguest             286720  2 vboxsf
tux /usr/src/linux # ls /dev/dr*
ls: cannot access '/dev/dr*': No such file or directory
tux /usr/src/linux # modprobe vboxvideo
tux /usr/src/linux # ls /dev/dr*
ls: cannot access '/dev/dr*': No such file or directory
tux /usr/src/linux # lsmod
Module                  Size  Used by
vboxvideo              40960  0
vboxsf                 81920  0
vboxguest             286720  2 vboxsf


lspci output:
Code:

tux /usr/src/linux # lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: VMware SVGA II Adapter
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:04.0 System peripheral: InnoTek Systemberatung GmbH VirtualBox Guest Service
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0b.0 USB controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)


and uname -a:
Code:

tux /usr/src/linux # uname -a
Linux tux 4.19.72-gentoo #14 SMP Tue Oct 22 14:30:29 BST 2019 x86_64 Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz GenuineIntel GNU/Linux
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7332
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 22, 2019 3:40 pm    Post subject: Reply with quote

Code:
00:02.0 VGA compatible controller: VMware SVGA II Adapter

You have chosen VMware display emulation in your virtual machine setup.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mayride
n00b
n00b


Joined: 21 Oct 2019
Posts: 8

PostPosted: Tue Oct 22, 2019 3:59 pm    Post subject: Reply with quote

The default Graphic Controller setting became VMSVGA in VirtualBox 6.x.
Changing this to VBoxSVGA fixed my issue, thanks :)

I'm trying to get the virtualbox additions working (screen auto-resize, clipboard, ...) with VBoxSVGA, then go and experiment VMSVGA with the vmware drivers.
I guess that VMSVGA will require changing the /etc/portage/make.conf VIDEO_CARDS to vmware.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44477
Location: 56N 3W

PostPosted: Tue Oct 22, 2019 5:16 pm    Post subject: Reply with quote

mayride,

You can add vmware, so that you have both drivers installed if that helps but yes, you need the vmware Xorg driver.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mayride
n00b
n00b


Joined: 21 Oct 2019
Posts: 8

PostPosted: Tue Oct 22, 2019 11:39 pm    Post subject: Reply with quote

I'm confused; this is maybe not solved yet.
Still under VBoxSVGA Graphic Card adaptor, why does modesetting start if vboxdriver is found and loaded first? http://dpaste.com/352ZXF3
However, when I try to force vboxvideo to start using the recommended VirtualBox xorg.conf file, it fails http://dpaste.com/3VYWH1M
Code:

Section "Device"
   Identifier  "Device-vboxvideo"
   Driver      "vboxvideo"
EndSection
Section "Screen"
   Identifier  "Screen-vboxvideo"
   Device      "Device-vboxvideo"
EndSection

Section "ServerLayout"
   Identifier  "Default Layout"
   Screen      "Screen-vboxvideo"
EndSection


The screen is well resized, but no clipboard sharing between the guest and host.
Same behaviour confirmed in VirtualBox 5.2.32 with Gentoo as guest + host.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7332
Location: Saint Amant, Acadiana

PostPosted: Wed Oct 23, 2019 12:25 am    Post subject: Reply with quote

Code:
[   549.489] (II) vboxvideo: kernel driver found, not loading.


I may be wrong, but maybe vboxvideo Xorg driver does not like kernel KMS. It is complaining about kernel driver, but not telling which one. Generally all open source Xorg drivers require kernel KMS and nVidia proprietary driver does not work when kernel KMS is loaded. Not sure what vboxvideo wants.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
mayride
n00b
n00b


Joined: 21 Oct 2019
Posts: 8

PostPosted: Sun Nov 24, 2019 4:52 pm    Post subject: Reply with quote

Few updates:
- vboxusers group doesn't exist anymore, the virtualbox-guest-additions adds vboxguest (wiki updated)
- app-emulation/virtualbox-guest-additions doesn't create the .desktop file on i3 and other fancy wm, this should be done manually to start VBoxClient-all:
Code:

cat ~/.xinitrc
/usr/bin/VBoxClient-all
exec i3

Starting this will allow the clipboard sharing and other features.
- dbus must be started to allow IPC communications
Code:

rc-update add dbus default
rc-service dbus start


However, I still can't explain why the vboxvideo is ignored by startx (http://dpaste.com/21Y7KXD) and why using the advised xorg.conf config file prevents startx from running (http://dpaste.com/0XJJ346). The ebuild should maybe be updated to remove/fix the vboxvideo for Xorg part.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum