Best Linux and KVM switch practices

Jack Wallen
Dec 15, 2009
Updated • Jan 30, 2015

I have at least four machines running at all times - all using one monitor. Not only does space dictate this setup, so to does budget. Because of this I am relegated to using a KVM switch. If you're not sure what a KVM switch is, it is a device that allows you to use multiple machines with only one monitor, mouse, and keyboard.

Some KVM switches even allow the sharing of a single audio output source (speakers).

There is one problem that can arise when using a KVM switch with a modern Linux distribution. This problem has to do with the latest releases of Xorg.

Because Xorg no longer uses the xorg.conf file, it depends upon receiving identification signals from the monitor in order to automatically adjust the display.

On a single system/single monitor setup this works perfectly. But in some instances a KVM switch will get in the way and the X Windows display will be far from ideal (and some times not even usable). How do you get around this situation? In this article you will read a few tips that will help you get around this.

Choosing your KVM

There is, unfortunately no way to know which KVM switch will work well with modern Linux setups. I have tried four different KVM switches with modern Linux distributions - all with varied results. Here are the KVMs I have used (and their results):

  • Belkin Flip (USB): Switched between machines quickly, but lead to freezing with Ubuntu Linux. Couldn't detect monitors so resolution was poor.
  • IO Gear Miniview 2-port (USB): Switched between machines quickly, no freezing. Couldn't detect monitors so resolution was poor.
  • Generic 4-port KVM (USB - purchased on Ebay): Poor switching, constant freezing, and couldn't detect monitor.
  • IO Gear 4-port Miniview (USB): Easy switching, no freezing, monitor detected so resolution was perfect.

So from the above list, you would obviously want to go with the IO Gear 4-port miniview. It's an inexpensive solution (approximately $70.00 USD) that will give you no problems.

Using your current KVM

What if you already have a KVM switch? There are options. The first option is to manually configure your /etc/X11/xorg.conf file (For more information on the xorg.conf file check out the xorg.conf articles on This can lead to problems when you're not sure what your graphics card is or the resolution of your monitor. Because of this, you might have to do a bit of research before you continue. If you know you are using an NVidia card you are lucky, you can use the Nvidia Settings tool (read about it in my article "Adding  a widescreen monitor in Linux".) You can use this tool to generate your xorg.conf file for you.

If you do not want to have to monkey around with configuring xorg.conf, you have another solution - one that isn't perfect, but will work in a pinch (and one I have used when dealing with certain on-board graphics chips like Intel). Plug your  monitor, keyboard, and mouse directly into your Linux machine and let it boot. Once you have your desktop up and running unplug the monitor, keyboard, and mouse and plug them back into the KVM. Plug the KVM cords into your Linux box and your Linux machine will be up and running. Fortunately the Linux machine won't have to be rebooted for anything any time soon. It's not an ideal solution, but it will work for you. Just remember, if you have to reboot you need to switch those cables around until the machine is back to the GUI desktop.

Final thoughts

Ideally you will purchase a KVM switch like the IO Gear 4-port Miniview that will give you no problems. Otherwise you might have to toy with a work-around or two in order to get your Linux box working with your KVM. This is the price the user-community has to pay for having a modern distribution that doesn't require configuring X (at least not single-system setups).

Article Name
Best Linux and KVM switch practices
This guide looks at best practices in regards to using KVM switches on Linux systems.

Previous Post: «
Next Post: «


  1. Tod Milner said on June 25, 2019 at 11:23 pm

    I saw a post mentioning your site on one forum asking something about buying email lists.

    I would personally recommend that you consider using a Yellow Pages scraper such as Ivy’s B2B Leads Miner Yellow Pages Scraper.

    I cannot find the link but you can google it.

    I am using it for generating my own B2B leads and it is so much cheaper than buying your own lists so don’t waste your money on pre-made lists.

    Anyway mate, I hope this helps.

    Take care and best of luck with your business!

  2. S said on November 15, 2017 at 4:19 pm

    Has anyone found a USB switch (not KVM) that works well with Linux/Ubuntu/Win/Mac? Looking for a 4 port box that allows me to use Hotkey on wireless Logitech K400r to switch controlling different systems. I can just use my remote to switch the TV/Monitor inputs.

    Thanks for any input!

  3. samphaul said on January 19, 2010 at 11:50 am

    Awesome post. This is a complete and updated post o n kvm switches. I really like this description. i Have found many blogs going off topic and long content post but this one is really fantastic. 8 port kvm switch is yet to come. Where should i get the information about that.

    cleon dann

  4. paul said on December 21, 2009 at 11:58 pm

    I’ve got to follow up with ONE more comment. I finally figured out (remembered) that one of the hot keys for switching the TrendNet TK-409 KVM (4-way USB 1.0 VGA w/audio) is NumLock. Well, duh!!!

    See previous comment on Dec 16.

    Anyhow, disabling NumLock in the BIOS and in the startup system services/daemons has solved my problem. Now all three computers work as expected off this KVM.

    So, I have to do an about-face again and say I can recommend the TrendNet TK-409 KVM.

  5. paul said on December 19, 2009 at 6:31 am

    I have to withdraw my recommendation re the TrendNet TK-409 KVM. There is definitely a problem of some sort re its operation.

  6. Kap4Lin said on December 16, 2009 at 9:45 pm

    I’m surprised to see no mention (even by the comments above me) of the VGA and DVI factor of KVM switches. With more and more graphics cards and monitor manufacturer moving to DVI and HDMI ports finding an appropriate KVM switch is extremely expensive. All most all the off-the-shelf cheap KVM switches are VGA-to-VGA ports which will give poor performance when using DVI-VGA connectors.

  7. Daemon_ZOGG said on December 16, 2009 at 6:24 am

    Another solution for you…

    I have 4 Debian Linux PCs and two Debian servers. I too, have space and budget
    issues. Instead of trying to deal with a 4-channel KVM and all of the cables,
    I use OpenSSH with Xorg. This allows me to control the user interface of the
    application while it actually “runs” on its respective PC.
    For example, if I typed the following in the bash cli:

    ssh -C -X user01@ iceweasel (replace user01 with the username on the other PC)

    This would open the iceweasel(firefox) web-browser GUI on my desktop, over an ssh network
    connection from the other PC. However, the iceweasel app itself would actually
    be running on that other PC ( I do this for all of the other 3 PCs.
    In short, I’m able to run my local apps plus all the apps on the other three PCs,
    on just one main desktop. (Works great on most desktops.. KDE, Gnome, Fluxbox, etc.

    OpenSSH client and openSSH-server have to be installed on each machine for this to work.

    1. said on December 17, 2009 at 11:14 pm

      if one is managing a pure *nix environment, not making use of xorg in some way is just silly,
      as this is one of the areas that X was made for.

      windows may be a different story, tho…

  8. mel said on December 16, 2009 at 6:06 am

    I am using a D-Link 4 port KVM switch and have had it for over a year for my 3 computers. Besides Windows I have Debian stable Ubuntu, Parsix and Mint on these machines and have never had a problem. None of the machines are very recent, that is they are several years old. YMMV.
    Thanks for the article though.

    1. Holy Joe said on November 26, 2011 at 12:07 am

      mel–You could help people by mentioning the model number of the switch that works for you. Ever think of helping Linux users?

  9. paul said on December 16, 2009 at 2:41 am

    I have been searching the forums for answers re KVMs for several years and have had no success. So IMHO, you have just answered a real need within the Linux community.

    I’m currently trying to figure out a problem that I’m having with a TrendNet TK-409. It’s a 4-way USB 1.0 VGA w/audio. My monitor is an ACER AL1916. The connected computers are a 64bit Debian, 32bit PCLinuxOS, and a first gen PPC Mac mini. Sometimes I connect a fourth computer, but haven’t in quite a while.

    All three computers use ATI. The PCLinuxOS box has an ATI Radeon X300SE (RV370), the Debian has an ATI Radeon 9550 (RV350), and I think the mini uses ATI, as well.

    The display works great for all three computers. The KVM supports 1280×1024. It can go slightly higher than that, but that’s all I need.

    My problem occurs when starting the PCLinuxOS box. Just as X starts up, the KVM switches back to the first plugged-in computer; ie, the Debian box.

    The PCLinuxOS box is the second computer plugged into the KVM. And it’s starting to look like an ATI driver problem (go figure). I might cop out and just swap in an NVidia card instead. If it works, forget the ATI product.

    Otherwise, the KVM switches flawlessly between the Mac and Debian boxes and once the PCLinuxOS box is running, it works great, too. It’s just as X starts up that it misbehaves.

    So, with all that having been said, I can recommend the Trendnet product. It doesn’t cost much and otherwise does the job.

    BTW, if I can’t figure out this X-startup problem on my own, I might be in contact for advice.

    Thanks again for some great insight to KVMs.

  10. JohnP said on December 16, 2009 at 12:07 am

    Another method is to use a GUI on a single machine and only use text terminals on the others.

    I have 10+ yr old Belkin 4 port KVM that has worked flawlessly with multiple Linux and Windows screens. Currently, I only use 1 X/Windows box with it, plus an occasional laptop. The other machines are running virtual hyper-visors, so no directly attached graphical interface is used. I do run X/Windows and RDP sessions remote, however.

    Prior to that, I had a 4 port KVM that lost track of the mouse on switching that it became completely worthless.

    1. Holy Joe said on November 26, 2011 at 12:00 am

      Ummm … do you think it might be helpful to anybody to mention the model number of the Belkin that works well and the make and model of the one that was worthless?

  11. zenarcher said on December 15, 2009 at 11:36 pm

    I have to say I’ve never experienced issues using a KVM switch here. I am currently using a Linkskey USB KVM switch…two of them, in fact, all with Kubuntu Linux 9.10. Previously, I have used other KVM switches without issues, with Mandriva, OpenSUSE and Fedora. The previous KVM switches were not USB, but PS/2. Since my KVM switches will only handle VGA video, I’m going to be upgrading soon to DVI on the KVM switches and don’t expect any issues there, either.

    1. alan said on December 16, 2009 at 12:34 am

      I’ve been using an ATen CS1016 16 port switch for about 4 years – no problems yet.

  12. ebusinux said on December 15, 2009 at 11:01 pm

    I would make one addition to your solution. I had the same issues and got past them by connecting my linux box directly to the monitor. boot your linux machine and start X. Save a description of the monitor by saving a copy of the EDID. I got this by launching nvidia-settings (using nvidia’s driver) and there is a button to save the EDID. once you have this in a file, place this in /etc/X11 and edit your xorg.conf and add under “Device” section this option:

    Option “CustomEDID” “CRT-0:/etc/X11/[edid-filename]”

    This saves the monitor and when you hook your computer back up to the kvm it will still think it is connected directly to the monitor.

  13. carlleigh said on December 15, 2009 at 8:38 am

    Are you planning on taking the three KVM’s that don’t work back to the stores you purchased them from? Doing so could lead to several interesting articles. 1. How to return hardware that doesn’t support Linux and letting the manufactures know that it is happening. 2. Better labeling on products. Works with Windows 7,XP and 98. (Probably Linux not there but assumed). Most hardware works with Linux. So manufactures can take advantage of Linux users by not labeling boxes. 3. Hey if it doesn’t work with Linux it probably won’t work with Windows 8 and 9,10 etc.

  14. Genisis said on December 15, 2009 at 5:42 am

    I use a 4 port “KS 104” made by Gefen Inc. ( and have no problems that keep me from using either my Ubuntu or my Mint distros. The only problem I run into is if I run my Ubuntu and Mint boxes at the same time….I then get a corner to corner snow effect on my Mint box but can only be seen if the screen is very dark. The Ubuntu never shows a problem no matter what what box is turned on (4 all together, XP, Win7, Mint, Ubuntu). Other than that very small issue, my KVM switches computers very fast, no freezing, and all boxes detect the monitor. Pretty good old dinosaur…..

  15. Jim Carter said on December 15, 2009 at 5:37 am

    I have a Cables To Go Trulink 4 port KVM switch. I routinely switch from many Windows PCs to one machine running Ubuntu 9.04. Problems of any type are almost unheard of. This particular switch is rather expensive, but it has served me well.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.