CentOS 7 - Daily papercut fixes


Updated: July 16, 2016

CentOS 7 is a really good system. It is an almost perfect choice for home use, even on dodgy modern hardware with misbehaving network, as I've shown you both in the KDE and Gnome reviews. Lovely jubbly. But perfect proper, not quite.

I had encountered some problems while setting up the distribution on the G50 laptop, mostly with the KDE environment. And I made sure to document all these little flaws and issues, and tried to resolve them. This guide is a compilation of that long, sustained attempt. Think of it as the final piece needed to tame or polish or beautify CentOS into a truly perfect desktop. While it may never be as popular as some Debian-based derivatives, in the long run, it offers a peace of mind that is unparalleled. Let us explore.

Flash plugin performance [KDE]

In no particular order, the Adobe Flash plugin is the first item on my list. Available as a separate download, you can use it to give Firefox a bit extra juice in what it can stream. But the penalty is a somewhat slow and choppy playback, especially for HD content. The solution is not what you want to hear - use Google Chrome or Chromium. You will enjoy a more streamlined experience. Get it? Stream, lined. Hi hi.

Browser choice

Volume control [KDE]

This affects the KDE version. As with most KDE tools and applets, there's a big element of overcomplication involved, and you have four separate channels to manage volume. Alas, the Fn buttons will affect the Master Channel, which could be your default playback device, but not your default playback stream. Hence the confusion. The end result is that you will not be able to mute down clips in your browser or a media player using the Fn keys, which can be annoying or even embarrassing.

KMix, volume control

The solution has two elements. Open the Mixer (KMix), by clicking on the volume button in the system area. Click on the little cogwheel in the right bottom corner, and then change the Master Channel. Under Playback Streams, select the right channel for the master volume. Best of all, this will also affect your browsers.

Playback stream

MTP support for smartphones [KDE/Gnome]

This was a difficult one, and it took me a very long time to troubleshoot. As it turns out, the combo of systemd and udev makes you wish people who write code for a living didn't have such a sway on how things should be done, but they do, and this is why debugging issues with services is no longer possible. It's a giant mess.

MTP support is horribly buggy in KDE. This is also true of the more recent Plasma framework, and we have seen the desktop utterly fail with smartphones even in the latest crop of distributions, like Kubuntu Xerus. And many others.

When I plugged in the Ubuntu Phone, I got an error telling me that a certain USB bus was not available. This spiraled into hours of reading online, mostly dozens of irrelevant entries around udev libmtp rules, trying to install a few utilities and additional libraries, but nothing seemed to work.

kernel: usb 1-2: new high-speed USB device number 15 using xhci_hcd
kernel: usb 1-2: New USB device found, idVendor=2a47, idProduct=2008
kernel: usb 1-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
kernel: usb 1-2: Product: Aquaris_E4.5
kernel: usb 1-2: Manufacturer: BQ
kernel: usb 1-2: SerialNumber: JU012044
systemd-udevd: failed to execute '/usr/lib/udev/udev-acl' 'udev-acl --action= --device=/dev/bus/usb/001/015': No such file or directory
systemd-udevd: failed to execute '/usr/lib/udev/udev-acl' 'udev-acl --action= --device=': No such file or directory

I also tried using udevadm to debug the errors, to figure out the discrepancy in the rules and whatnot, but then, I made no progress. More pointless online references and forum posts, more questions. Everyone had a completely different problem.

udevadm monitor -u
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV add /devices/pci0000:00/0000:00:14.0/usb1/1-2 (usb)
UDEV add /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0 (usb)

At this point, I decided to install the Gnome desktop, and it solved all my problems. Sometimes, solutions are quite simple. Best of all, you should not blame CentOS 7.2 for being old or something like that. It is a perfectly modern and scalable operating system, capable of handling modern challenges. It's the KDE desktop that fails miserably here.

Smartphone support

Google Chrome freezes [KDE]

Another interesting one. I found out that Google Chrome would freeze after switching to full screen and then trying to switch back while streaming media. To make it more interesting, this only happens with Flash content, and with the uBlock ad-blocking extension enabled. It is a very delicate combo.

I have not debugged this in detail, but the fix was fairly simple in my case - use Adblock instead, which also resolves the issue of blocked download buttons. Sounds like a very weird thing, but so it is, hence papercut.

Desktop extensions [Gnome]

The Gnome desktop isn't the most readily ergonomic environment in the world, and it requires extensions to make it fully usable. With the use of the Gnome Tweak Tool, I was able to sort out some of the basic elements, like the Application menu and window buttons. Then I tried installing new extensions from gnome.org, only to get a notification telling me that the Gnome framework could not be detected on my system. We have seen this bug with Fedora 23, also while trying to setup different extensions. Here, the problem is slightly bigger. The necessary plugin is not installed, and you will need to set it up before you can interact with the extensions portal.

yum install gnome-shell-browser-plugin

Default video application [Gnome]

You may decide you don't like the default media player. Indeed, I prefer VLC over Totem. However, choosing the default application in Gnome is not as straightforward as with some other desktop environments. True, you can change that Details > Default Applications, but this isn't a guaranteed fix.

Default apps

If the GUI tool does not work, you can manually fix things. First, you can change the necessary associations under ~/.local/share/applications/mimeapps.list. This is a separate tweak for every user on the system. For instance, my list includes the following:

[Added Associations]
video/mp4=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/avi=vlc.desktop;

The more radical fix is to change system-wide associations. This is done by editing the /usr/share/applications/mimeinfo.cache file, and adding the right media application as the first member in the semi-colon-delimited list.

...
text/x-lyx=lyx.desktop;
text/x-vcard=evolution.desktop;
text/xml=google-chrome.desktop;firefox.desktop;
video/avi=vlc.desktop;kde4-dragonplayer.desktop;
video/dv=vlc.desktop;
video/mp2t=vlc.desktop;
...

Last but not the least, you can also uninstall Totem - or any other player that may interfere, in case you're not keen on editing configuration files, and I won't blame you if that's the case. Things should be simple and accessible. To be continued ...

Conclusion

That's all for today. A bunch of small, innocent and possibly personal fixes that you might not like and appreciate, but they should come useful if you decide to embark on a serious day-to-day mission of using and taming CentOS. And not because it's bad and needs extra effort compared to the Ubuntus and Mints and Fedoras of this world. Because it stays put once tweaked, in a loving, predictable fashion. Something that compels me to keep on trying despite an occasional hiccup here and there. What's the word I'm looking for? Right. No regressions! That's that one! Fix once and forget about it - not dread what will happen in six months. Jolly good. These fine little tips and tricks just make the whole thing even more pleasurable.

I will expand this list as I continue exploring the CentOS 7 desktops more and more. We also have the Xfce adventure ahead of us. Truth to be told, I have never been so excited about CentOS before. Something had always been amiss. When I had modern hardware, CentOS 6 was approaching its zenith. Then CentOS 7 came about, but my laptops became outdated, and the newest box refused to boot this distro. Until now.

With the right combo of modern - on both the hardware and software side, I can finally give CentOS its full attention. And this means more games, more tweaking, and far more detail than almost any other distro attempt. It has taken the bulk of my Linux time, and I am really enjoying the experience. So you should expect more articles, more guides. One day, we might actually nail the perfect distro formula for all eternity. Stay sweet.

Cheers.

RSS Feed icon

del.icio.us del.icio.us stumbleupon stumble digg digg reddit reddit slashdot slashdot



Advertise!

Would you like to advertise your product/site on Dedoimedo?

Read more

Donate to Dedoimedo!

Do you want to
help me take early retirement? How about donating
some dinero to
Dedoimedo?

Read more

Donate