# Splitted screen on iMac 2009



## Steffen (Apr 29, 2021)

Hi!

I installed FreeBSD 13-RELEASE minimal on an iMac 2009 without any problems. 

After that I tried to setup i3:

`pkg install xorg-server xinit xf86-input-keyboard xf86-input-mouse`
`pkg install i3-gaps i3lock i3status`
`pkg install xorg-drivers`
`pkg install terminology zsh sudo chromium tmux gnupg pinentry-curses mutt`

setting

```
echo 'sem_load="YES"' >> /boot/loader.conf
echo 'linux_load="YES"' >> /boot/loader.conf
```

and added to /etc/rc.conf this two lines

```
hald_enable="YES"
dbus_enable="YES"
```

and set this in /etc/sysctl.conf

```
kern.ipc.shm_allow_removed=1
```

The Mac has a Radeon HD4670 and following https://wiki.freebsd.org/Graphics/AMD-GPU-Matrix I have to use radeonkms.

Therefore I installed drm-kmod

`pkg install drm-kmod`

and set `hw.syscons.disable=1` in /boot/loader.conf following https://wiki.freebsd.org/Graphics

I have not customized xconfig files nor did a `Xorg -configure` 

I added `/usr/local/bin/i3` to ~/.xinitrc and started with `startx`
*Problem:*

The screen is split in 4 smaller screens with the same content, i.e. it is mirrored.

I guess there is a problem with modesetting, but I have no solution.

Can you point me into the right direction?

Thanks,

Steffen


----------



## SirDice (Apr 29, 2021)

Steffen said:


> ```
> echo 'sem_load="YES"' >> /boot/loader.conf
> echo 'linux_load="YES"' >> /boot/loader.conf
> ```


Don't need these. 



Steffen said:


> and set `hw.syscons.disable=1` in /boot/loader.conf following https://wiki.freebsd.org/Graphics


That shouldn't be needed anymore on 13.0.



Steffen said:


> I added `/usr/local/bin/i3` to ~/.xinitrc and started with `startx`


That should be `exec /usr/local/bin/i3`


----------



## T-Daemon (Apr 29, 2021)

Did you enable the radeon driver provided by graphics/drm-fbsd13-kmod (graphics/drm-kmod) to load automatic on boot in /etc/rc.conf?

```
kld_list="radeonkms"
```
(Without reboot: `kldload /boot/modules/radeonkms`)

And have you added the users to the `video` group as described in https://wiki.freebsd.org/Graphics#AMD_Graphics?

You can try without `hw.syscons.disable=1`, it might not be necessary anymore:








						Finally Fixing The AMD EFIFB Conflict · Issue #60 · freebsd/drm-kmod
					

This years old issue FreeBSDDesktop/DEPRECATED-freebsd-base-graphics#170 that required hw.syscons.disable on some systems. I know the answer now. So, amdgpu actually kicks the system (EFI) framebuf...




					github.com


----------



## Steffen (Apr 29, 2021)

I removed the three entries not needed, the missing `exec` was just missing here, not in xinitrc.

However, I think I was a bit unclear: the problem with the four screens (on one hardware screen) occures without X, too.

For example:

I boot without radeonkms loaded, just the framebuffer. When I do a `kldload radeonkms`, screen splits and is unusable.


----------



## Steffen (Apr 29, 2021)

T-Daemon said:


> Did you enable the radeon driver provided by graphics/drm-fbsd13-kmod (graphics/drm-kmod) to load automatic on boot in /etc/rc.conf?
> 
> ```
> kld_list="radeonkms"
> ...



Sorry, race condition without quoting (my fault), answering to SirDice.

Yes, I loaded the module, removed the entry and my user is in group video.


----------



## T-Daemon (Apr 29, 2021)

There is an old Thread distorted-screen-with-radeon-driver.50870 from 2015 dealing with an iMac 2011 Radeon HD 6650. Using a 11.0-CURRENT resolved the problem then. It might be a case of a regression.

You could try 14.0-CURRENT, it that doesn't help report the problem at FreeBSD bugzilla.


----------



## Steffen (Apr 29, 2021)

T-Daemon said:


> There is an old Thread distorted-screen-with-radeon-driver.50870 from 2015 dealing with an iMac 2011 Radeon HD 6650. Using a 11.0-CURRENT resolved the problem then. It might be a case of a regression.
> 
> You could try 14.0-CURRENT, it that doesn't help report the problem at FreeBSD bugzilla.


I should try 11 then just for the verification.


----------

