Solved Need help with X window system

Im new to computers , so I don't understand a lot of stuff but I did read the handbook extensively, and still not able to figure it out. I did a successful install of freebsd 14.1 and I do want to use it on my laptop with Kde plasma minimal installation. I did follow all the steps from the handbook but everytime I try to launch the sddm it shows, no session manager found.startx command shows fatal server error, cant run in framebuffer mode. When logged in as regular user and inputting the command "xrandr" it returns "Can't open display". My system info goes as 16g ram, 1T storage(using freebsd on entire disk), intel i7, 13th gen and intel iris Xe graphics. I would be highly grateful if a bit of detailed explanation of commands is provided.

Thankyou everyone in advance!

I did see the same issue with startx in a similar post but couldnt figure out the solution.
 

Attachments

  • 1000004285.jpg
    1000004285.jpg
    432.2 KB · Views: 510
  • 1000004284.jpg
    1000004284.jpg
    488.5 KB · Views: 372
Last edited:
Hello & Welcome to this FreeBSD community!

Im new to computers , so I don't understand a lot of stuff but I did read the handbook extensively
That's a great approach! None of us here were born with the knowledge. Reading documentation is a great way of gathering knowledge - keep it up! :)

everytime I try to launch the sddm it shows, no session manager found.startx command shows fatal server error, cant run in framebuffer mode. When logged in as regular user and inputting the command "xrandr" it returns "Can't open display".
Before you start messing with sddm, I'd recommend that you make sure that your X setup is actually working. Until you know that X itself is running properly, there's no merit in adding additional feature such as a login/display manager.
What I mean to say is: Make sure that startx is working as intended before dealing with sddm.

Did you install the driver for your GPU?
If your display is connected to the integrated Iris Xe GPU, you'd want to install graphics/drm-kmod and loading the driver by running kldload i915kms manually or by adding it to the kld_list in your /etc/rc.conf.
See section 5.3.1 of the handbook: https://docs.freebsd.org/en/books/handbook/book/#x-configuration-intel
 
Hello & Welcome to this FreeBSD community!


That's a great approach! None of us here were born with the knowledge. Reading documentation is a great way of gathering knowledge - keep it up! :)


Before you start messing with sddm, I'd recommend that you make sure that your X setup is actually working. Until you know that X itself is running properly, there's no merit in adding additional feature such as a login/display manager.
What I mean to say is: Make sure that startx is working as intended before dealing with sddm.

Did you install the driver for your GPU?
If your display is connected to the integrated Iris Xe GPU, you'd want to install graphics/drm-kmod and loading the driver by running kldload i915kms manually or by adding it to the kld_list in your /etc/rc.conf.
See section 5.3.1 of the handbook: https://docs.freebsd.org/en/books/handbook/book/#x-configuration-intel
Yes I did follow the step above
pkg install drm-kmod
sysrc kld_list+=i915kms
 
But the issue still persists, I did try to setup wayland , but couldnt understand the handbook's course.
 
I did a successful install of freebsd 14.1
pkg install drm-kmod
For the time being you need to install drm-kmod from ports. The i915kms.ko kernel module must match the running kernel 14.1. The current 14 branch packages have been built against version 14.0 .

The 14.0 branch is end-of-life now since September 30 and the latest package repository update was on September 29. The packages for 14.1 will be available shortly (in a few days or a week at most). Until then all 3rd party kernel modules must be installed from ports. Building kernel modules from ports requires the FreeBSD source code installed.
 
Since you're new to all of this, I'd like to elaborate on T-Daemon 's post: The GPU driver is a kernel module. As such, it needs to match the kernel's ABI. If you install it from the official binary package repository (by just running pkg install drm-kmod), you'll install a version that right now has a different ABI than your kernel. This means that the kernel module (GPU driver) won't work.

Instead, you have to build it from source. For this, just clone the ports tree (git repository) to /usr/ports, navigate to the graphics/drm-kmod directory and run make install.

Note that it's generally discouraged mixing ports you compiled yourself with packages you got from the binary repository. Kernel modules are somewhat of an exception in this case.

After you compiled & installed the kernel, load the module with kldload i915kms and see whether it's working.
If it doesn't work, check the Xorg log file for more information.
 
The GPU driver is a kernel module. As such, it needs to match the kernel's ABI. If you install it from the official binary package repository (by just running pkg install drm-kmod), you'll install a version that right now has a different ABI than your kernel. This means that the kernel module (GPU driver) won't work.
It makes sense...
It's happen with emulators/virtualbox-ose and emulators/virtualbox-ose-kmod after system upgrade.

But...
I have

$ freebsd-version
14.1-RELEASE-p3


# kldstat
19 1 0xffffffff82a1c000 e6df0 nvidia-modeset.ko
20 1 0xffffffff82c00000 db7e50 nvidia.ko
24 2 0xffffffff82b41000 7c050 drm.ko
23 1 0xffffffff839b8000 1b3920 i915kms.ko


I always try to use packages for software/module/drivers installation, and in the case of i915kms I used package.
And I upgraded to FreeBSD-14.1 a months ago.

P.S.
After an "early" upgrade I always rebuild from ports emulators/virtualbox-ose-kmod but I never had problems with video modules...
 
So I proceded like this
pkg remove drm-kmod
cd /usr/ports/graphics/drm-kmod
After it got compiled
sysrc kld_list+=i915kms
Then upon giving the command
kldload i915kms
It returns: cant load i915kms: module already loaded or in kernel
Still no help with startx it shows the same error
 
How to I remove all the packages that I have installed, so that I may begin with compiling with ports , rather than reinstalling Freebsd14.1 again?
 
pkg remove drm-kmod
Run pkg autoremove after this. The drm-kmod is a so-called meta-port, it doesn't contain anything of itself, it just depends on a bunch of other ports/packages. And it's those that really need to be recompiled.

Then upon giving the command
kldload i915kms
It was probably already loaded. Deleting the package/port doesn't automagically unload the module.

How to I remove all the packages that I have installed, so that I may begin with compiling with ports , rather than reinstalling Freebsd14.1 again?
pkg delete -a, this will remove everything except pkg(8) itself. But you don't need to do this.

Code:
     -a, --all  Deletes all installed packages except for pkg(8) from the
                system and cleans the database of information related to
                removed packages.
pkg-delete(8)
 
Still notging seems to work
I tried pkg delete -a
Then I did use the ports collection to install xorg and for drm-kmod.
Still the results are the same and when trying to access the log file as root user it displays permission denied.
 
It returns: cant load i915kms: module already loaded or in kernel
You need to unload the old module before you load the new one. Either do that via kldunload(8) or just reboot the machine without the module in your auto-load list.

Still the results are the same and when trying to access the log file as root user it displays permission denied.
How are you trying to do that?
Something like cat /var/log/Xorg.0.log should work - also as a non-root user. Tools like less(1) and tail(1) are great to read log files in a shell.
 
Initially when on inputting kldunload i915kms there was a complete blank screen, out of fear I forced shutdown the system as the screen went blank and the backlight still on. Upon system start I logged in as root and reinstalled drm-kmod from ports , and ran startx. Then pkg install plasma5-plasma. Further pkg install sddm. Launched it and followed the handbook. Further I wasnt able to log in , so installed xinit from ports . sddm screen by default is set to wayland , did choose x11 and logged in. The mission was a success and Im really thankful to everyone in the community for helping me out .
Thankyou once again !
 
Though deviating from the topic, I would like to ask is there any advantage of compiling software every time and in long term does it have any toll on the system performance or it drastically improves?
 
I would like to understand more about shell, so I would really like to know of any resources from where I could learn abt it, and further if any book is recommended abt it.
Thankyou
 
Glad to hear that you got it working!

Please mark this thread/topic as solved and open a new one for your new question(s) - keeps it easier for lost souls to find help in the future :)
 
I would like to understand more about shell, so I would really like to know of any resources from where I could learn abt it, and further if any book is recommended abt it.
Thankyou
It would depend on for what you want to learn.
For scripting, /bin/sh should be chosen for maximum compatibility (POSIX compiant).
For command line shell (login shell), it depends on what functionalities you want to have. Each shells (/bin/csh or anything in ports/pkgs) has pros and cons. If you just want directory stack (pushd/popd) which /bin/sh doesn't have, /bin/csh (actually tcsh) would be good start point.
 
Back
Top