# Startx Fails



## clueless.dude (Oct 30, 2018)

Hello there,
I've been installed, used Gnome on my laptop, recently I changed my HDD, and tried to install FreeBSD 11.2-STABLE. I followed FreeBSD handbook's help as I did before, but result didn't come out same. I can assure no hardware changed in my laptop except new HDD. After installing Xorg, running startx giving Fatal server error, Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
`pciconf -lv | grep -B3 display` shows I have dual VGA PCI devices as 

```
vgpci0@pci0:0:2:0 ( device Skylake GT2 ( HD Graphics 520)
vgpci0@pci0:1:0:0 ( device Topaz XT Radeon R7 .........)
```
I tried, search for help, tried so many solutions from forum, but couldn't get working display. If you need more information about my hardware I can share it. 
Thanks


----------



## Maccraft123 (Oct 30, 2018)

Install xorg-drivers


----------



## clueless.dude (Oct 30, 2018)

I've been installed them already along with Xorg


----------



## VladiBG (Oct 30, 2018)

IS your video driver loaded?

https://wiki.freebsd.org/Graphics


----------



## mentalbarcode (Oct 31, 2018)

Have you tried specifying which graphics card X.org should use?  I use the following on my ThinkPad P50:

/usr/local/etc/X11/xorg.conf.d/20-videocard.conf

```
Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection
```


----------



## clueless.dude (Oct 31, 2018)

Yes, VladiBG, I can see i915kms.ko is loaded on startup, I rechecked it after login by kldstat(8) it's loaded.
Yes, mentalbarcode, I checked by using configuration it's not working


----------



## VladiBG (Oct 31, 2018)

Do you have drm-next-kmod installed?


----------



## clueless.dude (Oct 31, 2018)

Yes, it's the first thing I did, after installing BSD. But now I see something very strange, my /etc/rc.conf file has no settings in it, it's just blank file


----------



## VladiBG (Oct 31, 2018)

Fix your /etc/rc.conf and enable the drm-next-kmod in it. After that you can try to start Xorg to see if it's recognizing your devices without need of xorg.conf file.

edit:
btw how did you edit your rc.conf file? Did you use `sysrc`?


----------



## clueless.dude (Oct 31, 2018)

Ok, I edited my /etc/rc.conf now I have a working ethernet. I used live USB, mounted my UFS partiton, edited  /etc/rc.conf, unmounted it, rebooted, checked loaded modules, i915kms.ko is loaded. When I use `gdm_enable="YES"` and `gnome_enable="YES` my system hangs before I login. So I disabled it for a while as I'm focusing on getting `startx` work.


----------



## clueless.dude (Oct 31, 2018)

Actually, I'm not sure what did you mean by if I use sysrc(1) to edit /etc/rc.conf


----------



## VladiBG (Oct 31, 2018)

the safe way to change your /etc/rc.conf is to use sysrc(8) command.

For example if you want to add kld_list="/boot/modules/i915kms.ko" into your rc.conf the command will be:

`sysrc kld_list="/boot/modules/i915kms.ko"`


----------



## SirDice (Oct 31, 2018)

clueless.dude said:


> I'm not sure what did you mean by if I use sysrc(1) to edit /etc/rc.conf


It doesn't matter _how_ you edit rc.conf, you can use vi(1), emacs(1), vim(1), joe(1), ee(1) to name a few editors.  sysrc(8) is just a convenient tool to manage rc.conf.


----------



## VladiBG (Oct 31, 2018)

Exactly sysrc(8) will give you some layer of protection against type errors during the editing. For example many tutorials are using the following method to add something to /etc/rc.conf

`echo 'sshd_enable="YES"' >> /etc/rc.conf`

It will work but if you miss type it as this:

`echo 'sshd_enable="YES"' > /etc/rc.conf` <-- Don't use this

Then you are in big trouble as the file will get override and will contain only the single line.
Another example that i had over the years was when i used midnight commander mc(1) to edit my rc.conf file and the ssh session that i was using got disconnected which lead to empty rc.conf file. That's why you need to develop good habits of using the right tools for the job.


----------



## clueless.dude (Oct 31, 2018)

Thanks , for clarification SirDice , VladiBG , I guess it needs more research to get it working as my problem is not resolved yet.


----------



## SirDice (Oct 31, 2018)

Install misc/pastebinit and post your /var/log/Xorg.0.log:
`cat /var/log/Xorg.0.log | pastebinit`

Then post the resulting URL here, that way we can have a look at your logs.


----------



## clueless.dude (Nov 3, 2018)

I resolved it , startx is working with i915kms.ko normally, 
Thanks


----------



## trev (Nov 17, 2018)

How did you resolve it? It might help others if you tell us.


----------



## clueless.dude (Nov 18, 2018)

Key to my success was
`pkg remove xorg`
`cd /usr/ports/x11/xorg`
`make install clean`
I'm not sure why it didn't work using package, it's beyond my knowledge. I like BSD because of it's simplicity no matter i'm not programmer or IT man, when it comes to configure an OS i always found it more easy . I wanted to have it on my laptop installed along with windows mac linux and boot it with clover. which i successfully achieved along with gnome just because , ( so it doesn't look alike it's a black & white OS )


----------



## clueless.dude (Nov 19, 2018)

Hello Again , I couldn't get wifi working on FreeBSD 11.2-STABLE, i messed up alot with configuration files and without any caution edited GENERIC kernel as well ( which was most stupid thing i made before making a backup , which was a good lesson to learn ). Anyway i decided to try FreeBSD 11.2 RELEASE-p4 . I was expecting atleast wifi , display would work just out of box , which didn't happened for sure , I got display working ,( after installing drm-next-kmod,) fortunately wireless networking also functioning on startup( Just adding it into rc.conf file ), with a price tag , Now  whether i change rc.conf file as it was before getting wifi working or not .Gnome is using now LLVMpipe , instead of intel , Sound is not working , before making any further mistakes I would like to ask for help , how can i get intel graphic support in gnome , enable sound as well . I would like to mention here sound was working out of box in FreeBSD 11.2-STABLE.


----------



## Vull (Nov 19, 2018)

You might want to check to see if your wifi hardware is supported by FreeBSD; mine is not, and, after spending way too much time on it, I've pretty much given up the pursuit of FreeBSD support for the low-price Realtek rtl8723 onboard PCI bluetooth/wireless device on my laptop. I also have an old Netgear/Broadcom WNDA3100 v2 USB wifi dongle which I've been unable to use, although the Netgear WNDA3100 is said to be supported. These are far from being top-of-the-line devices anyway (to put it kindly), and no telling when, if ever, they will be supported. I lack the time, willingness, and experience to write my own device drivers in any case. It's just a cut-rate laptop. At some point I may buy a supported USB wifi dongle, as many have recommended, but the wisest option would have likely been to get a FreeBSD supported laptop in the first place, as others have suggested. Thankfully I have another machine with a wired connection to use for FreeBSD. (-8

3. Supported Devices: http://www.si.freebsd.org/relnotes/CURRENT/hardware/support.html

BTW if your wireless device is like mine it may have audio, wifi, and bluetooth all bundled up together in the same little bitty device. What's the manufacturer's model number for your wifi device?


----------



## clueless.dude (Nov 19, 2018)

Vull , thanks for your support, Maybe it's me who didn't ask well or probably you didn't read what problem i,m facing right now. I have working Wifi hardware, display, what i,m facing now is gnome is using software rendering instead of GPU , no sound at all ,which was functional in Stable version, Thanks


----------



## VladiBG (Nov 19, 2018)

check which video driver are you using in Xorg and is your user a member of the video group.

_/var/log/Xorg.0.log_
`pw group show video`

https://www.freebsd.org/doc/handbook/x-config.html


----------



## clueless.dude (Nov 23, 2018)

Something is really strange here if i use gdm as startup and i see in gnome settings it shows me in settings, Detail ,About  , i,m using llvmpipe , but when i run `screenfetch` , it shows i,m my Intel graphics as GPU .  The thing is if i use kdm instead of gdm I see Intel Graphics as GPU in gnome settings as well when i run `screenfetch`. So i began to thinking it has nothing to do with my graphics drivers or xorg , it's just gdm , which might need some configurations.
Look its screenshot when i,m using gdm


----------

