Sunday, March 17, 2013

Picuntu XFCE problems' fixes

I'll use this blogpost as a kind of FAQ, including all the troubles & solutions I've found while using my Measy U2C RK3066 stick as a second PC with Picuntu 0.9 RC3 installed (with Xubuntu's XFCE).


Slow system


Get a Class 10 microSD card! :)
Seriously, it feels faster than a netbook.



Changing Default Language (only English installed)


To change the XFCE language it is necessary to do the following (this examples are for Spanish language, es_ES, change it to your language of preference):
sudo apt-get install language-pack-es
sudo locale-gen es_ES
dpkg-reconfigure locales 
If you now go to XFCE's System Settings and choose Language Support, you should see and be able to drag your language of preference to the top of the list. Changes happen after logging out and back in.

To change the keyboard layout language you may have to modify the following file:
/etc/default/keyboard
which defaults to an US keyboard. I had to set:

XKBMODEL="pc105"
XKBLAYOUT="es"
XKBVARIANT="deadtilde"
XKBRULES="xorg"
Or you may have to do this: create folder /etc/X11/xorg.conf.d and then
sudo cp /usr/share/X11/xorg.conf.d/10-evdev.conf X11/xorg.conf.d/10-evdev.conf
and edit, below: Identifier "evdev keyboard catchall"
add:

        Option "XkbLayout" "es"
        Option "XkbVariant" "deadtilde"
        Option "XkbRules" "xorg"




Reference:



Getting Parole to play videos (Gstreamer backend error)


I tried to play an mp4 file but Parole (the default video player) complained saying
"Gstreamer backend error. Configured videosink video is not working"

Solve it forever by opening, once, a terminal and writing:
parole --xv false
Note the two hyphens. From now on, opening any video should work, even after rebooting.

Reference:

Additionally you will find that the Home folder is empty, whereas usual Ubuntu distros do already contain several folders to classify your digital life (Downloads, Documents, Images, Music, etc.).
Solution is to manually create your own language's folders and then edit the file:
~/.config/user-dirs.locale
change en_US for your locale (for Spanish it's es_ES)
and then edit the file
~/.config/user-dirs.dirs
to point every variable to the right folder. For instance:
XDG_DESKTOP_DIR="$HOME/Escritorio"
XDG_DOWNLOAD_DIR="$HOME/Descargas"
and so on with the eight variables. Then run the following command:
xdg-user-dirs-update
Log out and back in and you should see the desktop containing only the files/shortcuts in folder "~/Escritorio" (or however "Desktop" is said in your language) and the rest of home folders with a nice icon.

Reference:



Missing last lines after first boot (before installing XFCE/Gnome)


The Linux prompt looks the usual 80x24 size, but I am missing the bottom lines once I get past the last line shown in screen. If you want to check if you have this issue, type:
find /.
and see if you are missing the cursor when it finishes listing.

You should also check your monitor's OSD to see what resolution is being displayed. In my case it was 1280x720 (also called 720p or just HD), whereas the kernel I had installed was 1920x1080 (also 1080p or FullHD). The incomprehensible thing is that my monitor is perfectly able (and so it shows in its EDID and normal PC use) of the typical HDTV 1080p60 mode.

I am skimming through the RK HDMI kernel code but I believe it has something to do with the way the EDID's CEA timings are read (TBC), since it also happens when booting into Android.

In any case, if you want to get rid of this problem and be able to properly run the script picuntu-da-server.sh, you can fix it by typing:
fbset -move up
Another way to get past this is to flash Picuntu's 720p kernel.


UPDATE: this is indeed a kernel bug, for the patch see http://hwswbits.blogspot.com.es/2013/03/bugfix-for-wrong-monitor-resolution-in.html




Reference:



Avoid kinteractiveup error in syslog


Add to /etc/rc.local the line:
echo 0 > /proc/sys/kernel/hung_task_timeout_secs
This avoids several syslog error lines about kinteractiveup task every 120 seconds.



32bpp screen instead of 16bpp (background color stripes)


Add to /etc/rc.local the lines:
echo 32 > /sys/devices/platform/rk-fb/graphics/fb0/bits_per_pixel
fbset -rgba 8/16,8/8,8/0,8/24 -a
Works for 1080p as well as 720p kernels.



For Measy U2C permanently remove module 8188eu


To avoid the 8188eu wireless driver module from being uselessly loaded at boot time (since that's not the Wifi chip on this stick), comment out (by preceding with a #) the line "8188eu" in /etc/modules as root:
sudo leafpad /etc/modules


XFCE Shutdown button just restarts the stick


If you click on the shutdown button but the stick just restarts, instead of powering off after shutting down, this is due to the command used by ConsoleKit (the dbus way used by XFCE to restart/shutdown), to solve it you have to modify the shutdown script (I had to Google hard to find this solution!).

Open a terminal and write:
sudo leafpad /usr/lib/ConsoleKit/scripts/ck-system-stop
and in the two places where it says "shutdown -h" change for "shutdown -H" (uppercase the h). This small difference instructs the system to halt after being brought down.

Actually the lowercase "h" lets the system choose between halting or powering off; however the system currently makes the wrong choice, and that's why we have to force it to halt. Probably something that could be fixed somewhere in the kernel code.

Reference:
http://unix.stackexchange.com/questions/30726/how-to-shutdown-with-consolekit-without-sysvinit-but-with-systemd



System deadlocks upon a few apps open


This happened to me, the system was completely unresponsive, not even letting me move the mouse and was caused by lack of free RAM. After more than 10 minutes of wait I had to take the power off.

Since filling the RAM is not so difficult, and there is no swap by default, the best solution is to create a swap file into the SD card (no need for repartitioning, it's just a file).

The best guide, and also a very simple one, to quickly add a swap file into the SD card is this one:
http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/



Can not change english language in Chromium 


There is a version mismatch in the Ubuntu Software Center. It installs Chromium version 22.0.1229.94, whereas the languages pack (chromium-browser-l10n) requires Chromium version 25.something.

The solution is to install the 22.0.... language pack from launchpad's repository, here:
http://launchpadlibrarian.net/119854807/chromium-browser-l10n_22.0.1229.94~r161065-0ubuntu1_all.deb



Change default CPU governor


If you installed the useful cpufreq-utils then most probably your boot up CPU governor is ondemand. If you would like to change it, just edit the top part of its configuration files, specifically the "GOVERNOR" variable, with:

sudo leafpad /etc/init.d/cpufrequtils


Forcing system time update

If network is not initialized fast enough during boot, you may find at times that the system time is "Jan 1st" and may take a long while to get the correct date, causing problems when trying to access secure sites (certificate not yet valid!).

I made a quick script that forces an immediate update of the system time (through the NTP, network time protocol), containing these two lines:

sudo /etc/init.d/ntp stop
sudo ntpdate pool.ntp.org
Within seconds the clock at XFCE's upper right should get the correct date too.



No comments:

Post a Comment