# Firefox hangs when started through Rofi, not from terminal (FreeBSD 12, HP820, intel/i915kms)



## drupol (Dec 22, 2018)

Hello,

I installed FreeBSD 12 this weekend on my laptop.
Sound works, Suspend when lid is closed works, everything, I have not major trouble.

My current setup is simple, I use I3 and Rofi (_instead of dmenu_).

The biggest issue that I have is with Firefox. When I run Firefox from rofi (_Mod+d_), it starts and then, it hangs almost instantly.

Things gets weirder when I run it from terminal, when Firefox is run from a terminal (_urxvt_), it doesn't hang at all, it works perfectly fine.
Sometimes I can access the first tab url and type some stuff, then it works, but it fails as soon as I open a new tab.

With Chromium, it works fine, I got not a single issue with it.

Here are my configuration files:

/boot/loader.conf: https://pastebin.com/0v3Zk02i
/etc/rc.conf: https://pastebin.com/GFg9BFWT
/etc/sysctl.conf: https://pastebin.com/cU1Yxda9
~/.config/i3/config: https://pastebin.com/bpkvur7w
Installed packages: https://pastebin.com/it8uaPTm
dmesg: https://pastebin.com/iQfaQuCL

Let me know if you can help, I can provide more files if needed.

Thanks.


----------



## k.jacker (Dec 23, 2018)

I'd try to run rofi in foreground from a terminal and see if there is any output that can help finding the problem. Take a look at rofi(1) to see how to do so (I don't use rofi myself and the manpage isn't quite clear about that to me).

Also, it's mandatory to be clear about the version you are running, like FreeBSD 12.0-RELEASE.

Another weird thing is, you say you are say you are using i915kms driver, but I wonder if you mean the graphics/drm-kmod since your Broadwell CPU wouldn't be supported by the i915kms.ko driver from the base system. Looking at your dmsg the driver seems to have attached fine, so acceleration shouldn't be part of your problem with firefox. Still there is nothing to see in your /etc/rc.conf or /boot/loader.conf that indicates that you load a driver at all. Do you load the driver by hand?

And another thing.. you seem to have randomly copy/pasted all kinds of stuff from unknown sources that are not from the handbook, especially into /boot/loader.conf. Correct me if I'm wrong, but newbies often tend to make problems up themselves by doing so. I would strongly advice you to follow the Handbook and clean up your configuration files.


----------



## T-Daemon (Dec 23, 2018)

Hi k.jacker


k.jacker said:


> ...you say you are say you are using i915kms driver, .... Still there is nothing to see in your /etc/rc.conf or /boot/loader.conf that indicates that you load a driver at all. Do you load the driver by hand?


You missed the entry in /etc/rc.conf  

```
kld_list="/boot/modules/i915kms.ko fuse coretemp cpuctl"
```


----------



## k.jacker (Dec 23, 2018)

I must have been a blind


----------



## T-Daemon (Dec 23, 2018)

drupol said:


> The biggest issue that I have is with Firefox. When I run Firefox from rofi (_Mod+d_), it starts and then, it hangs almost instantly.


I can not reproduce that behavior.
System:
FreeBSD 12.0-RELEASE
i3-4.16
rofi-1.5.1_1
firefox-64.0_3,1
TERM=xterm 
˜/.config/i3/config

```
bindsym $mod+Shift+d exec rofi -show run
```
Choosing from run menu:
run:
firefox

No hanging. After upgrading to 12.0 have you reinstalled all packages?


----------



## drupol (Dec 25, 2018)

This is a brand new install.
I made further tests.
I tested with dmenu ... and I have exactly the same behaviour. 
I'm slowly thinking that something is wrong but I don't know what it is.
As soon as I have a bit of time, I will remove the drm-next-kmod and try again...
The thing that I can't understand is that there is not any single issue when I run it from a terminal...


----------



## k.jacker (Dec 25, 2018)

I‘d start dmenu or rofi from a terminal and look for error messages while starting firefox


----------



## drupol (Jan 9, 2019)

I just found out the issue... it's tricky !

I'm using i3 as window manager, the configuration includes:


```
# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
```

As soon as Firefox start, as it has been killed multiple times before, a popup proposes you to start in safe mode or refresh Firefox.

If those two i3 settings are in my config file, then this popup is invisible but not the Firefox window... weird behavior.

I discovered this issue while trying XFCE, Firefox was not freezing in it... so I guessed it was something in my i3 configuration.

So, so far so good ! I'm now fully happy again


----------

