# Braswell GPU support



## Dan MacDonald (Jul 12, 2018)

I upgraded my FreeBSD server from 11.1 to 11.2 a couple of days ago. The main reason I did so was in the hope that I would finally get accelerated graphics working but I've had no such luck. The mobo is a Gigabyte N3150-N D3V which I think uses a Braswell GPU. I have the i915kms module loaded in rc.conf and xorg-video-intel is installed but when I try to start X I get the error:

```
[  1598.352] (EE) open /dev/dri/card0: No such file or directory
[  1598.352] (EE) No devices detected.
```
In the Xorg.log. When I manually load i915kms nothing gets printed to STDOUT so I think I'm out of luck?

Should braswell GPUs work under 11.2? If so then maybe I should report this as a bug?


----------



## SirDice (Jul 12, 2018)

https://wiki.freebsd.org/Graphics#Intel_Graphics

You need to install graphics/drm-next-kmod. To save you some headaches, install it from ports. The official packages are built for 11.1 and won't work on 11.2.


----------



## vermaden (Jul 12, 2018)

SirDice said:


> The official packages are built for 11.1 and won't work on 11.2.




Could you elaborate more on that? Why for older release?


----------



## SirDice (Jul 12, 2018)

Because it's the lowest, still supported version. So the packages are built for 11.1 or nobody still running 11.1 would be able to update their packages (pkg(8) will complain about the ABI version). Running 11.1 packages on 11.2 is generally not a problem except for a handful of kernel modules.


----------



## Dan MacDonald (Jul 13, 2018)

I've installed drm-next-kmod from ports (which required I install the kernel source too to build it) but I'm still getting the same errors ie:

```
[    92.562] (EE) open /dev/dri/card0: No such file or directory
[    92.563] (EE) No devices detected.
[    92.563] (EE) 
Fatal server error:
[    92.563] (EE) no screens found(EE) 
[    92.563] (EE)
```

Do I also need to install xorg from ports too?


----------



## SirDice (Jul 13, 2018)

Could you please post the whole Xorg.0.log to Pastebin (or something similar)? You can use misc/pastebinit to easily do this from the command line.


----------



## Dan MacDonald (Jul 13, 2018)

I should note that my user is a member of both the video and wheel groups

https://gist.github.com/danboid/007db408c3895a144fcbca64f0061016


----------



## SirDice (Jul 13, 2018)

`rm /etc/X11/xorg.conf` and try again.


----------



## Dan MacDonald (Jul 13, 2018)

I did that before running startx and posting that gist so its as fresh as can be


----------



## Dan MacDonald (Jul 13, 2018)

Oops! Sorry I misread your post. I'd forgot about that config file


----------



## Dan MacDonald (Jul 13, 2018)

https://gist.github.com/danboid/789646b18ac635d807e70223bd780380


----------



## SirDice (Jul 13, 2018)

You mentioned you added i915kms to rc.conf, did you use this?

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

If you only have i915kms (without a path) it's probably trying to load the wrong module from /boot/kernel/i915kms.ko instead.


----------



## Dan MacDonald (Jul 13, 2018)

Yes SirDice, the rc.conf module path was incorrect.

After correcting that though I now get a GPU HANG error and kernel dump at boot so it looks like I'll have to file a bug report.


----------



## Dan MacDonald (Jul 14, 2018)




----------



## Dan MacDonald (Jul 15, 2018)

https://bugs.freedesktop.org/show_bug.cgi?id=107240


----------



## rigoletto@ (Jul 15, 2018)

What is the point of posting a FreeBSD related bug report on the freedesktop bugtracker?


----------



## Dan MacDonald (Jul 15, 2018)

I was unsure about it myself but thats what the error says to do. I'd imagine its because thats the xorg bugtracker and this is more xorg than it is freebsd, even though it is FBSD specific.


----------



## rigoletto@ (Jul 15, 2018)

Always post on the FreeBSD bugs first unless some dev tell you to do somewhere else. In general, nobody cares (or simply can't help) about what happens on FreeBSD other than ourselves. 

[EDIT]

Also, I never had the curiosity to look on Xorg ports but I guess those are heavy patched to work on FreeBSD.


----------



## Dan MacDonald (Jul 15, 2018)

Sounds like I have 2 bugs to report then


----------



## Dan MacDonald (Jul 15, 2018)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229794


----------



## Dan MacDonald (Aug 13, 2018)

I've now tried both the stable and next branches of the drm kmod but neither have been successful at getting vaapi to work under mpv with my GPU. I have at least finally found the right place to report the bug, after a tip off from the dev himself:

https://github.com/FreeBSDDesktop/kms-drm/issues/86

EDIT

I have closed my earlier bug reports for this on freedesktop.org and bugs.freebsd.org.


----------

