Unable to negotiate with blog.wapnet.nl port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
The authenticity of host 'blog.wapnet.nl' can't be established.
RSA key fingerprint is SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Are you sure you want to continue connecting (yes/no/[fingerprint])?
It cost me a lot of time to troubleshoot the screen tearing. So I want to share my solution for everyone with the same frustrating tearing issues. My private setup is a Lenovo Ideapad (gaming) with Nvidia and Intel (Prime) GPU. I use the laptop screen and an external 24″ HDMI display.
In Windows 10 everything goes smooth but when I switch my dual boot to Linux than the frustrations begin.
I tried a lot of different Linux distributions (Fedora, Solus, Ubuntu, Pop_OS!, Arch Linux, OpenSuse, and Zorin OS) and I try KDE Plasma, Gnome, and Budgie a lot of hacks for all these systems to get a smooth Linux GUI without screen tearing or other lag.
But I don’t like manual modifications/hacks to get the Nvidia setup smooth. Especially the proprietary Nvidia drivers can break your system easily. So this fix is easy to remember and easy to switch if you want the power saver back to full and use the Intel driver instead of the Nvidia one.
Important, choose your display!
What you have to keep in mind when you have a lot of screen tearing is to make a decision. Use your laptop display or external display. You can fix both displays but not at the same time in a smooth way. If I found a solution in the feature I will post it on my blog. But in the meanwhile, I use only one screen at the same time.
This procedure is for Ubuntu 20.04 LTS but it will work for other distributions for sure.
Install the driver
After a fresh ubuntu installation, Nvidia and HDMI do not work as they should be. So, kick off the first command and reboot.
$ sudo ubuntu-drivers autoinstall
And reboot!
Configure Nvidia driver Part I
Now configure the Nvidia/Intel prime in on-demand mode. So you can do further configuration in the nvidia-settings gui
$ sudo prime-select on-demand
And reboot again
Now start Nvidia settings and switch to NVIDIA (Performance Mode)
Click save and….. reboot!
Turn off one display
Go to your KDE or Gnome display settings and turn off one display. KDE saves these settings so when you plug out the HDMI cable afterward KDE will activate your laptop display. And of course, when you plug in your HDMI cable next time he will turn off your laptop display.
Configure Nvidia driver Part II
These steps are optional but needed for a better performance.
Start nvidia-settings > GPU 0 > PowerMixer
Change the Preffered Mode to “Prefer Maximum Performance”
Last but not least: Firefox hardware rendering
For some compatibility reasons, hardware rendering in Firefox is turned off by default. So you have to enable it.
about:config
Set layers.acceleration.force-enabled to true
Quit Firefox and restart it
Some debug information
I always use this YouTube video to check if the screen tearing is varnished completely
When you want to see if your have the right drivers loaded, use this command:
$ lspci -k | grep -EA3 'VGA|3D|Display'
And you can start an application with max video power with this command. Change gears to your own program off course. But I like gears because you can see the FPS realtime (see the screen what a differance 😉 )
$ __NV_PRIME_RENDER_OFFLOAD=1 glxgears
With nvidia-smi you can see if nvidia is running the application
Enjoy your tearing free Linux 🙂
/edit
Hahaha I saw this video today 🙂 Exactly my thoughts
I want to move this blog to my own NAS because I have plenty enough bandwidth and with Cloudflare as reverse proxy it is secure enough also (and I like to hobby off course 😉 ).
I tried to use the Duplicator WordPress plugin to make a dump of my website and do a restore in the Synology Webstation. But during the database restore in step 2 every time I was getting a 504 gateway timeout after a minute (exactly 60 seconds).
What I could have done was a manual (ftp & database) copy and restore the files. But I was sure I was getting other errors in the future when I had to update WordPress or other plugins. So fixing this timeout issue was the only solution.
On different places on the internet, I found that I had change the Nginx site settings. So I put the timeout settings in the associated “/etc/nginx/conf.d/site.conf” and restart Nginx and restore the database Nginx was still was failing.
Then I’ll try to put these lines in the “/etc/nginx/nginx.conf” but when I restart the nginx the settings were overwritten and my changes are gone.
Every time you restart, Nginx Synology make use of a file “/usr/syno/share/nginx/nginx.mustache” to create a new nginx.conf file. I change the lines in that file and *boom* everything was working 🙂
So TLDR;
sudo su -
vim /usr/syno/share/nginx/nginx.mustache
#add these lines
send_timeout 600s;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
synoservice --restart nginx
Unfortunately, there isn’t a pihole addon in the Synology package center. But you can build your pihole in a docker container instead 🙂
The reason you must use docker-compose instead of the Synology docker package itself is that you want to bridge net NIC of your Synology and place the pihole direct in your network. You cannot do this with the GUI.
The steps:
Install docker with the package center
Activate SSH
Download de image pihole/pihole:latest
Login with ssh
type vi docker-compose.yaml
Paste the content from the docker-compose.yaml example into the vi
Because this is the fifth time I fixed this issue I write a blog about it…
Microsoft uses .local as the recommended root of internal domains, and serves them via unicast dns. Linux uses .local as the root of multicast dns. If you’re stuck on a broken MS network like this, reconfigure your linux multicast DNS to use a different domain like .alocal.
To do this, add a domain-name=.alocal line to the [server] section of /etc/avahi/avahi-daemon.conf, then restart avahi-daemon: sudo service avahi-daemon restart.
[server]
domain-name=.alocal
You may need to flush the DNS, mDNS and resolver cache, as well as restart your web browsers to clear their internal cache.