# Installing Xorg on lenovo Thinkpad t480



## happy-yoga (Jan 16, 2021)

I followed the manual for setting up xorg on a new install of FreeBSD 12.2. I used the pkg install method.  I then tried the command StartX but get a server error (1). It stays cannot run in framebuffer mode. Please specify busIDs.

I tried finding the xorg.conf file but it doesn't seem to exist. How do I troubleshoot this? I am new to FreeBSD. My goal is to install Gnome3.

Thanks


----------



## Alexander88207 (Jan 16, 2021)

Hello,

have you installed your graphics drivers yet?

To install gpu drivers you need to install them from ports because you are using 12.2:

`cd /usr/ports/graphics/drm-kmod
make install clean`

(I assume that you have Intel Graphics) After installation put `kld_list="/boot/modules/i915kms.ko"` in `/etc/rc.conf` and make sure that your $USER is in the video group.

See: https://wiki.freebsd.org/Graphics#Intel_Integrated_Graphics_.28aka_HD_Graphics.29


----------



## happy-yoga (Jan 16, 2021)

Would I


Alexander88207 said:


> Hello,
> 
> have you installed your graphics drivers yet?
> 
> ...


Should I use the portsnap method to install with ports? I haven't installed the ports tree yet. Would it be a problem to use the ports and also use packages for installing other things?


----------



## Alexander88207 (Jan 16, 2021)

happy-yoga said:


> Would I
> 
> Should I use the portsnap method to install with ports? I haven't installed the ports tree yet. Would it be a problem to use the ports and also use packages for installing other things?



If you only install the gpu driver its fine.

You can use portsnap or `svnlite checkout https://svn.FreeBSD.org/ports/head /usr/ports`


----------



## Beastie7 (Jan 16, 2021)

As per our wonderful documentation, you can use portmaster to install drivers from the tree. You can use this site as a reference when traversing through the tree using the command line. It's just a matter of finding the port location, then pointing portmaster to it.


----------



## happy-yoga (Jan 17, 2021)

I dont' know what is wrong, but I think I installed drm-kmod and I put  kld_list="/boot/modules/i915kms.ko" in  /etc/rc.conf and make sure that your $USER is in the video group.

I installed Xorg using the ports. But when I type startx it says server terminated with error(1). Unable to connect to X server. Connection refused. Server error. 

then I tried installing Xorg as a package. But it still doesn't work. Should I setup my system from scratch and start over? How can I figure out what is wrong and how to fix it?


----------



## Minbari (Jan 17, 2021)

happy-yoga said:


> I installed Xorg using the ports. But when I type startx it says server terminated with error(1). Unable to connect to X server. Connection refused. Server error.
> 
> then I tried installing Xorg as a package. But it still doesn't work.


First of all *don't mix ports with packages*, unless you know what your doing, which is not your case right now, so stay with the packages. 
Second, if you are forced to use some ports to build your package don't mix QUARTERLY packages with HEAD ports, use quarterly ports.
Third: since is a bug in graphics/drm-fbsd12.0-kmod the user is forced to build/install this module from ports. Also to build this module kernel sources are required in /usr/src.

```
# cd /usr/ports/
# rm -r {*,.*}
# pkg install subversion
# svn checkout https://svn.FreeBSD.org/ports/branches/2021Q1/ /usr/ports
# svn checkout https://svn.freebsd.org/base/releng/12.2 /usr/src
# cd /usr/ports/graphics/drm-fbsd12.0-kmod
# make package
# cd /work/pkg
# pkg add drm-fbsd12.0-kmod-4.16.g20201016.txz
# cd ../.. && make clean
```


----------



## happy-yoga (Jan 17, 2021)

Thanks,  I was almost ready to give up.
But I have a problem. When I typed this command it said I can't remove the ,.-  --   rm -r {*,.*}
So I skipped this step. Will this be a problem?




Minbari said:


> First of all *don't mix ports with packages*, unless you know what your doing, which is not your case right now, so stay with the packages.
> Second, if you are forced to use some ports to build your package don't mix QUARTERLY packages with HEAD ports, use quarterly ports.
> Third: since is a bug in graphics/drm-fbsd12.0-kmod the user is forced to build/install this module from ports. Also to build this module kernel sources are required in /usr/src.
> 
> ...


----------



## Minbari (Jan 17, 2021)

happy-yoga said:


> Thanks,  I was almost ready to give up.
> But I have a problem. When I typed this command it said I can't remove the ,.-  --   rm -r {*,.*}
> So I skipped this step. Will this be a problem?


To be precisely it says: 





> rm: "." and ".." may not be removed


, but if you issue `ls`command in /usr/ports you'll see that that folder is empty. Just follow those instructions and the kernel module should be build without problems.


----------



## happy-yoga (Jan 17, 2021)

After finishing the steps above, do I then do this?......

After installation put  kld_list="/boot/modules/i915kms.ko" in  /etc/rc.conf and make sure that your $USER is in the video group.

Also, when I try cd /work/pkg it says No such file or directory. Should I use mkdir to make this directory? If so, do I go to root first to make the directory?


Minbari said:


> To be precisely it says: , but if you issue `ls`command in /usr/ports you'll see that that folder is empty. Just follow those instructions and the kernel module should be build without problems.


----------



## Minbari (Jan 18, 2021)

My mistake it's just cd work/pkg without first slash.
PS: Since you have difficulties installing/configuring vanilla FreeBSD why did you did not give GhostBSD a try first to familiarize yourself with FreeBSD.


----------



## scottro (Jan 18, 2021)

By the way, do you have an .xinit or .xsessions file?  If you don't have a desktop or window manager configured, it may fail to start. For example, if using open box you'd have, at minimum, a $HOME/.xinit file that read 

```
exec start openbox-session
```


----------



## happy-yoga (Jan 18, 2021)

Minbari said:


> My mistake it's just cd work/pkg without first slash.
> PS: Since you have difficulties installing/configuring vanilla FreeBSD why did you did not give GhostBSD a try first to familiarize yourself with FreeBSD.


I am considering going with GhostBSD to learn the ropes of FreeBSD. Perhaps I should use GhostBSD and then use a virtual machine in GhostBSD to run FreeBSD 12.2 and try to install from scratch that way.


----------



## the3ajm (Jan 18, 2021)

I'm running FreeBSD 12.1 when I heard that i915 is having issues with the next minor release, I decided to wait until EOL date is up and proceed with the update. Did you by chance install the xf86-video-intel package since I'm not sure if you're running older intel GPU since mine is from 2008.


----------



## happy-yoga (Jan 18, 2021)

the3ajm said:


> I'm running FreeBSD 12.1 when I heard that i915 is having issues with the next minor release, I decided to wait until EOL date is up and proceed with the update. Did you by chance install the xf86-video-intel package since I'm not sure if you're running older intel GPU since mine is from 2008.


I am not sure about the xf8-video-intel package. I don't think I installed it. I should consider installing 12.1. If I install 12.1 are you saying I won't have these problems with Xorg?


----------



## the3ajm (Jan 18, 2021)

That's what I would suggest since I've read that 12.2 broke i915 until packages for it is ready that's why you need to build the drm modules from the port tree. Recently I've had issues with X as well but that's with KDE not loading the desktop with a black screen drm reports GPU hung errors which I basically had to switch to Xfce to get a working environment since there's not much out there when I search for them.


----------

