Thursday, May 23, 2024

Wayland sync issues with Nvidia GPU

     I've been using wayland instead of X11 exclusively for the past few months.  Apps that were build for wayland work great but older apps that were written for X11 have to use the xwayland protocol and would sometimes flicker or tear on my Nvidia GTX4060 GPU.  It has been a minor issue using Kde Plasma or Gnome environments since they mostly supported Nvidia.  

    The reason for the flicker using Nvidia GPUs with xwayland and not with AMD or Intel, is because AMD and Intel supported implicit sync which Nvidia did not.   This was a big issue with getting wayland to be the default windowing system on Linux.   Gamers prefer Nvidia GPUs over AMD due to the built in DLSS which makes games faster and better graphics using AI.  Nvidia far outsells AMD in the GPU market. 

    Now the good news, Nvidia for the past couple years has been working to support wayland.   The solution that everyone agreed upon is to incorporate explicit sync in wayland and the GPU drivers.   This solution gets rid of any potential for flicker as the GPU will now explicitly be told to render an apps output to the display.  

    Nvidia is now supporting explicit sync in their latest beta driver.   This appeared in Archlinux AUR two days ago as nvidia-beta 555.42.02-1. I was waiting for this to be released for the last couple weeks, so I quickly downloaded it and installed it.  I am using KDE Plasma 6 and the KDE devs state it won't fully support explicit sync until 6.1, however my flickering is gone.  I read a post by a Nvidia dev stating that just the driver alone should fix most issues even if the window manager or desktop environment does not yet support explicit sync.  It was incorporated in wayland about a month or so ago.

    I now have no issues at all using wayland and I have read most Linux distributions will make wayland the default windowing system in the near future due to Nvidia supporting explicit sync which was one of the final hurdles.   It's taken about 8 years to get this to where it is now but the future of Linux looks bright.


Tuesday, November 21, 2023

Using Wayland instead of X11 on Linux

      Wayland is the future communication protocol between a display server and its clients on Linux.  In simple terms, it's what allows applications to be shown, moved, resized, closed, etc.   Wayland replaces the aging and less maintained X11 with more modern technologies designed for computing methods today rather than 40 years ago.  It has been in development since 2008, although just now getting more widely used, mainly due to Nvidia gpu's not working well in the past. 

    I have tried using it several times but could only get it working reasonable well using Gnome or KDE environments since I have a Nvidia gpu.  It would also work using Weston, a compositor made by the wayland folks, but lack of hotkey support and virtual desktops, elimated this option.  Since I dont like using full desktop environments, the only other choice for wayland is a compositor that uses wlroots, which is a modular Wayland compositor library.   There are several compositors based on wlroots with the most popular being "sway" a i3 tiling window manager clone.  I tried out sway and river, and found them both working better than in the past but still a bit glitchy with graphics on Nvidia.  

     This brought me back to gnome and kde, could I use them without the full desktops?  I tried using the compositor of gnome without gnome-shell called "mutter".   Mutter did work fine with Nvidia but there wasn't any way to turn off the crazy desktop animations using dconf-editor.   So then I turned to kde, using "kwin" instead of the KDE plasma desktop.  

     Kwin works great, no glitches, no crazy animations, the hotkeys and virtual desktops work also.  There were three initial issues I ran into:  1. X11 apps would not load  2. Applications started very slow due to no notification daemon  3.  No desktop background.

     I solved issue 1 and 2 by installing "dunst" and starting kwin with the following command line:  "kwin_wayland --xwayland dunst"    This starts kwin with xwayland support for X11 apps and then loads dunst a notification daemon.   Issue 3 is still unresolved as kwin doesn't support a desktop background without plasma, but since I usually have a solid or black backgound it doesnt bother me.  

     Running kwin standalone seems to be the best solution for me for using wayland with a Nvidia gpu.   Nvidia support is getting better and I think eventually it will work great with wlroots.  For now, I'm enjoying using the future of linux while making my system work more like in the past :)

 


Sunday, July 30, 2023

Setting up my Pi-hole on Google wifi and configuring it as a dhcp server

 I recently changed over to Google fiber internet from using Comcast cable internet.  The city had installed Google fiber cable in the street of our neighborhood and having used fiber optic internet in the past, I was excited to change over to it.  Its a dedicated 1Gbps download and upload at a reasonable cost with an added 1TB google virtual drive to upload files to.  The installation into my home was not optimal but eventually they did it right with some complaining.  It comes with two google wifi mesh routers, and I decided to buy a third for better full house coverage.  The google mesh routers are very easy to setup and configure using a phone. However easy doesn't always mean good as I found out when trying to change advance network settings to configure my pi-hole into my new network. Since there is no way to connect directly into the google wifi routers there were several times my phone would just have a spinning wheel and I couldn't change anything and would require a hard reset and completely resetting all 3 routers to get it talking again. Much harder than a traditional router, However in the end I got everything working properly and even changed the dhcp server to use my pi-hole rather than the router.

Instead of writing all the steps it takes, I will summarize of what is needed to change in the google mesh wifi router to get it all working.  It basically takes setting up 3 things, they are:

1.  DHCP IP Reservations:   This has to be turned on with cloud services and the device and IP of your pi-hole needs to be added.

2.  LAN Settings:   Since there is no way to turn off DHCP in google wifi, the only way to use DHCP inside the pi-hole is to set the Start IP range and End IP range to the IP of your pi-hole.  Both will be the same IP.

3.  DNS Settings:   Set up a custom DNS setting to the IP address of your pi-hole.

Note: Google wifi uses 192.168.86.1 gateway by default rather than 192.168.1.1 like most routers so keep that in mind while configuring ip addresses.  If you do something wrong it may require deleting your network configuration, manually factory resetting each google mesh wifi router and then starting over to set up your network like a new installation.   This is where the google wifi falls way short of a traditional router system.  Simple if you don't want to ever configure much but harder when doing advanced networking.

After configuring Google wifi routers and rebooting network log into pi-hole to configure it as a DHCP server just access Settings > DHCP > Click DHCP Server Enabled checkbox.   Configure the range of addresses that you want other devices to use on your network and your router gateway address and then click Save at bottom of page.

That's it in summary, in reality it was a pain to setup but working well with full house ad blocking, recursive DNS, and DHCP from pi-hole computer rather than from the router.  Lots of benefits to each of these things some of which I have posted about previously. 

Overall, I'm happy with the results but sometimes wish I could just accept defaults like most do as it would be less work, it just bugs me when I can't configure things how I really want them.

Sunday, October 30, 2022

Upgrading to Windows11 on an old non supported computer

     I have some older pc's that were running windows10 and wanted to upgrade them to windows11.  Using the microsoft upgrade tool, it reported that my cpu and bios (tpm) would not support windows11.  Knowing Microsoft, most likely that is their way to push new hardware.  I did some research and found a way to upgrade both computers and they have been working without any issues.  I wrote up a small procedure to upgrade for future reference.  I accidently deleted the original file so this is a scanned in from a printed page. 




Thursday, June 23, 2022

X11 window manager using the Penrose library written in Rust Language

      Since I began using Linux as my main OS sometime around 1998, I have always enjoyed trying out the many X11 window managers along with hacking on them or creating my own.

     Recently, I discovered on Github an X11 window manager library written in Rust language called Penrose.   Having played around with Rust a few times, I decided to see if using this library would make it easier to create a customized tiling window manager.   I found Penrose to be very well documented and in just a few hours I was able to put together a fully functional tiling window manager that is minimal and stable written in 100% Rust language.

     I named it MPWM for My Penrose Window Manager.  I like the Penrose idea about making a library in a solid system level language that allows others to customize rather than everyone trying to write their own window managers from scratch.  It gives the power of other programming language window managers such as Xmonad or Stumpwm but without having to load the full language into memory like with Haskell or Lisp.

    While MPWM is not perfect, there are still features or changes I may make, it's not about the end results for me as much as the journey.  I enjoy the challenge and making my computer work just the way I want.  The ability to change and modify everything in my OS is what keeps me using Linux to this day.

In search of a better Search Engine

     As google have grown they have increasingly turned to more censorship and advertising.  This limits the number of results from a search and also creates less privacy as they are tracking everything you type in for advertising results.

     Due to Googles lack of privacy protection, a couple of newer search engines have emerged.  Duckduckgo being the most popular alternative search engine that claims it is privacy focused.  However, there have been recent news about censorship on this search engine along with information about them using Bing as a backend, which leads to questions about whether they are much better than Google.

     Due to Duckduckgo's questionable privacy, a new search engine by the creators of the Brave browser has emerged.  Brave Search claims it is "the world’s most complete, independent, private search engine".   I have used it now for a few months and it seems to be fast and provides good results, however how much privacy it provides has yet to be determined.    The Brave browser is based on Chromium but offers settings to enhance privacy on the web, I have used it a number of times along with my favorite browser Ungoogled-Chromium which is just Chromium minus Googles extra spying stuff.  It's not as easy to install and upgrade as other Browsers but I think it worth it.

     So in short, I use Ungoogled-chromium browser with Brave Search as my default search engine which has to be manually set up in Settings but no-one said trying to maintain some privacy on the web was going to be easy.   Enjoy!

Saturday, February 19, 2022

Slackware15? Whaaa?

 I just realized I didn't post anything in 2021. I guess it was a non-eventful year, lol.  

    I noticed that Slackware 15.0 was released recently after only 5.5 years since the last release /s. I did like that they released it on exactly 02-02-2022 at 22:22:22 that takes some planning. The beauty about slackware and also the web page www.slackware.com is that it is almost unchanged from its beginnings back in 1991.  Sure they have updated a ton of packages but the way you install and configure the OS and the package management is almost the same as its origins.  How many other OS's or web sites for that matter have the same look and feel 30 years after they were created. Sure, some may say its a lack of adapting to the new ways of doing things while others argue why change something for change sake.  For me, I love that nothing from a user perspective has changed, because why change perfection.  I love how installing and using Slackware is like putting on an old shoe even though that old shoe has been polished with the latest kernel and other software.  

    Therefore I had no choice but to download the lastest .iso burn it to a usb stick and install Slackware 15.0.  The install was flawless like all Slackware versions.  Everything worked perfectly and in a matter of about an hour I had everything I needed installed and configured.  I did need to download the source code for a few programs that Slackware doesn't include but they are mostly small and easy to compile programs.  I love that Slackware by default drops you to a command prompt rather than some Display Manager.  I prefer to use my own Window Manager that I add to the .xinitrc and run with startx.   I also love that after all this time I can install the latest Nvidia drivers by downloading the latest from their website and using their install script which works perfectly on Slackware. After two weeks of using this release it is still running flawlessly.  Slackware may be a bit more difficult to learn and install than say Ubuntu but once you are done with the initial install there is nothing to do.  The updates to the release are only security updates that may happen maybe once a week and can be easily updated with slackpkg update, slackpkg install-new, and slackpkg upgrade-allOther distributions are always changing and updating various programs that in many instances break something else.  

    In summary, Distrowatch https://distrowatch.com/weekly.php?issue=20220214#slackware did a recent review of Slackware 15.0 where they mentioned that not many new users are flocking to it and most users are people that got started with it two decades ago or more.  I think that is true and I fall into that category, however I feel that although it takes some patience to learn and appreciate Slackware the reward is well worth it.  Thank you to Pat Volkerding, Alien Bob, Robby Workman, and the whole Slackware team for changing only what needs to be changed.   Hoping that slackbuilds.org is updated soon for the 15.0 release!  Congrats to Slackware for surviving 30 years!!!




Friday, October 16, 2020

Setting up Pi-hole as a recursive DNS server

 It's been a couple months since I set up an intel nuc computer as a network wide ad blocker using pi-hole software and it's been working great.  Internet speed is increased and the amount of internet queries blocked is around 15-20%.  There have been a couple of sites that I had to whitelist to get the app to work especially ad sponsered movie apps, but relatively few issues overall.

Being privacy minded, and trying out a few of the upstream dns servers and reading their privacy policies led me to question can any free dns servers really be trusted?  Although I am not going to dark web web-sites, I don't like the idea of big corporations tracking everything done online. One way they can use this data is to track your political views by what news web sites you go to. The algorithm then labels you as conservative or liberal, etc.

This got me to look into using my pi-hole server as a complete dns server solution, thereby eliminating the need for another dns server.  Turns out the pi-hole team had already thought of this and had written a procedure for setting up a recursive dns server using the same hardware as your ad-blocker.

Following this procedure https://docs.pi-hole.net/guides/unbound/  I was able to configure my pi-hole to be my full dns server solution.  It was fairly easy to configure and setup by installing "unbound" and copying the example pi-hole.conf file to "/etc/unbound/unbound.conf.d/pi-hole.conf" on my nuc computer.  After installation it just took rebooting the pi-hole server and configuring the IPV4 address in the pi-hole admin dashboard. Checking that your recursive DNS server is working properly can be done by going to https://dnsleaktest.com/ and running the extended test.  Its been a few weeks since I set this up and have had no issues and no noticable reduction in speed to access web sites.  

Overall, I'm completely satisfied with this solution and thankful that the pi-hole team and the "unbound" software developers have made it so easy to setup for those that might not attempt to do it otherwise.