Wednesday, May 18, 2011

ATI - Catalyst Drivers with Akmod + Watermark Removal

As many know ATI support is not the greatest on Linux, well at least not as far along as Nvidia support, so it can sometimes be tricky getting your ATI drivers to function especially if they are of the HD Mobile chipset variety.
 I have an Asus K52JT model laptop, it's an affordable and well performing I7 but it did come with one price, it has a HD6370M gfx card. It's not a bad card but for a Fedora user it presents a challenge. The following is the walkthrough of the steps to install akmod and remove the pesky Unsupported Hardware watermark that may appear.

Open a terminal and SU to root next issue: yum install akmod-catalyst
*After install the drivers reboot the system

Upon booting up, you may notice a Small Watermark to the bottom right of the screen which reads:
AMD
Unsupported Hardware
This watermark tends to show up when the graphics drivers installed do not want to play nice with your hardware, essentially thinking it's not installed though it is. This is not a problem, to test and make sure that the drivers are indeed working perform the following:


Open a terminal SU to root and issue: glxgears
*Note you should see some FPS rates being generated, this means your gfx drivers are installed and functioning
After ensuring the graphics drivers are functioning it's time to remove the watermark. I found a script to do so posted here, and after some minor modification for my system it ran successfully and removed the watermark.
Create the following script

#!/bin/sh
DRIVER=/usr/lib64/xorg/modules/drivers/fglrx_drv.so
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER
done


The original source can be found here. I had to modify the top line to lib64 from lib, the best way to check if you need to would be to search for that fglrx_drv.so find its directory and change the top line as per your situation.


Execute the script, and reboot. Upon boot you should no longer have the watermark problem :-)

Thanks for reading, Stay tuned.

Tuesday, May 17, 2011

PandaBoard - XSession with Firefox On F13beta3

Welcome,

The following is a walk through on how to install graphics drivers, xorg and firefox, on a panda board running Fedora-Arm 13 beta3 release, and configure it to open an X session with Firefox to display a desired page on boot. For CDOT purposes it displays a Status Dashboard web page on an external monitor.

1. Boot up your pandaboard and login

2. Issue command yum install xorg*

This installs all available, fonts, and other things needed for X to function, without a desktop environment, essentially just XSERVER.

* The specific driver in use is omapfb, and is available in the cdot fedora-arm repo's. If you wish to specify solely the xorg base system and single driver you can.

Optional: If you want you can install a Window manager, I did for testing purposes as it was annoying not being able to close more move windows. I used icewm, installed with yum install icewm. But you can use any window manager it's your choice.

3. vi /etc/X11/xorg.conf and add the following:

Section "ServerFlags"
   Option "IgnoreABI" "True"
EndSection

Section "Device"
    Identifier "Card"
    Driver "omapfb"
EndSection

Section "Screen"
 Identifier "Screen0"
 Device  "Card0"
 Monitor "Monitor0"
 Subsection "Display"
  Depth   24
  Modes "1024x768"
 EndSubsection
 Subsection "Display"
  Depth   32
  Modes "1024x768"
 EndSubsection
EndSection

* You can edit the Modes as you wish depending on the monitor size you have and what you prefer.

4. Reboot the system

5. Next install firefox the latest for arm being 3.6: yum install firefox

6. Next for a quick test of X and firefox issue the following:

export DISPLAY=:0

xinit /usr/bin/firefox http://www.google.ca &  <--This should open display :0 with a terminal and a firefox window.

7. Getting the window to display on boot will require two things, the first being a javascript html file, which I found easiest for my purposes and should be just fine for any other instance. The scripts to do this were written for me by Jon Chiappetta, they are displayed here.

Once you have created the popup.html file you can begin to write a service for your Dashboard to start on boot.

8. First create a service script file, to boot the Xdisplay and firefox on boot

vi /etc/init.d/servicename <--pick a name...any name

Add the following to the file

#!/bin/sh
#
# CDOT-Service Status notification daemon #<-- Change this to reflect your service info
#
# Author:       Fedora_Arm team #<-- Change this to reflect your authors name
#
# chkconfig: 2345 98 20
#
# description:  This is the status board service \   #<-- edit the description as you desire.
#               For CDOT Dashboard
# processname:  zdotstats #<-- Match your service name, so it is easy to identify in the process list
#
RETVAL=0;
start() {
echo "Starting YourService"
export DISPLAY=:0
#We login as root, as it is the only user we have on the machine, and nothing critical is hosted.
export USER=root
export HOME=/root
xinit &
killall firefox
rm -f /root/.mozilla/firefox/i7l6qmmk.default/sessionstore*
/usr/bin/firefox http://yourhost.com/popup.html &
}

stop() {
echo "Stopping your service"
pkill xinit
}

restart() {
pkill xinit
/usr/bin/xinit &
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac

exit $RETVAL

9. Issue command: chkconfig --add servicename
           chkconfig servicename on

* This will add your service to the list of services and turn it on for all run levels, if you want you can specify using the --levels option.

10. Test the service with command: service servicename start
If all is well, your x session should start and open your popup page in firefox automatically.

11. Finally reboot your system, and if all is in good order your X session should start and open firefox to your popup page on boot.