For playing guitar through jack a pretty low latency is required, so you will have configured jack's sample rate, period and buffer-size to reach that. This may result in problems when routing sound from pulseaudio through jack.
In this case I think the best is to use jack while pulseaudio is not running when you play guitar and pulseaudio while jack is not running when you want to playback media. This also would have the advantage that jack doesn't need to share resources with pulseaudio.
To do it this way, you will need to configure jack as well as pulseaudio.
pulseaudio has an autospawn feature which is enabled by default. You need to disable this feature, otherwise pulseaudio would be restarted whenever pulseaudio is stopped. To do that, create the file
~/.config/pulse/client.conf, this file needs to contain the line
autospawn = no
If this file already exists, edit it accordingly.
You also need to add an entry in the startup applications like in this example:
This entry in the startup applications is needed, otherwise pulseaudio will not start during boot because autospawn is disabled.
Open jackctl, click
Setup, choose the
Options-tab and add the commands
pulseaudio --kill and
pulseaudio --start according to this example (if you use scrips here, add the commands to the corresponding scripts):
That's it. I myself use this configuration in Ubuntu Studio 16.04 and 18.04 and it works fine.