Solved Strange DE Behaviour

Hi everyone! After some years as a Mac user nostalgia hit me! I started installing FreeBSD on an old machine! Just for fun and learning :D .Happy to be here again! Old members maybe remember me as sk8harddiefast user!

So as the title say, I get a strange behaviour from my DE I guess. Sometimes xfce4 desktop works fine with startx. Another times, I get black screen with a stuck mouse. Killing xfce4-session from logout button or with Ctrl-alt-bckspc or restarting the computer also gives me black screen. Doesn't want to return to vt. Using xfce4 suddenly can freeze. I can't understand why freezes or don't want to return to console mode even after restart. Also polkit works because shutdown, the system really powers off (With the same behaviour). I can't really understand where the problem is! Here is all the informations waiting for your answers :D

xorg.conf
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 535.146.02

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "Xinerama" "0"
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"
    FontPath        "/usr/local/share/fonts/roboto-fonts-ttf/"
    FontPath        "/usr/local/share/fonts/TerminusTTF/"
EndSection

Section "Module"
    Load           "glx"
    Load           "glxserver_nvidia"
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     "Unknown"
    ModelName      "Idek Iiyama PL3288UH"
    HorizSync       15.0 - 136.0
    VertRefresh     23.0 - 76.0
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 2060"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

my loader.conf
Code:
kern.vty=vt
hw.vga.textmode=1
hw.nvidiadrm.modeset=1
kern.vt.fb.default_mode="1024x768"
kern.vt.fb.modes.VGA-1="1024x768"

my rc.conf
Code:
dbus_enable="YES"
linux_enable="YES"
kld_list="nvidia-drm nvidia-modeset nvidia"

my .xinitrc
Code:
exec /usr/local/bin/startxfce4 --with-ck-launch
 
Old members maybe remember me as sk8harddiefast user!
Welcome back to the forums! :D Yeah, even if I'm not exactly an old time forum member (still 8 years have passed! How time flies!), I remember you and remember reading yours and other old members posts even before becoming an effective FreeBSD user (and forum member) to inform myself and learn about it. :)

Now, back to your problem, do you have a ~/.xsession-errors file? Maybe there's something logged in it that can give a hint.
 
Also I forgot to mention that this behaviour still insist on others DE like Lumina. So probably is not related to xfce4
 
Just wondering: are you sure the generated xorg.conf is really needed? Nowadays, usually, the autoconfiguration done by X is preferred.
 
Just wondering: are you sure the generated xorg.conf is really needed? Nowadays, usually, the autoconfiguration done by X is preferred.
Tried to make things as simple as it gets, I only kept on my loader.conf
Code:
kern.vty=vt
hw.nvidiadrm.modeset=1

On rc.conf file only kept
Code:
kld_list="nvidia-drm fusefs"
linux_enable="YES"

And completely removed Xorg.conf file.

The resolution works right but still no console after logout. Also on boot, screen goes black after the drm module is loaded
 
kern.vty=vt is the default, you don't need to set it. hw.nvidiadrm.modeset is only useful if you're using graphics/nvidia-drm-kmod, it's not needed for x11/nvidia-driver.

Also on boot, screen goes black after the drm module is loaded
Try without nvidia-drm, kld_list="nvidia-modeset fusefs", you'll need to add a /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf:
Code:
Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    #BusID          "PCI:1:0:0"
EndSection

The BusID would really only be needed if you have more than one graphics card.
 
I tried both with nvidia-drm and Nvidia-driver. Still confused which is the difference between them but we are here to learn :D Also this motherboard has really confused bios. I start thinking if any bios option creates the problem.
On nvidia-drm I get black screen on boot. On Nvidia-driver the problem starts after X. If reboot or logout from xfce4 I get black screen, even after reboot. If I reboot from console, everything works as it should.
Update. Tried Fluxbox. Exiting Fluxbox return to console! If I stay on Fluxbox for some time and exit, still get blank screen!

Try without nvidia-drm, kld_list="nvidia-modeset fusefs", you'll need to add a /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf:

Section "Device"
Identifier "Card0"
Driver "nvidia"
#BusID "PCI:1:0:0"
EndSection

With this trick I can get proper resolution without need of Xorg.conf file! The problem still insist 😭
 
Hi everyone! After some years as a Mac user nostalgia hit me! I started installing FreeBSD on an old machine! Just for fun and learning :D .Happy to be here again! Old members maybe remember me as sk8harddiefast user!

So as the title say, I get a strange behaviour from my DE I guess. Sometimes xfce4 desktop works fine with startx. Another times, I get black screen with a stuck mouse. Killing xfce4-session from logout button or with Ctrl-alt-bckspc or restarting the computer also gives me black screen. Doesn't want to return to vt. Using xfce4 suddenly can freeze. I can't understand why freezes or don't want to return to console mode even after restart. Also polkit works because shutdown, the system really powers off (With the same behaviour). I can't really understand where the problem is! Here is all the informations waiting for your answers :D

xorg.conf
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 535.146.02

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option         "Xinerama" "0"
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"
    FontPath        "/usr/local/share/fonts/roboto-fonts-ttf/"
    FontPath        "/usr/local/share/fonts/TerminusTTF/"
EndSection

Section "Module"
    Load           "glx"
    Load           "glxserver_nvidia"
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     "Unknown"
    ModelName      "Idek Iiyama PL3288UH"
    HorizSync       15.0 - 136.0
    VertRefresh     23.0 - 76.0
EndSection

Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce RTX 2060"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-4"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

my loader.conf
Code:
kern.vty=vt
hw.vga.textmode=1
hw.nvidiadrm.modeset=1
kern.vt.fb.default_mode="1024x768"
kern.vt.fb.modes.VGA-1="1024x768"

my rc.conf
Code:
dbus_enable="YES"
linux_enable="YES"
kld_list="nvidia-drm nvidia-modeset nvidia"

my .xinitrc
Code:
exec /usr/local/bin/startxfce4 --with-ck-launch
1- Delete your modification in the xorg.conf and use the auto-generated one.
2- Follow the Handbook and use this in your .xinitrc:
1721228015787.png

3- If this didn't work, check if your nvidia gpu works with FBSD, I heard that some 1030 and 1070 don't work (mine 1070 is one of them).
 
1- Delete your modification in the xorg.conf and use the auto-generated one.
2- Follow the Handbook and use this in your .xinitrc:
View attachment 19568
3- If this didn't work, check if your nvidia gpu works with FBSD, I heard that some 1030 and 1070 don't work (mine 1070 is one of them).
SirDice post helped me to have proper resolution without Xorg.conf file

pciconf -lv | grep -B4 VGA
vgapci0@pci0:1:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x1f08 subvendor=0x1043 subdevice=0x8698
vendor = 'NVIDIA Corporation'
device = 'TU106 [GeForce RTX 2060 Rev. A]'
class = display
subclass = VGA
I have Nvidia RTX 2060. Is supported with the latest Nvidia-driver. Also the problem is not only on Xfce4 but in any DE/WM. Coming back to console from restart, logout immediately or after some time all result to blank screen.
 
Do you need linux_enable="YES" in rc.conf? I don't have that line. Tested xfce4 on nvidia with xorg.conf, it runs well with all functions.
 
After new clean install (I made it with EFI this time :) ) keeping the nvidia-modeset and minimum config worked as it should be! I really never understood what cause the problem but is solved!
 
Back
Top