Published 2015-11-17, last updated 2016-07-18. This document will be a work in progress for a while.
(TODO, Windows 10 problems with audio and Telemetry and having to flip 40 privacy options)
I'm listing it here because some of the things below will be irrelevant with different hardware.
CPU: Intel 4790K (Haswell Refresh), running at stock speeds
Motherboard: ASUS Z97-A with 2601 BIOS, CSM boot disabled, Intel Virtualization enabled, Fast Boot disabled
RAM: 32GB of 2x Crucial Ballistix Sport 16GB Kit (8GBx2) DDR3 1600 MT/s (PC3-12800) CL9 @1.5V UDIMM 240-Pin Memory BLS2KIT8G3D1609DS1S00
GPU: Gigabyte GeForce GTX 970 Mini ITX Overclocked 4GB GDDR5 PCiE Video Card GV-N970IXOC-4GD
Compared to Windows 8.1/10, the Linux desktop felt ridiculously fast and responsive, to the point where I wondered why I'd ever boot into Windows again. Why does the Linux desktop feel so much faster in comparison? Probably for the reasons mentioned in I Contribute to the Windows Kernel. We Are Slower Than Other Operating Systems. Here Is Why:
Windows is indeed slower than other operating systems in many scenarios, and the gap is worsening. The cause of the problem is social. There's almost none of the improvement for its own sake, for the sake of glory, that you see in the Linux world.
Granted, occasionally one sees naive people try to make things better. These people almost always fail. We can and do improve performance for specific scenarios that people with the ability to allocate resources believe impact business goals, but this work is Sisyphean. There's no formal or informal program of systemic performance improvement. We started caring about security because pre-SP3 Windows XP was an existential threat to the business. Our low performance is not an existential threat to the business.
See, component owners are generally openly hostile to outside patches: if you're a dev, accepting an outside patch makes your lead angry (due to the need to maintain this patch and to justify in in shiproom the unplanned design change), makes test angry (because test is on the hook for making sure the change doesn't break anything, and you just made work for them), and PM is angry (due to the schedule implications of code churn). There's just no incentive to accept changes from outside your own team. You can always find a reason to say "no", and you have very little incentive to say "yes".
There's also little incentive to create changes in the first place. On linux-kernel, if you improve the performance of directory traversal by a consistent 5%, you're praised and thanked. Here, if you do that and you're not on the object manager team, then even if you do get your code past the Ob owners and into the tree, your own management doesn't care. Yes, making a massive improvement will get you noticed by senior people and could be a boon for your career, but the improvement has to be very large to attract that kind of attention. Incremental improvements just annoy people and are, at best, neutral for your career. If you're unlucky and you tell your lead about how you improved performance of some other component on the system, he'll just ask you whether you can accelerate your bug glide.
More specifically, I've found Linux to be ~20x faster at starting a process, many times faster at traversing filesystem trees, and (at least without a compositor) it seems to respond to user input at least 2 frames faster than Windows. I also noticed (using evhz) that Linux polls my USB mouse at 500hz, while Windows is locked to 125hz.
Even having used Linux for 15 years, I was surprised by the numerous installation and setup difficulties.
I used tc-play and ntfs-3g (both packaged in Ubuntu) to access my TrueCrypt NTFS volumes read-only. Read-write probably would have worked as well, but I decided to migrate all of my data to XFS. I used a script similar to this one to mount all of my drives:
# get the by-partuuid/ UUIDs from `blkid`
cat /root/password | tcplay -m NTFS-X -d /dev/disk/by-partuuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
cat /root/password | tcplay -m NTFS-Q -d /dev/disk/by-partuuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
cat /root/password | tcplay -m NTFS-R -d /dev/disk/by-partuuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# streams_interface=windows for ADS access via :ads_name suffixed to path
NTFSOPTS="ro,uid=1000,gid=1000,umask=077,show_sys_files,streams_interface=windows"
for drive in X Q R; do
mkdir -p /mnt/$drive && mount -t ntfs-3g -o $NTFSOPTS /dev/mapper/NTFS-$drive /mnt/$drive &
done
I did not have any VeraCrypt volumes, but the code in this tc-play pull request might work. Either that or VeraCrypt itself.
I built the develop branch of dislocker to access my only BitLocker volume. But I found that it did not read one of my files correctly (now fixed).
# dislocker-fuse --readonly --verbosity --user-password -V /dev/sda4 /mnt/bitlocker-C
Enter the user password:
# mkdir -p /mnt/C
# mount -t ntfs-3g -o ro,uid=1000,gid=1000,umask=077,show_sys_files,streams_interface=windows \
/mnt/bitlocker-C/dislocker-file /mnt/C
I was planning on using GNOME 3 because it seemed like a well-integrated environment that supported all the Windows shortcuts, but with the nvidia-355 or nvidia-358 drivers, gdm and gnome-session always crashed with something similar to this segfault:
kernel: gnome-shell[1178]: segfault at 64 ip 00007f7157aee970
sp 00007ffeb811f8d8 error 4 in libcogl.so.20.3.0[7f7157a9d000+a0000]
from https://bbs.archlinux.org/viewtopic.php?id=195866&p=3
There were reports that this is related to outdated Intel microcode, so I installed intel-microcode
and made sure my Intel microcode was being updated. No luck, though, even after many attempts.
I gave up on GNOME 3, went with XFCE4 and was quite happy with it, except for the compositor.
When I revisited GNOME 3 for this article, it started up just fine, without any segfaulting. I have no idea why this resolved by itself. I don't think I changed anything that would be relevant to libcogl. I installed and uninstalled many peripheral gnome/gtk packages, rebooted many times (including a real power-off), disabled Fast Boot, and enabled Intel Virtualization Technology (VT-x) in my BIOS settings. Unfortunately, I can't pin down the root cause yet.
Screen tearing: XFCE4 has a compositor enabled by default that introduces screen tearing. XFCE 4.12 supposedly replaced the xrender-based compositor with a GL-based compositor, but I still saw screen tearing issues with my setup. Disabling the XFCE4 compositor and installing Compton with this configuration resolved all screen tearing issues for me.
Window resizing difficulties: Windows in XFCE4 are a lot harder to resize than on the Windows OS because the corner drag target is only 3×3 px in size. But windows can instead be resized with Alt+right drag (anywhere on a non-maximized window).
Multi-monitor window maximize issue: After adding a monitor with a higher resolution than the first monitor, windows on the larger monitor would maximize to the size of the smaller monitor. Restarting xfwm4 with killall xfwm4
fixed it. Note: run xfwm4 &
if it fails to restart.
Where's my Whisker Menu?: I bound a key to run xfce4-popup-whiskermenu
, but xfce4-popup-whiskermenu
always silently exited without printing anything. I really did need to add a Whisker Menu to a panel before it could pop up. Duh.
Whisker Menu button rendering: With or without a compositor, the Whisker Menu button in my panel turns all-black when dragging an xfce4 window button in a task panel.
Small icons on a HiDPI screen: This can mostly be fixed with:
xfconf-query -c xsettings -p '/Gtk/IconSizes' -s 'panel-actions-menu=32,32:panel-launcher-menu=32,32:panel-launcher-tooltip=32,32:panel-tasklist-menu=32,32:panel-applications-menu=32,32:panel-directory-menu=32,32:panel-window-menu=32,32:gtk-menu=32,32:gtk-dialog=32,32:gtk-button=32,32:gtk-dnd=32,32:gtk-large-toolbar=32,32:gtk-small-toolbar=32,32'
But unfortunately, there seems to be no way to make the icons bigger in xfce4-panel's Window Buttons.
I needed Compton to solve screen tearing in Firefox (see below), but the configuration on the Ubuntu forums introduced strange display lag, where I would press a key in gnome-terminal and see the update only a full second later. The problem was not with the configuration, but with a NVIDIA-related bug in the old version of Compton in Ubuntu 15.10.
The https://launchpad.net/~richardgv/+archive/ubuntu/compton PPA lacked a package for wily, but https://launchpad.net/~kelleyk/+archive/ubuntu/compton has one that works (via this comment). Installing compton from that PPA and then modifying my configuration fixed the 1-second lag issue:
backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
vsync = "opengl";
xrender-sync = true;
xrender-sync-fence = true;
vsync = "opengl-swc", "opengl", and "none" all seemed to work and provide vertical sync, but "opengl-swc" was noticeably sluggish, while "opengl" seemed to be ~1 frame faster than "none".
See man compton
for the full list of vsync methods.
Unfortunately, even with Compton set up correctly, having a compositor enabled made the desktop noticeably less snappy than compositor-free X. But this is something you'd only notice if you switch between having compton on and off. Most people used to Windows/OS X/GNOME 3/Unity wouldn't care about this at all.
This is probably not a Compton problem but a more general compositor problem. So I have to choose between a tearing-free Firefox and a completely lag-free desktop. Because of the compositing lag and other problems, I stopped using Compton and got used to screen tearing in Firefox.
Could compositing be done with fewer frames of lag? This comment suggests it is possible:
Also, I wish all GPUs would keep compositing fast and minimum depth, only 1 frame shallow where possible, by doing just-in-time compositing in-GPU during VSYNC. Then it has no lag penalty over proper triple buffer. Memory bandwidth is fast enough to finish compositing in just a few hundred microseconds, so compositing can be done just-in-time in GPUs. Manufacturers that do not, need to get with that ball already being done in some GPUs, and optimize compositing to be as shallow as possible. Then, there is only the double buffer style lag penalty, and reduced by VSYNC OFF and compositing becomes the defacto proper triple buffer. Some say it is 'emulated', but it is a duck (it looks like a duck, it quacks like one, it reduces lag without tearing). It is a real proper triple buffer occuring, then potentially tape-delayed a bit again by inefficient compositing! (But still less lag than double buffering in windowed mode on same GPU!)
After installing nvidia-358 from the graphics-drivers ppa and running startx for the first time, I saw my first and only (so far) kernel panic on this machine. I needed to reboot first after installing nvidia-358 because the nouveau drivers were still loaded.
I observed nvidia-358 + VLC 2.2.1 + XFCE4 compositor exhibit amazing video corruption and temporary display lockup issues when playing a high-bitrate 1080p video. The issues went away after a reboot and I haven't seen them since.
I observed nvidia complain in dmesg:
NVRM: Your system is not currently configured to drive a VGA console
NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
NVRM: requires the use of a text-mode VGA console. Use of other console
NVRM: drivers including, but not limited to, vesafb, may result in
NVRM: corruption and stability problems, and is not supported.
The warning went away after turning off CSM (Compatibility Support Module) in my BIOS settings.
Linux doesn't have anything like Windows' User-Mode Driver Framework, so upgrading or downgrading the graphics driver requires a reboot.
nvidia-smi
shows some power/temperature/memory stats for your GPU:
# nvidia-smi
Sat Nov 14 18:36:38 2015
+------------------------------------------------------+
| NVIDIA-SMI 358.09 Driver Version: 358.09 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 970 Off | 0000:01:00.0 Off | N/A |
| 34% 41C P0 47W / 160W | 317MiB / 4093MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 13301 G /usr/bin/X 199MiB |
| 0 14075 G ...s-passed-by-fd --v8-snapshot-passed-by-fd 99MiB |
+-----------------------------------------------------------------------------+
X handles modifier keys completely differently, allowing you to press the modifier key last. I run into this many times a day.
Hold down the x key, wait, then press Shift. Windows stops repeating the 'x' immediately. Xorg switches to uppercase 'X', allowing you to toggle the case without ever releasing the 'x' key.
Mousewheel events go into the window over the mouse pointer instead of the active window. I run into this rarely.
I used AutoHotkey on Windows to bind my fourth and fifth mouse buttons (the side back/forward buttons) to switch tabs in all of my applications. AutoHotkey doesn't run on Linux, but I managed to get this functionality with xbindkeys and xautomation (thanks to this answer for the tip).
apt-get install xbindkeys xautomation
I wrote an ~/.xbindkeysrc
:
"xte 'keydown Control_L' 'key Page_Up' 'keyup Control_L'"
b:9
"xte 'keydown Control_L' 'key Page_Down' 'keyup Control_L'"
b:8
and ran xbindkeys
. My fourth and fifth buttons (8 and 9 in Xorg) could now switch tabs in all applications that used Ctrl-PgUp/PgDn for tab-switching.
To get the names of the keys for xbindkeys or xte, apt-get install x11proto-core-dev
and read /usr/include/X11/keysymdef.h
.
sans-serif: After trying many sans-serif fonts, I settled on Roboto for both the UI font and the sans-serif font in my browsers. I used the fonts-roboto
package to get the Roboto font from Android 4.4.4 and compared it with the newer Android 5.0 Roboto from the google/fonts repository. I tested the two on a hidpi display and found the Android 5.0 Roboto noticeably worse1, with improperly compact kerning and worse shapes for "R" and "e".
serif: I'm pretty happy with Liberation Serif. Its character sizes match Times New Roman, but are more readable.
I tried the Noto Sans fonts, but they had a strange curly appearance that reminded me of Trebuchet MS.
monospace: I'm very happy with PragmataPro Mono on a hidpi display. On a lodpi display, it looks great on Windows' ClearType but not so great on Linux.
I used this ~/.config/font-manager/local.conf to apply my font preferences everywhere. It's a very nice feature that has no analogue on Windows.
PulseAudio has actually been mostly unproblematic for me: after a little tweaking, my audio works fine everywhere, without any skips or glitches (unlike Windows 102). I encountered these things:
PulseAudio sending output to my motherboard soundcard instead instead of to my USB Audio DAC. I couldn't find a way to fix this in pavucontrol
, so I used pacmd list-sinks
and pacmd set-default-sink N
to send audio to the USB Audio DAC. pavucontrol
might still be needed to redirect audio from existing applications to the correct sink.
Apparently this can also be done by clicking on the right 'Set as fallback' button in the Output Devices tab of pavucontrol. (See also.)
Unplugging and re-plugging the USB Audio DAC changed the sink number. I ran pacmd set-default-sink N
again.
Audio crackling when changing the volume in either Chrome or foobar2000. This happened because my Burr-Brown_from_TI_USB_Audio_DAC
expected audio to come in at a 48000hz sample rate instead of 44100hz. I added this to my /etc/pulse/daemon.conf
and restarted pulseaudio, which fixed all crackling problems:
default-sample-rate = 48000
alternate-sample-rate = 48000
I also set resample-method
to maximize resampling quality (discussion):
resample-method = speex-float-10
pulseaudio
isn't niced properly when autospawned inside a firejail. I heard audio dropouts for a week until I noticed it was running at nice level 0 instead of -11.
Windows trained me to hit Ctrl-Alt-Delete before unlocking, but this key combination makes systemd reboot the system, at least when pressed at the console. I disabled this behavior with:
systemctl mask ctrl-alt-del.target
systemctl daemon-reload
Note that systemd will still reboot the system immediately if you press Ctrl-Alt-Delete 7 times within 2 seconds.
Ubuntu lets any local user shut down or reboot the system, and xfce4 presents a giant confirmation-free reboot button when you're logging out, so it's very easy to accidentally reboot the system. I stopped non-root users from being able to press these buttons by adding a polkit configuration file as described here.
Broken ..
navigation: The file chooser dialog that GTK+ applications use (GtkFileChooserDialog) has a bizarre problem: typing ..
into the path input box goes up three directories instead of one. I am not making this up. As an alternative, Alt+up arrow and Alt+down arrow can be used to navigate up and down directories.
This is fixed in the GTK3 file chooser dialog.
When the file chooser dialog opens, focus is on the path input box, but the text is not selected for easy replacement.
This is also fixed in the GTK3 file chooser dialog.
Filename completion in the path input box is case-sensitive, very much unlike Windows or what I have configured in zsh.
Chrome works fantastically well on Linux, probably even better than it does on Windows. This is not a surprise: developers at Google use Ubuntu workstations, and ChromeOS is Linux-based, so any serious Linux-specific bugs are very likely to get fixed. On Windows, I saw serious regressions in Chrome, including a bug that caused new tabs to crash on Windows 8.1. This regression remained in stable Chrome for about 6 weeks.
vsync: On my system, the entire Chrome window exhibits no screen tearing, even when running without an X compositor.
Video support: YouTube playback, whether using mp4 or webm, worked perfectly fine.
Autoscroll with middle-click is not supported. I installed the AutoScroll extension from outside the Chrome Web Store for security reasons. (Developer Mode, Load Unpacked Extension...)
On a HiDPI display, the IME pops up in the wrong location on screen.
Menus and context menus are very ugly by default, padded widely and lacking any border. Both the padding and border issues can be fixed by clicking 'Use GTK+ theme' in chrome://settings -> Appearance.
With nvidia-358 and Chrome 46 and no compositor, going fullscreen freezes display output until you leave fullscreen. Either downgrading to nvidia-355 (or 352) or running compton fixes the issue.
Using the mousewheel will sometimes start switching tabs because your cursor happened to be over the tab bar. This is a Linux-only behavior that cannot be disabled. Implemented a long time ago. Happens all the time when middle-clicking to close a tab and accidentally mousewheeling as well.
It's not any different from Windows, but Chrome provides no way to persist some command-line arguments (of which it has many). I documented a solution here that involves copying /usr/share/applications/google-chrome.desktop
to ~/.local/share/applications/google-chrome.desktop
and editing the Exec=
lines. This is my ~/bin/google-chrome-stable
:
# --reduced-referrer-granularity breaks extension installs:
# https://code.google.com/p/chromium/issues/detail?id=440715
/usr/bin/google-chrome-stable \
--no-default-browser-check \
--no-pings \
--reduced-referrer-granularity \
--save-page-as-mhtml \
--proxy-pac-url=file:///[...].pac \
"$@"
Firefox does not work quite as well on Linux as it does on Windows. Fortunately, most of these are just odd defaults that can be fixed. I eventually gave up Tree Style Tab and switched to using Chrome as my primary browser, because it's better-sandboxed and much faster at running real web applications.
vsync: I observed serious screen tearing issues with both scrolling (bug #1096904) and video playback. This happened even with the XFCE4 compositor disabled. I tried toggling every possibly-relevant option in about:config, to no avail. But running Compton with this configuration fixed the issue for me. Thanks to blackout24 for the pointer. Unfortunately, Compton caused noticeable lag, so I stopped using it.
Autoscroll with middle-click is disabled by default, but can be enabled by setting general.autoScroll -> true in about:config.
Clicking once in the URL bar does not select all the text as it does on Windows, but this can be fixed with browser.urlbar.clickSelectsAll -> true in about:config.
Double-clicking a word in the URL bar selects the whole URL instead of a single word as it does on Windows. This can be fixed with browser.urlbar.doubleClickSelectsAll -> false in about:config.
Tools -> Options is in the wrong place on Linux: under Edit -> Preferences. I fixed this by installing the Tools > Options… for Linux addon.
youtube.com/html5 showed that the browser did not support MSE or VP9. In Firefox 42, I fixed this by setting these options in about:config:
media.mediasource.enabled -> true
media.mediasource.webm.enabled -> true
media.mediasource.format-reader.webm -> true
webm playback works fine by default in Firefox 43.
mp4 playback on YouTube and elsewhere is not enabled by the OpenH264 codec that Firefox automatically downloads. This might be because it lacks support for Main Profile or because of other issues. gstreamer can supposedly make mp4 playback work, but I have not enabled it, because I don't know whether it is secure enough to leave exposed to any untrusted webpage.
mp4 playback works fine now in Firefox 43 with ffmpeg installed.
The Backspace key is unmapped by default, whereas on Windows it goes back. I fixed this by setting
ctrl-j does not open the Downloads window in Firefox/Linux (it's bound to ctrl-shift-Y instead.) I found a few workarounds:
Create a new boookmark with a short keyword like "ad", set the location to about:downloads, and get used to ctrl-t
ad
ENTER
.
After applying an AppArmor profile to Firefox, ctrl-s failed to open the save dialog on many websites, even though my default download directory was inside a path that Firefox was allowed to read/write to. I fixed this by deleting content-prefs.sqlite
in my profile (imported from Windows). This file points different domains to different download directories3.
I initially used gnome-terminal, but abandoned it because it had problems:
New tabs open at the very right instead of next to the current tab.
gnome-terminal does not have activity indicators on tabs. SecureCRT, konsole, and ROXTerm do, although konsole makes it very hard to see the indicators.
With a lot of tabs and scrollback, new tabs would take 1.5 seconds to open.
After ~3 days of uptime, it crashed while I using the mousewheel:
gnome-terminal-[1696]: segfault at 10100010102 ip 00007f8b04eca3b6
sp 00007ffe9966b7f0 error 4 in libgtk-3.so.0.1600.7[7f8b04b85000+6de000]
To get SecureCRT-like behavior where you're SSHed in somewhere and creating a new tab opens another connection to the same host4, you can create a new profile that automatically runs "ssh user@host" instead of your shell. See this answer on askubuntu.
You can make gnome-terminal open multiple tabs with your specified commands running.
To get finer control over the font size, you can manually enter a decimal size like 10.5 in the preferences.
ROXTerm is a great replacement for GNOME Terminal that is capable of opening tabs to the right of the current tab, as well as indicating new output in a tab via a small icon (Profile Preferences -> Tabs -> 'Show terminal status in close buttons').
The tips in the GNOME Terminal section apply here too, except ROXTerm --tab
doesn't seem to create more than one tab when specified multiple times.
In the roxterm color selection dialog, I couldn't change the bold colors because the radio buttons were broken (tested: the roxterm 3.1.4-2 that came with Ubuntu 15.10). I noticed this was fixed in a recent commit and compiled roxterm from source (no longer necessary on Ubuntu 16.04):
sudo apt-get install python-lockfile libtool libtool-bin pkg-config xsltproc \
docbook-xsl libvte-2.91-dev imagemagick libgtk-3-dev
git clone http://git.code.sf.net/p/roxterm/code roxterm
cd roxterm
python mscript.py configure --prefix=/opt/roxterm
python mscript.py build
sudo python mscript.py install
I still couldn't change the colors for bold text. I had to switch the color scheme from GTK to Tango. On another computer, Tango to GTK. It probably just needs to be changed once.
There is a report that Sublime Text 3 crashes on Ubuntu 15.10, but it works perfectly here (tested: build 3095 x64).
After moving my preferences from Windows, I needed to rename Default (Windows).sublime-keymap
to Default (Linux).sublime-keymap
.
Sublime Text 3 wasn't picking up my 1.65x font scaling setting, so I
Added the (undocumented?) "dpi_scale": 1.65,
to my Preferences.sublime-settings
file.
Added "font.size": 14
to the "class": "sidebar_label",
section in my Soda Light 3.sublime-theme
to increase the sidebar font size.
The "Save changes before closing?" dialog can be dismissed on Windows with the 'n' key, but requires alt-w on Linux. Probably a GTK concern.
I used Emacs on Windows for org-mode, and after fixing all the paths in my ~/.emacs.d
, it works near-identically on Ubuntu, except several times faster.
HexChat works the same as it does on Windows, except faster and with a working spell checker.
I have not yet tested this yet, but I doubt it has the Windows GTK bug that lands the IME input widget in the top-left corner instead of at the cursor.
qBittorrent appears to work just as well as it does on Windows, except for a Qt context menu problem (maybe only on a hidpi display): right-click and the first context menu item is automatically selected and activated on right-click release. More annoying than it sounds.
You can automate changes to your downstream/upstream limits with some Python code:
import requests
QBITTORRENT_WEBUI = "http://127.0.0.1:WEBUI-PORT"
QBITTORRENT_USER = "admin"
QBITTORRENT_PASS = "PASSWORD"
def set_qbittorrent_limits(dl, ul):
r = requests.post('%s/login' % (QBITTORRENT_WEBUI,),
data={"login": "Login", "username": QBITTORRENT_USER, "password": QBITTORRENT_PASS})
assert 'SID' in r.cookies, (r.text, r.cookies)
out = requests.post('%s/command/setGlobalUpLimit' % (QBITTORRENT_WEBUI,),
cookies=r.cookies, data={"limit": str(ul * 1024)})
assert out.text == u'', out.text
out = requests.post('%s/command/setGlobalDlLimit' % (QBITTORRENT_WEBUI,),
cookies=r.cookies, data={"limit": str(dl * 1024)})
assert out.text == u'', out.text
Call set_qbittorrent_limits
with the new downstream and upstream limit, in KB/s.
bencode-to-json and json-to-bencode and fastresume-win2lin may be helpful for manipulating ~/.local/share/data/qBittorrent/BT_backup/*.fastresume
files (e.g. converting all the Windows paths to Linux paths).
I converted all of mine with
for i in *.fastresume; do cat "$i" | bencode-to-json | fastresume-win2lin | json-to-bencode > "$i.0"; done
gitk looks fine on Windows but is incredibly ugly on Linux. I switched to tig
for reviewing commits. gitg
lacked some keyboard shortcuts I needed.
foobar2000 worked incredibly well in wine-staging (I did not test wine) with one minor exception: it appeared to hang for 5-10 minutes on startup while scanning my media library with 134K tracks. This did not happen on Windows, where the main thread was unobstructed by the rescan. To fix this, in Preferences -> Media Library -> Music folders, I right-clicked on each folder and unchecked both 'Rescan on startup' and 'Monitor for changes while running'.
foobar2000 in wine-staging 1.7.54, configured to use Arial Unicode MS to make CJK characters render. foo_wave_seekbar and foo_dumb work fine as well. Note foo_wave_seekbar works only in GDI mode.
foobar2000 configured to use GTK3 theming and Noto Sans CJK SC to make CJK characters render. This font is hinted properly while Arial Unicode MS is not. Unfortunately, the GTK3 theming is unusable because it causes foobar2000 to lock up about once or twice an hour.
The first foobar2000 setup on a 4K display with wine after winecfg
tweaks: 165dpi for text and bigger scrollbars.
I had problems with VLC not scaling some of its widgets properly on a 4K display, so I switched to mpv. I made it behave a little more like VLC with this ~/.config/mpv/input.conf
:
AXIS_UP add volume 2
AXIS_DOWN add volume -2
MOUSE_BTN3 add volume 2
MOUSE_BTN4 add volume -2
[ add speed -0.1
] add speed 0.1
F11 cycle fullscreen
On Windows, I used Directory Opus' built-in image viewer, which inherits the sort order from the file manager, automatically zooms images, and allows using the mousewheel to switch images.
On Linux, after trying nomacs, eog (Eye of GNOME), eom (Eye of MATE), viewnior, and feh, I settled on feh. nomacs was unable to automatically zoom in a useful manner when going through images fullscreen. Neither eog or eom could be configured to switch images using the mousewheel, though eom seemed better for not showing a menubar when fullscreen. viewnior had a setting for making the mousewheel switch images, but it was broken. feh had none of these problems and I'm pretty happy with it.
feh's context menu doesn't expose all of its functionality, so look at man feh
. feh -Z
to automatically zoom, -F
to start fullscreen, -S mtime
to sort by mtime, and --font yudit/20 --menu-font yudit/20
to have legible fonts on a hidpi display. If you use another font, note that feh looks up fonts by filename and that you'll probably need --fontpath
.
Note that by default PgDn and PgUp move by 5% of the image set rather than to the next or previous image. I use this .config/feh/keys
to make it behave a little more like Directory Opus' viewer:
zoom_in equal
zoom_out minus
toggle_fullscreen F11 v
next_img Next Right Down
prev_img Prior Left Up
import
I found that using ImageMagick's import
5 to take screenshots caused display output to freeze for 200-400ms on my 4K display.
Taking screenshots with xwd -silent -root -screen -icmap | gm convert xwd:- out.png
resulted in no hiccups, but it got the the z-order completely wrong on many of my screenshots. For example, with multiple maximized gnome-terminal windows, the wrong gnome-terminal appeared in the screenshot.
ffmpeg has an x11grab device that works well for taking both video and single screenshots of the X screen. I wrote these scripts to take screenshots (they all output to stdout):
lossless-png-screenshot
#!/bin/sh
# apt-get install ffmpeg
resolution=$(xwininfo -root | grep -oP -- '-geometry \K([0-9]+x[0-9]+)')
# timeout 10s because ffmpeg version 2.8.6-1ubuntu2 (Ubuntu 16.04) sometimes goes into an infinite loop:
# select(1, [0], NULL, NULL, {0, 0}) = 1 (in [0], left {0, 0})
# read(0, "", 1) = 0
timeout -s KILL --foreground 10s ffmpeg -loglevel 24 -video_size "$resolution" -f x11grab \
-i "$DISPLAY" -frames:v 1 -f image2pipe -vcodec png -compression_level 100 -
lossy-png-screenshot
(outputs a dithered 256-color PNG)
#!/bin/sh
# apt-get install ffmpeg
# build pngquant from source because it needs libpng 1.6
resolution=$(xwininfo -root | grep -oP -- '-geometry \K([0-9]+x[0-9]+)')
# timeout 10s because ffmpeg version 2.8.6-1ubuntu2 (Ubuntu 16.04) sometimes goes into an infinite loop:
# select(1, [0], NULL, NULL, {0, 0}) = 1 (in [0], left {0, 0})
# read(0, "", 1) = 0
#
# -compression_level 0 is faster *and* (sometimes?) results in a smaller image after processing by pngquant
#
# --speed 3 (the default) results in smaller images than --speed 10
timeout -s KILL --foreground 10s ffmpeg -loglevel 24 -video_size "$resolution" -f x11grab \
-i "$DISPLAY" -frames:v 1 -f image2pipe -vcodec png -compression_level 0 - | pngquant --speed 3 -
lossy-jpg-screenshot
#!/bin/sh
# apt-get install ffmpeg
resolution=$(xwininfo -root | grep -oP -- '-geometry \K([0-9]+x[0-9]+)')
# timeout 10s because ffmpeg version 2.8.6-1ubuntu2 (Ubuntu 16.04) sometimes goes into an infinite loop:
# select(1, [0], NULL, NULL, {0, 0}) = 1 (in [0], left {0, 0})
# read(0, "", 1) = 0
#
# -qscale:v "Effective range for JPEG is 2-31 with 31 being the worst quality"
#
# -loglevel 16 instead of 24 to hide
# "[swscaler @ ...] deprecated pixel format used, make sure you did set range correctly"
timeout -s KILL --foreground 10s ffmpeg -loglevel 16 -video_size "$resolution" -f x11grab \
-i "$DISPLAY" -frames:v 1 -f image2pipe -vcodec mjpeg -qscale:v 10 -
Note that ffmpeg will include your mouse cursor in the screenshot.
The methods on the ffmpeg wiki result in serious frame drop issues (including the command with -preset ultrafast
) , but this stackexchange answer works.
I worked with an existing UT2004 install directory, so I did not have to install the game again.
I had some trouble with setting up UT2004 to use the native Linux binaries (though the crashes on multiplayer can perhaps be fixed by using these binaries or this install script), so I decided to use Wine to run the 32-bit UT2004.exe instead. I used wine regedit
to import a .reg file with my CDKey into the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Unreal Technology\Installed Apps]
[HKEY_LOCAL_MACHINE\SOFTWARE\Unreal Technology\Installed Apps\Unreal]
"Folder"="C:\\Games\\UT2004"
[HKEY_LOCAL_MACHINE\SOFTWARE\Unreal Technology\Installed Apps\UT2004]
"CDKey"="XXXXX-XXXXX-XXXXX-XXXXX"
"Folder"="C:\\Games\\UT2004"
"Version"="3369"
"ADMIN_RIGHTS"="You need to run this program as an administrator, not as a guest or limited user account."
"NO_DISC"="No disc in drive. Please insert the disc labelled Unreal Tournament 2004 Play Disc to continue."
"NO_DRIVE"="No CD-ROM or DVD-ROM drive detected."
"TITLEBAR"="Unreal Tournament 2004"
"WRONG_DISC"="Wrong disc in drive. Please insert the disc labelled Unreal Tournament 2004 Play Disc to continue."
"YEAR"="2004"
The game worked fine, but there was an unacceptable amount of stuttering with the Direct3D renderer, especially at the beginning of a match. I edited UT2004.ini to switch it to the OpenGL renderer6, which worked perfectly, even at 3840x2160. I played a few online matches and it worked just as well as it did on Windows.
This video describes the refinement (actually worsening) of Roboto, intended to make it more "friendly".↩
Exacerbated by the network traffic that qBittorrent generates?↩
You can take a look at its contents with sqlite3 content-prefs.sqlite .dump
↩
SecureCRT actually creates a new session inside the existing connection, which is why opening > 10 tabs requires raising MaxSessions
in /etc/ssh/sshd_config
.↩
Tested ImageMagick 6.8.9-9 Q16 x86_64 2015-08-06↩
The WineHQ page suggests another possible fix: disable GLSL Support↩