# pkg install gnome3 not working



## bsdfan99 (Nov 8, 2018)

Installed FreeBSD 12.0 BETA3. Have network connection able to install generic packages. Anyone know why `pkg install gnome3` does not work in recent FreeBSD 12.0 BETA3, it does not even fetch any package, just bails out


----------



## SirDice (Nov 9, 2018)

Post the exact error message please.


----------



## Andris (Nov 13, 2018)

Does not work for me too:

```
pkg install gnome3
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'gnome3' have been found in the repositories

pkg search gnome3
libproxy-gnome3-0.4.15         GSettings-based configuration plug-in for libproxy
pinentry-gnome3-1.1.0          GNOME 3 version of the GnuPG password dialog
```

It seems this package is not exist

FreeBSD fBSD 12.0-BETA3 FreeBSD 12.0-BETA3 r340039 GENERIC  amd64


----------



## SirDice (Nov 14, 2018)

It might have build failures, or at least one or more of its dependencies might. I've been testing 12.0 for some time now and I know some ports still fail to build properly on my repository server. Most of the issues I had have been resolved now but it appears there are some ports still giving issues. Normally I'd post a link to the logs of the official build servers but it's been down for quite some time. That was the easiest way to check.


----------



## Sessa (Jan 3, 2019)

Same here:



> pkg install gnome3
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up to date.
> All repositories are up to date.
> pkg: No packages available to install matching 'gnome3' have been found in the repositories



12.0-RELEASE FreeBSD 12.0-RELEASE r341666 (I have downloaded the dvd here: https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/12.0/)


----------



## ldgc (Jan 3, 2019)

Sessa, I hope it helps


----------



## Sessa (Jan 4, 2019)

Unfortunately, this works not for me. 
After i reboot the notebook the GUI is not started and the terminal prompt is showing.


----------



## SirDice (Jan 4, 2019)

Sessa said:


> After i reboot the notebook the GUI is not started and the terminal prompt is showing.


Handbook: Chapter 5. The X Window System


----------



## Sessa (Jan 4, 2019)

I have installed the OS and run 'pkg install xorg'. Next i have run the 'startx' command but it ends with an error. 
I have checked the log and can find the line in which stands that no display device can be find. 
Next i have run the 'xrandr' command to let me show the available displays. The output: Can't open display.

I have installed the FreeBSD on an Dell Latitude Notebook. 
What have i to do now? Is it right that every thing is ok but only the GUI can not be open because of there is no display connected?


----------



## SirDice (Jan 4, 2019)

Sessa said:


> I have installed the OS and run 'pkg install xorg'. Next i have run the 'startx' command but it ends with an error. I have checked the log and can find the line in which stands that no display device can be find.


Which begs the question, what hardware do you have? Specifically, what graphics card?




> Next I have run the 'xrandr' command to let me show the available displays. The output: Can't open display.


It's no use trying to build a house if the foundation is missing. X needs to be configured and working before you can move to the next steps.


----------



## Sessa (Jan 4, 2019)

SirDice said:


> Specifically, what graphics card?


NVIDEA GF 119M (showed by 'pciconf -vl ')


----------



## SirDice (Jan 4, 2019)

I think (not entirely sure) you need to use the "legacy" NVidia driver for that one, so install x11/nvidia-driver-340. In any case, you will need to install a NVidia driver. 

5.4.5. Video Cards


----------



## Sessa (Jan 4, 2019)

I already checked this page and try to compile but i received this:

requires kernel source files in /usr/src


----------



## SirDice (Jan 4, 2019)

Use packages.


----------



## Sessa (Jan 4, 2019)

What do you think? Could you please explain?
You do not mean to compile, but to install with the pkg?

But what? ^^
What are the names of the required packages?


----------



## SirDice (Jan 4, 2019)

In this case it's fairly obvious: `pkg install nvidia-driver-340` and even `pkg install x11/nvidia-driver-340` should work. 

Now, I don't always remember what a package is called (I'm getting old) and some package names aren't so straight forward, so pkg-search(8) is also quite useful:
`pkg search nvidia`


----------



## Sessa (Jan 4, 2019)

Alright, thank you.
I have installed the package (have became an 'cannot install Package: Kernel Missing Linux support -> fixed by kldload linux) but:


Sessa said:


> have run the 'xrandr' command to let me show the available displays. The output: Can't open display.



This is currently the output. I already have reboot the notebook.


----------



## SirDice (Jan 4, 2019)

You're trying to skip the configuration step again. You must configure X and have it working correctly first.

Setting the Video Driver in a File

Use `Driver "nvidia"` for NVidia cards.


----------



## Sessa (Jan 4, 2019)

I have no files in the folder '/usr/local/etc/X11/xorg.conf.d/' so i can even not configure a file.


----------



## Ogis (Jan 4, 2019)

Sessa said:


> I have no files in the folder '/usr/local/etc/X11/xorg.conf.d/' so i can even not configure a file.


Hello. Installation of Nvidia drivers is very easy. You can check this thread. I would also recommend installing nvidia-settings and nvidia-xconfig `pkg install nvidia-settings nvidia-xconfig`
When you install these programs, as root run `nvidia-xconfig`. It automatically manipulate X configuration files for the NVIDIA  driver. More info here. Now reboot and enjoy.


----------



## SirDice (Jan 4, 2019)

Sessa said:


> I have no files in the folder /usr/local/etc/X11/xorg.conf.d/ so I can even not configure a file.


You're supposed to create those files yourself.


----------



## Sessa (Jan 7, 2019)

It still does not work.:
I did that:

pkg install xorg gnome-desktop gdm

ftsab edited:

```
proc / proc procfs rw 0 0
```

edited rc.conf

```
dbus_enable="YES"
gdm_enable="YES"
gnome_enable="YES"
```

Then I installed the Nvidia driver:
`pkg install nvidia-driver-340`

Then create the file /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf and enter the following:

```
Section "Device"
         Identifier "NVIDIA Card"
         VendorName "NVIDIA Corporation"
         Driver "nvidia"
EndSection
```

Even after a reboot, the graphical interface is not loaded.


----------



## Vull (Jan 7, 2019)

According to `man xorg.conf.d` the config. files need to end with the .conf suffix, so you could try this:


```
mv /usr/local/etc/X11/xorg.conf.d/driver-nvidia /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
shutdown -r now
```


----------



## Sessa (Jan 7, 2019)

My mistake. I have named this slready right but posted this here in this topic wrong. 
I have edti my post.


----------



## SirDice (Jan 7, 2019)

Use misc/pastebinit to post your /var/log/Xorg.0.log.


----------



## Sessa (Jan 7, 2019)

```
[    14.323]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[    14.323] X Protocol Version 11, Revision 0
[    14.323] Build Operating System: FreeBSD 12.0-RELEASE-p1 amd64
[    14.323] Current Operating System: FreeBSD  12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
[    14.324] Build Date: 01 January 2019  09:28:48AM
[    14.324]
[    14.324] Current version of pixman: 0.34.0
[    14.324]    Before reporting problems, check [URL]http://wiki.x.org[/URL]
        to make sure that you have the latest version.
[    14.324] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    14.324] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan  7 09:36:20 2019
[    14.325] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[    14.325] Parse error on line 4 of section Device in file /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
        "DriverName" is not a valid keyword in this section.
[    14.325] (EE) Problem parsing the config file
[    14.325] (EE) Error parsing the config file
[    14.325] (EE)
Fatal server error:
[    14.325] (EE) no screens found(EE)
[    14.325] (EE)
Please consult the The X.Org Foundation support
         at [URL]http://wiki.x.org[/URL]
 for help.
[    14.325] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    14.326] (EE)
[    14.326] (EE) Server terminated with error (1). Closing log file.
```


----------



## SirDice (Jan 7, 2019)

The error is pretty obvious:

```
[    14.325] Parse error on line 4 of section Device in file /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
        "DriverName" is not a valid keyword in this section.
```


----------



## Sessa (Jan 7, 2019)

The desktop environment is still not loading.


----------



## Vull (Jan 7, 2019)

Also, this very likely was just another typo, but /etc/fstab should have the line

```
proc            /proc           procfs  rw      0       0
```
instead of 
	
	



```
proc            /     proc           procfs  rw      0       0
```


----------



## Sessa (Jan 7, 2019)

Done. Is still not loading.
Was another typo, right.


----------



## SirDice (Jan 7, 2019)

Use `startx` to test until you actually have a working X. Then you can enable things like Gnome.


----------



## Sessa (Jan 7, 2019)

Done. 

I have checked the /var/log/:


```
[   926.390]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[   926.390] X Protocol Version 11, Revision 0
[   926.390] Build Operating System: FreeBSD 12.0-RELEASE-p1 amd64
[   926.390] Current Operating System: FreeBSD  12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
[   926.390] Build Date: 01 January 2019  09:28:48AM
[   926.390]
[   926.390] Current version of pixman: 0.34.0
[   926.390]    Before reporting problems, check [URL]http://wiki.x.org[/URL]
        to make sure that you have the latest version.
[   926.390] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   926.390] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan  7 11:17:40 2019
[   926.392] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   926.392] (==) No Layout section.  Using the first Screen section.
[   926.392] (==) No screen section available. Using defaults.
[   926.392] (**) |-->Screen "Default Screen Section" (0)
[   926.392] (**) |   |-->Monitor "<default monitor>"
[   926.392] (==) No device specified for screen "Default Screen Section".
        Using the first device section listed.
[   926.392] (**) |   |-->Device "NVIDIA Card"
[   926.392] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[   926.392] (==) Automatically adding devices
[   926.392] (==) Automatically enabling devices
[   926.392] (==) Not automatically adding GPU devices
[   926.393] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   926.398] (==) FontPath set to:
        /usr/local/share/fonts/misc/,
        /usr/local/share/fonts/TTF/,
        /usr/local/share/fonts/OTF/,
        /usr/local/share/fonts/Type1/,
        /usr/local/share/fonts/100dpi/,
        /usr/local/share/fonts/75dpi/
[   926.398] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   926.398] (II) The server relies on devd to provide the list of input devices.
        If no devices become available, reconfigure devd or disable AutoAddDevices.
[   926.398] (II) Loader magic: 0x413020
[   926.398] (II) Module ABI versions:
[   926.398]    X.Org ANSI C Emulation: 0.4
[   926.399]    X.Org Video Driver: 20.0
[   926.399]    X.Org XInput driver : 22.1
[   926.399]    X.Org Server Extension : 9.0
[   926.399] (!!) More than one possible primary device found
[   926.399] (--) PCI: (0:0:2:0) 8086:0126:1028:0493 rev 9, Mem @ 0xe5400000/4194304, 0xc0000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/65536
[   926.399] (--) PCI: (0:1:0:0) 10de:1056:1028:1493 rev 161, Mem @ 0xe4000000/16777216, 0xd0000000/268435456, 0xe0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/65536
[   926.399] (II) LoadModule: "glx"
[   926.400] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   926.478] (II) Module glx: vendor="NVIDIA Corporation"
[   926.478]    compiled for 4.0.2, module version = 1.0.0
[   926.478]    Module class: X.Org Server Extension
[   926.479] (II) NVIDIA GLX Module  340.107  Thu May 24 21:25:00 PDT 2018
[   926.479] (II) LoadModule: "nvidia"
[   926.480] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[   926.488] (II) Module nvidia: vendor="NVIDIA Corporation"
[   926.488]    compiled for 4.0.2, module version = 1.0.0
[   926.488]    Module class: X.Org Video Driver
[   926.490] (II) NVIDIA dlloader X Driver  340.107  Thu May 24 21:04:45 PDT 2018
[   926.490] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   926.490] (--) Using syscons driver with X support (version 2.0)
[   926.490] (--) using VT number 9

[   926.499] (EE) No devices detected.
[   926.499] (EE)
Fatal server error:
[   926.499] (EE) no screens found(EE)
[   926.499] (EE)
Please consult the The X.Org Foundation support
         at [URL]http://wiki.x.org[/URL]
 for help.
[   926.499] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   926.499] (EE)
[   926.515] (EE) Server terminated with error (1). Closing log file.
```

It seems like there is still a problem with the screen / driver?


----------



## Vull (Jan 7, 2019)

This is all really over my head but this thread: HOWTO: Setup Xorg with NVIDIA's driver seems to cover all the angles.


----------



## Sessa (Jan 7, 2019)

I already tried this 

It should just be a simple GUI. Is not that easy with FreeBSD? What exactly do I have to do now?


----------



## SirDice (Jan 7, 2019)

Driver is now correctly loaded but doesn't detect an NVidia card. Are you sure you actually have one? And are you sure your laptop doesn't use Optimus?


----------



## Vull (Jan 7, 2019)

If you want a simpler solution, for my part I keep it simple by not using any particular video drivers. This doesn't give me any special hardware features like video acceleration, but for what I do, I don't really need all that. So on my ancient 32 bit bios system, I don't have any special configuration at all, and it just works, giving me 1280x1024 resolution in X by default, and 640x480 on the console, all of which is fine for my purposes. For my 64 bit Acer Aspire laptop with UEFI boot and a Radeon graphics card, I used the bare-bones FreeBSD scfb driver, which requires one (and only one) file in the /usr/local/etc/X11/xorg.conf.d directory to get it working:

/usr/local/etc/X11/xorg.conf.d/driver-scfb.conf

```
Section "Device"
    Identifier    "Card0"
    Driver        "scfb"
EndSection
```
I would recommend that you might consider trying a configuration like this, and if you then want something better, you can at least use copy and paste and other X features from a desktop while you're working on it.


----------



## Sessa (Jan 7, 2019)

SirDice said:


> Are you sure you actually have one?



It seems like. Or Didn't it?



> hostb0@pci0:0:0:0:      class=0x060000 card=0x04931028 chip=0x01048086 rev=0x09 hdr=0x00
> vendor     = 'Intel Corporation'
> device     = '2nd Generation Core Processor Family DRAM Controller'
> class      = bridge
> ...



Vull 
Thank you for your answer!


----------



## SirDice (Jan 7, 2019)

You also have Intel graphics:

```
vgapci1@pci0:0:2:0: class=0x030000 card=0x04931028 chip=0x01268086 rev=0x09 hdr=0x00
vendor = 'Intel Corporation'
device = '2nd Generation Core Processor Family Integrated Graphics Controller'
class = display
subclass = VGA
```
Which means you have Optimus. 

Does the BIOS allow you to turn one of the cards off?


----------



## Sessa (Jan 7, 2019)

Alright. Understood.
In the BIOS i can deactivate Optimus. What have i to do after i deactivated this?


----------



## SirDice (Jan 7, 2019)

Sessa said:


> In the BIOS i can deactivate Optimus.


The big question then becomes, is the Intel or the NVidia card disabled?



> What have I to do after I deactivated this?


It depends, if the Intel card is now always active you'll need to configure X for Intel graphics (i.e. remove the Nvidia driver).


----------



## Sessa (Jan 7, 2019)

SirDice said:


> The big question then becomes, is the Intel or the NVidia card disabled?


I have not seen any option to disable / enable Intel. So i have disbale Optimus and delete the nvidia-treiber.conf and rebooted.
Still no GUI


----------



## SirDice (Jan 7, 2019)

For the Intel graphics to work you probably need graphics/drm-kmod. Install that, then run `startx`. If you still get errors post your new /var/log/Xorg.0.log.


----------



## Sessa (Jan 7, 2019)

SirDice said:


> If you still get errors post your new /var/log/Xorg.0.log.





> [  2371.207] X Protocol Version 11, Revision 0
> [  2371.207] Build Operating System: FreeBSD 12.0-RELEASE-p1 amd64
> [  2371.207] Current Operating System: FreeBSD  12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
> [  2371.207] Build Date: 01 January 2019  09:28:48AM
> ...


----------



## SirDice (Jan 7, 2019)

You still have the NVidia driver installed and enabled. 

```
pkg delete -x nvidia-driver
rm /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
```


----------



## Sessa (Jan 7, 2019)

Brilliant. It runs fine.
I have reinstalled the entire system and it works great. Many Thanks!
Among other things, I miss the opportunity to call the Explorer, for example, to navigate to my hard drives via the Explorer. But I think I just have to install it on Gnome.

Many Thanks


----------



## SirDice (Jan 7, 2019)

Explorer is a Windows application. It's actually the same application as Internet Explorer (which is why IE is so deeply entrenched in the Windows OS).

Gnome has its own file manager (that's what you're looking for) called Gnome Files (previously known as Nautilus).


----------



## Ogis (Jan 7, 2019)

Sessa said:


> Even after a reboot, the graphical interface is not loaded.


Hello. When you created directory 
	
	



```
/usr/local/etc/X11/xorg.conf.d/
```
 just run command  `nvidia-xconfig`. It will creates the configuration file automatically.


----------



## SirDice (Jan 7, 2019)

Ogis said:


> just run command  nvidia-xconfig.


We already moved on, he has Optimus. So no NVidia in this case, Intel seems to work now.


----------



## Ogis (Jan 7, 2019)

SirDice said:


> he has Optimus. So no NVidia in this case


It's all clear now. Now I understood. Thank you.


----------



## humphrayLegare (Jan 7, 2019)

comment#6 fixed my problem thank you !


----------



## Sevendogsbsd (Jan 7, 2019)

Ogis said:


> Hello. When you created directory
> 
> 
> 
> ...



I know this is solved, but I believe running `nvidia-xconfig` is no longer recommended because it creates a single, monolithic xorg.conf which is no longer required in most cases. I believe the system will still work but this is not the recommended way to configure xorg. Handbook entry on configuring xorg


----------



## Ogis (Jan 8, 2019)

Sevendogsbsd said:


> which is no longer required in most cases.


You may be right, but I tried to do it manually and I couldn't. I managed to solve the problem only with `nvidia-xconfig`. I understand that this command creates a long and complicated configuration file, but only this way helped me.


----------



## Sevendogsbsd (Jan 8, 2019)

Right and the handbook does say "use this technique only if required". Glad you got it working!


----------

