Monday, October 15, 2012

Some problems with Fedora 17 RC2 on RPi

A few days ago I posted, in elaborate detail, what I did to get Fedora working very nicely on the RPi.
And it does work very well.
A cold boot to the Desktop takes just 32 seconds and shutdown (using "sudo shutdown now") takes just 2 seconds.

However, there are a few little problems which I promised to explain in the post above.

Time Display:

First, although I have set up ntp server checking at boot, occasionally, the wrong time shows up on boot.
Now, I bet this is an easy one to solve but for the moment I took the easy way out and set up a keyboard shortcut and assigned Super-l to

exo-open --launch TerminalEmulator "sudo ntpdate"

So, should I spot an incorrect time after booting, I need do no more than press Super-l to immediately correct the time.
Indeed, I could probably create a script to run this command always at boot to ensure that I never had an incorrect time problem.
Then again, isn't that what's supposed to happen anyway?

Speaking of time, I like to see, not just the hours and minutes of the present time in the xfce panel, but also the seconds, the date and the day.
To get this, right-click on the clock in the panel and choose Properties.
Now in Clock Options, select Custom Format from the Format Dropdown and replace %R with %c in the box below it.
Then just Close.


To get sound on Fedora 17, you must load the appropriate module with
$ sudo modprobe snd_bcm2835

Run lsmod to make sure it has been successfully loaded.

Now you can play some music. I used the qmmp media player which is available in the repos.
Some comments about this player are provided in this forum thread.
It seems that, for the moment at least, qmmp doesn't play mp3 files. However, it handles other common file formats such as .flac and .ogg.

You can play straight from  a terminal using
$ qmmp /path/to/file/music.flac
Now the sound quality is not great and is just about tolerable.
Note that you absolutely MUST switch off the graphics equalizer as not doing so make a bad sound many times worse.
But, at least sound works.

However, I haven't yet found out how to get the sound module to load at boot. Earlier versions of Fedora added the required modules to /etc/modules.conf but this is now deprecated.
What has taken its place is still a mystery to me.
So, undaunted, I've made a Keyboard shortcut
sudo modprobe snd_bcm2835
and assigned it to Super-s which allows me to very quickly load the module whenever I'm in the mood for some sound.


I use Conky in all of my Linux OSes as well as in FreeBSD.
Here's my post on Conky in Debian on the RPi.
A Desktop just doesn't seem complete without it, so of course, I installed it on Fedora on the RPi.

Recently, as I describe here, I've set up a color-coded version of Conky which allows me to see at a glance which parameters are moving into an unhealthy zone from the colors of their presentation in Conky.
The predominant color in Conky is white or grey/silver for essentially static features while operational variables are color-coded to show in green in a "safe" zone, yellow when slightly above the "safe" area and red when they have moved into the danger zone.

This screenshot shows how I want Conky to look (this is from Ubuntu on my Desktop machine).

However, what I originally had in Fedora on the RPi was as is shown in the second screenshot.
As can be seen, the colors of the Conky output are very different.
Yet, no deliberate change was made to the color-scheme.
So what could be the reason.

Well, it turns out the answers lies in the "own window options" secion of the Conky configuration file (~/.conkyrc).
I always insist on the Conky window being transparent so that I can see the background wallpaper underneath. However, as explained in Q6 of the Conky FAQ, this is not a real transparency.

The "own window options" that I've used successfully in the .conkyrc for all of the RPi OSes where I'ved installed Conky (Debian, Raspian, Arch) is as follows:

# own window options
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_page

But in Fedora, which uses the xfce4.8 DE, this designation does not give a transparent window but one with a rather ugly black background.

To get transparency in xfce, as explained in this thread, you must first enable compositing (Applications Menu > Settings > Window Manager Tweaks >Compositor tab and check the Enable Display Compositing box) and then modify the "own window options" section of ~/.conkyrc to

# own window options
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_page
own_window_argb_visual yes
own_window_argb_value  0

This worked well in that the Conky window was now fully transparent.
However, the color designations had changed very considerably.
So Red now showed as Green, Blue showed as Black, White showed as Light Blue as examples.

So, what's going on here?

After much googling and reading of forum threads and basic experimentation trying out many variants in the "own window options" section, I finally stumbled on a version of the "own window options" that gives both a transparent Conky window and undistorted colors.
It seems that the line own_window_argb_visual yes interferes somehow with Conky's own colors.
So, this is the "own window options" that works for me:

# own window options
own_window no
own_window_transparent yes
own_window_type desktop

which, as you can see, is very much simplified.
The Conky I get in Fedora 17 RC2 is shown in this screenshot which is exactly as I wanted it.

Another problem solved?
Well, almost.
If you take a closer look at the last screenshot, you may notice there are no icons on the Desktop.
In Applications Menus > Settings > Desktop, I have checked three icons to appear (Home, Filesystem and Trash), but they don't.
Strangely, the Home icon does make a brief appearance now and again.
For example, if I press Super-r, Home appears for about 10 seconds before disappearing again.

I have no idea how to resolve this and, truly, I'm not very worried about it as I try not to use Desktop icons and rely more on the keyboard.
Nevertheless, it's at times convenient to see what's on your Desktop without having to open a terminal to find out.

Edit (16/10/2012):
On the subject of the missing icons and Conky transparency, I did a little searching.
No, the problem is not resolved but I know a little more about it.
First, I came across this thread that addresses almost exactly my problem with Conky and the missing Desktop icons.
Changing the "own window options" section of ~/.conkyrc to

own_window yes
own_window_class Conky
own_window_hints undecorated,below,above,sticky,skip_taskbar,skip_pager
own_window_type desktop
own_window_transparent yes
own_window_argb_visual yes

will resolve the issue.
Well, yes the icons come back and the Conky window is completely transparent.
But, the line
own_window_argb_visual yes
as before, completely messes up the text color in Conky.

However, I did discover two items of interest and both are mildly positive.

1. Eliminating the "own window options" section completely from ~/.conkyrc still gives the same transparent conky window with perfect colors.
Of course, the Desktop icons are still missing

2. Well, the truth is that the icons are not exactly missing. They're still there on the Desktop. Mousing over the icons makes them visible, and usable, again.
They remain visible, however, only until the next Conky update (or refresh).
Because Conky is somewhat heavy on resources, I changed the update_interval from 1 second to 5 seconds.
Therefore, I can get the icons to remain visible for up to 5 seconds.

In truth, I'll settle for this as I don't really need or use the icons.

No comments:

Post a Comment