Solved freeBSD 13 (virtual machine): X won't start

hi,
1. I installed the FreeBSD 13 distribution from scratch in a virtual machine on Parallels 17 for Mac (macOS 13, Monterey). The installation apparently went well, but Gnome won't start. I followed this guide.
There seems to be problems with GDM and the error "Cannot run in framebuffer mode. Please, specify busIDs.", but GDM is running.

I put the necessary information in /etc/rc.conf and /etc/fstab...
The rest of the system works well (in text mode).

2. Instead, if I upgrade another VM of mine from a FreeBSD 12 installation (i386, 32 bit) to 13 the update works, Gnome also works but when you click on "Settings" and then choose "Users" you can no longer use Settings again: gnome-control-center no longer opens.

For the problem #1:
with gnome-session I get many warnings and "could not connect to 127.0.0.1" and "cannot open display". SSH works well (I can connect to the BSD machine from Mac Terminal: ssh -Y myname@10.211.55.28, the IP of the BSD machine), so the refused connection is from X server...
I tried export DISPLAY=:0 but no luck, and after the restart there is no Display option in the "set" list...
start doesn't work, about same errors concerning X server...
The VM 64bit AMD configuration in Parallels is the same as in the 32bit i386, so no different hardware is emulated...

For the problem #2:
As there (32bit i386 VM) Gnome is working apart of the Control Center: is there anything to do to report the normal behaviour and could use the Users an other settings from Gnome?

Any help, hints?
Thanks in advance

Salvo
 
Interesting:

open /dev/dri/card0: No such file or directory

Does the topic below help?

 
Interesting:

open /dev/dri/card0: No such file or directory

Does the topic below help?

Thanks, but unfortunately it doesn't work.
I tried to run sysrc "/boot/modules/i915kms.ko", then restart, but startx does not work the same, after. After all, in the other installation (upgrade 12->13, i386) Gnome works without any Xorg configuration and without that driver...
I wouldn't like to think that the difference be the different architecture of virtual machines: here AMD and there i386...
I compared the two installations and they *look* the same, but surely something changes. What? :)
 
Looking at the original question, I don't think the i915kms driver is useful for a VM in any case. That's for actual hardware, not virtualized. You might be able to use the x11-drivers/xf86-video-scfb driver. But I'm not sure, I don't have a Mac and therefor don't have Parallels either.
 
Looking at the original question, I don't think the i915kms driver is useful for a VM in any case. That's for actual hardware, not virtualized. You might be able to use the x11-drivers/xf86-video-scfb driver. But I'm not sure, I don't have a Mac and therefor don't have Parallels either.
I agree with you. However, drivers/xf86-video-scfb are already installed.

Thank you.
 
Has OP tried x11-drivers/xf86-video-vesa/ ? Generic display driver for Xorg, should work in a VM. But - VM's usually have their own emulated graphics hardware. Sometimes they can pass a real GPU through, and make it usable in the guest, as well. Check the docs. :)
 
Has OP tried x11-drivers/xf86-video-vesa/ ? Generic display driver for Xorg, should work in a VM. But - VM's usually have their own emulated graphics hardware. Sometimes they can pass a real GPU through, and make it usable in the guest, as well. Check the docs. :)
thanks, yes, xf86-video-vesa are installed also. In the "upgraded" other VM, however, Gnome or XFCE work without VESA...
Here I cannot use xauth: xauth > generate :0 returns `unable to open display ":0"`, the major problem is that the user (me) isn't authorised to open display...
 
How do you start Xorg? Normall, you just install x11-servers/xorg, a display manager like GDM or SDDM, and the graphics driver. After install, you just turn on that display manager and graphics driver in /etc/rc.conf. THEN reboot. That should work for both bare metal and VM's.

your guide that you linked to in Post #1 - it mentions hald_enable in /etc/rc.conf. Per Handbook (the most recent, up-to-date version), that's not necessary. But - both Handbook and your guide mention the /etc/fstab line with proc - that is important to do before rebooting.
 
How do you start Xorg? Normall, you just install x11-servers/xorg, a display manager like GDM or SDDM, and the graphics driver. After install, you just turn on that display manager and graphics driver in /etc/rc.conf. THEN reboot. That should work for both bare metal and VM's.

your guide that you linked to in Post #1 - it mentions hald_enable in /etc/rc.conf. Per Handbook (the most recent, up-to-date version), that's not necessary. But - both Handbook and your guide mention the /etc/fstab line with proc - that is important to do before rebooting.
Yes, well, in fact I think I've done all these things step by step. As, on the other hand, I did in the other installation (with fBSD 12 updated to 13). I activated proc in /etc/fstab, put GDM and the other items in /etc/rc.conf and then restarted. And so everything should work without mods.
Every graphic test I attempt, I get "could not connect to 127.0.0.1" or "can't open display", as if the username is not enabled to do so. No graphic login also.
If I connect via SSH from the Mac, within and if for example I try xclock I always get "can't open display" (also if in the configuration of SSH and SSHd I set X Forwanding...)
 
Every graphic test I attempt, I get "could not connect to 127.0.0.1" or "can't open display", as if the username is not enabled to do so. No graphic login also.
There's gotta be something. Can you copy-paste your terminal's output and share here? The error is probably a bit further up than just the last line you can remember.
 
There's gotta be something. Can you copy-paste your terminal's output and share here? The error is probably a bit further up than just the last line you can remember.
ok, well, I attach some pieces here...

Code:
salvo@freeBSD:~ $ xterm

xterm: Xt error: Can't open display: :0

On the Mac Terminal:
Code:
salvo@freeBSD:~ $ startx
xauth:  file /home/salvo/.serverauth.1686 does not exist
/usr/local/bin/X: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

the output is different in FreeBSD terminal:

Code:
Current Operating System: FreeBSD freeBSD 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-D4 #0 :
Tue Aug 24 07:33:27 UTC 2021
root@amd64-builder.daemonology.net:/usr/obj/usr/srcl
/amd64, amd64/sys/GENERICamd64
Build Date: 19 October 2021
02:05:52AM
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,
(Wh) warning, (EE) error, (NI) not implemented, (??) unknown
(==) Log file:
"/var/log/Xorg.0.log"
, Time: Mon Nov 8 19:47:08 2021
(==) Using system config directory
"/usr/local/share/X11/xorg.conf.d"
scfb trace: probe start
scfb trace: probe done
((EE)
Fatal server error:
(EE) Cannot run in framebuffer mode. Please specify busIDs
for all framebuffer
devices
m (EE)
: (EE)
*Please consult the The X.0rg Foundation support
athttp://wiki.x.org
for help
(EE) Please also creck the log file at
"/var/log/Xorg.0.log"
for additional informati
on
?(EE)
(E) Server terminated with error (1). Closing log file.
uxinit: giving up
axinit: unable to connect to X server: Connection refused
xinit server error
 
This almost sounds like there's already an X session running. What does ps -ax | grep Xorg show?
nothing: salvo@freeBSD:~ $ ps -ax | grep Xorg 1148 0 S+ 0:00,00 grep Xorg
also me think like there's another X session running: but where?
 
Can you provide a more recent /var/log/Xorg.0.log? cat /var/log/Xorg.0.log | nc termbin.com 9999
 
That's a one in a million URLs you ended up with :D

Anyway, it doesn't seem to detect a graphics card at all. What does pciconf -lv | grep -A4 vga output?
here it is
salvo@freeBSD:~ $ pciconf -lv | grep -A4 vga vgapci0@pci0:1:0:0: class=0x030000 rev=0x00 hdr=0x00 vendor=0x1ab8 device=0x4005 subvendor=0x1ab8 subdevice=0x0400 vendor = 'Parallels, Inc.' device = 'Accelerated Virtual Video Adapter' class = display subclass = VGA

Parallels is obviously the driver simulated by Parallels system for the virtual machine.
 
the Parallels video card configuration...
 

Attachments

  • Schermata 2021-11-08 alle 22.09.25.jpg
    Schermata 2021-11-08 alle 22.09.25.jpg
    140.8 KB · Views: 169
You can if you have X forwarding enabled.
...and if X is running :)

::
part of SSH server configuration
Code:
# Host *
#   ForwardAgent no
ForwardX11 yes
PasswordAuthentication yes

and that of SSHd
Code:
#AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
#PermitTTY yes
 
Back
Top