On 01/07/2017 07:49 AM, Daniel Frey wrote:
So I just recompiled DRM/KMS from the kernel, recompiled, redid the
initramfs (just in case) and rebooted.
The errors are also gone but I now have this:
[ 31.918334] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver
for UNIX platforms 375.26 Thu Dec 8 18:04:14 PST 2016
[ 31.918704] nvidia-modeset: Allocated GPU:0
(GPU-14e248cf-aecd-cf7a-31f4-113e6d075ece) @ PCI:0000:01:00.0
...which I didn't have before.
Yep. The nvidia KMS module conflicts with the in-kernel KMS
implementation. It doesn't get loaded if in-kernel KMS is enabled, and
then you get errors because of that.
Btw, if you pay attention to the initial emerge messages when emerging
nvidia-drivers, they actually tell you to disable DRM/KMS in the kernel
;-) The ebuild checks your current kernel config, and if it sees that
stuff enabled, it warns you that you will most probably run into issues.
Now that all that crap is sorted out, the only couple annoying things
left are alt+tab switching in plasma, and the slowness of dolphin. Task
switching is slow as f*** and it's irritating.
I get that too, but only the first time I press alt+tab. After the task
switch effect has been displayed once, it seems it gets cached and then
it's fast.
But overall, KDE (and KWin in particular) doesn't play well with the
nvidia driver. I was able to fix most of my issues by following some
advice from a KWin developer:
* Enable triple buffering in xorg. nvidia-drivers requires a conf file
anyway to work correctly. I have it in /etc/X11/xorg.conf.d/nvidia.conf,
and the contents are:
http://pastebin.com/raw/0y3NMndp
This enables triple buffering and disables twinview.
* Set some KWin environment variables. Instead of setting them globally,
use a script named "kwin_x11" in a location that appears before /usr/bin
in PATH. /usr/local/bin does that, so I have a /usr/local/bin/kwin_x11
file (it must be executable: chmod +x kwin_x11) with this in it:
KWIN_TRIPLE_BUFFER=1 __GL_YIELD="USLEEP" exec /usr/bin/kwin_x11 $@
(/usr/local/bin *must* be before /usr/bin in your PATH variable,
otherwise this doesn't work.)
* Configure kwin to think it must use a higher refresh rate than your
monitor's refresh rate. For 60Hz, your ~/.config/kwinrc must contain:
[Compositing]
MaxFPS=70
RefreshRate=70
(There's other stuff in the [Compositing] section, don't delete those.)
* See if disabling vsync in the nvidia-settings control panel helps.
After doing all that, KDE is quite usable for me. However, it's far from
perfect. But if you don't want to switch from KDE to some other desktop
environment, and can't deal with the performance issues of the nouveau
driver, then you have not much choice here.