Saturday, May 29, 2010

Ati 3450 graphics and Debian Squeeze

Booting into Debian Squeeze with the Ati 3450 graphics card gave me a workable display, but one that is far from ideal.




Most Linux distributions will fall back to Vesa if they cannot determine an optimal configuration for your graphics card.

The rest of this article contains much technical detail, but if you are running Debian you might just need to know that attempting to run

apt-get install xserver-xorg-video-radeon

...should probably be replaced with the fuller command:

apt-get install xserver-xorg-video-ati xserver-xorg-video-radeon


But now for the detail....

Looking at the chipset for this Ati 3450, I get some hints in the Xorg output, that are somewhat encouraging, saying that the PCI-E card is being detected:


 A quick read on Wikipedia shows that my card is indeed based on RV620 GPU although, physically, it looks a little different



Seems to me that the problem is that my system is not choosing to use the 'radeon' driver.

So first thing is to install radeon driver:

apt-get install xserver-xorg-video-radeon

which should install on your system some driver files:


Now from reading some forum posts, some people suggest doing the following, but neither of these were of any help to me:

  • dpkg-reconfigure xserver-xorg
  • dpkg-reconfigure xserver-common

Being that my system is an unstable or testing version of Debian, my expectation is that not everything will work just right from the outset.

Now there is talk in forum about using either of the following to generate an xorg.conf which would supposedly then override systems own detection:
  • X -configure
  • Xorg -configure

Both are binaries and my results from running both commands produced identical files at /root/xorg.conf.new
...and which you can view in this web directory.

The important portion of that file is the driver line which is highlighted below:


...which looks correct.
So at this point I am able get a good radeon xorg by using the -configure option, however my system is still choosing vesa when it runs.


Notes about running X or Xorg with -configure and single user mode:

If you really want an xorg.conf file to be generated, then you will have to stop X (if it is already running), otherwise your attempt to get an xorg.conf will fail.

My way is to use Ctrl+Alt+F1 to get to a terminal, login as root, then issue

telinit 1

You might have your own way, but in any case, until you stop X (and lose graphical desktop temporarily), your X -configure command will surely fail.



xorg.conf the Debian way - should I make changes here?:

Debian /etc/ structures sometimes include a directory of pieces rather than single monolithic .conf files. This approach seems to be being adopted now for xorg.
In particular this could provide a way of overriding sections of an automatic xorg configuration.

See /usr/share/X11/xorg.conf.d


Reading up a bit regarding the use of xorg.conf.d made me wary about putting pieces in that directory for device or screen.


Review and new approach to a working 2D system using radeon driver:

Back at the beginning when I installed xserver-xorg-video-radeon, I consulted aptitude and observed the following hierarchy:

It occurred to me at the time, to install that whole bunch, but being minimalist, I just went for the radeon. Now I take the other approach...


apt-get install xserver-xorg-video-ati

which pulls in the 3 dependencies and gives a working result.

Now (after rebooting) I have a working 2D display using the radeon driver (Xorg log output is here)

What is good about this new situation is that I have 1920x1200 resolution:


...however, there is a noticeable drag delay whenever I move things about on the screen :(

Reading up I see that there is a alternate radeon driver package xserver-xorg-video-radeonhd which I installed, and so my system now has both variants installed:


...which made absolutely no difference after rebooting. Makes sense I suppose that if I have both installed on my system then the one clearly labelled 'alternate' would not be favourite :)

Having danced about a bit, let me take stock, and say that my situation is that I have a working 2D driver, but that what is missing is perhaps OpenGL acceleration.

Leads me to this diagram to illustrate where I will seek a solution next:


and issuing the following command (then rebooting):

apt-get install libdrm-radeon1 libgl1-mesa-dri

...means that I can run glxgears and glxinfo now, but the noticable drag delay still remains.


...and 500 FPS from the open source driver, does not look too shabby, so why the lag? Here is glxinfo extract:


...but having installed driconf and run the thing, it seems to think my system is not dri capable:


so I am no further along here.

Sometimes following a hunch can win you the prize, and here is what I guessed to try...Turning ON display compositing

which got rid of the lag when moving objects on screen.




So now I have exactly what I wanted at the outset - a workable 2D display for my Ati 3450 graphics card, without having to resort to non-free (proprietary) software :)

For clarity and to recap for my own benefit:

I recommend the following command for Debian Squeeze Ati 3450 systems:

apt-get install xserver-xorg-video-ati libdrm-radeon1 libgl1-mesa-dri

If your Debian Squeeze Ati 3450 system appears to have a lag, when dragging objects, then turn ON display compositing.



( Note: If you are a gamer or are seriously concerned about the 3D performance, rather than just a workable desktop, then you will probably still want to go down the fglrx route )

Wednesday, May 26, 2010

screenshooter - 'Open With' and 'Copy to Clipboard'

When taking screen shots, I tend to want to postprocess them immediately.

Maybe a quick crop, or if the screenshot is to end up on blogger, choosing the jpeg output format (see notes at foot of this posting)

This is why xfce4-screenshooter is my preferred screenshot tool


...as 'Open with' GIMP Image Editor is usually how I go about things.

Here is the menu option for xfce4-screenshooter on Ubuntu Lucid:


If you run Gnome rather than Xfce then, you will maybe, by default have Gnome screenshooter tool.


...which has 'Copy to Clipboard' in the dialog window, popping up, when you have clicked 'Take Screenshot'

Using 'Copy to Clipboard', then from within GIMP, Edit -> Paste As -> New Image ... would also get your screenshot into GIMP for post processing. Just seems a slightly roundabout way when xfce4-screenshooter does it directly.

Note: If you have both screenshot tools on your system, then you might want to 'Edit Menus' to adjust your Applications/Accessories menu to only display your favourite of the two :)


Png and Jpeg for Blogger posting and resizing:

When using blogger, i have little control over how the image is embedded in the page, other than selecting small, large, x-large, etc.

I may be that google resizing process is less than ideal for .png files. Experience suggests
to me that when using blogger jpeg images are not as badly affected by google resizing process.

Having images appearing as grainy due to prepublication resizing just looks a little sloppy, and
so until I understand more, it looks like I'll be using jpeg when posting to blogger. From the little bit
of reading that I have done, it seems that Google really does have a leaning towards jpeg rather than png when you interact with Picassa and Blogger.


Image viewers versus Image editors:

I really am in the keep image viewers as image viewers only camp, when it comes to things like Eye of Gnome, or the feature creep that makes an image viewer into an image editor/photo manager.

I recognise the desire to make things easy for the end user, but I tend to avoid Gthumb and F-Spot and things that supposedly 'manage' images, and instead select my own tools to get the job done.

Friday, May 21, 2010

Debian Squeeze printing and Samsung Laser (Splix)

When using Samsung ML-2510 with Cups and other printing systems for Linux, you will need to have the splix drivers installed.

These Splix drivers are in the repositories, and are separate to regular cups packages for the following reason:

Cheap and cheerful Lasers like Samsung ML-2510 do not use standard printer languages such as Postscript or PCL. Why Samsung have to be different is beyond me, but in any case, the solution is to install splix.

apt://splix

[ Above apt:// will take you directly to the package if you are using mozilla browser and have aptlinex (Debian) or apturl (Ubuntu) installed ]

( If you are a Mac user and find that your operating system has left you without a suitable driver after your OSX upgrade, then feel free to download the splix source or Debian .tar.gz both of which are licensed under GPL. It would be appreciated if you might remember in the future that GPL software, exists on your system, and helped your system, where your vender support proved insufficient. Enough GPL bashing please. )


Debian light desktop and ML-2510 plus 'Print to File':

On my debian desktop I prefer a light window manager (Xfce) and so I will be exploring how to setup printing without pulling in Gnome/KDE stuff where possible.

I already have xfprint4 installed but this is a frontend is not in itself enough to print, without some sort of backend/daemon such as cups.

apt-get install task-print-server splix

Now task-print-server has pulled in cups, and so a printer daemon/backend is now installed on the system.

( Older Debian systems had a package called printconf
that may have been used instead of task-print-server )

There is a further step now because this Samsung needs more than a standard cups driver - as Samsung Lasers uses Spl2 proprietary printing language.

What you are aiming for is this:


...which indicates that cups have a usable .ppd file for Samsung ML-2510.

To get to that result, you are going to have to interact with cups a little (see below) or you might try just a straight file copy should you feel adventurous.


...and choose your options...



...and setup is pretty much complete.



You might wish to have your system capable of a .pdf output directly from the printing system ( not to be confused with Mozilla browser 'print to file/pdf' )

apt-get install cups-pdf


Something to remember, is to set 'Server Default' properly, if you have several output choices on your system. That way your system knows which is your preference.

The key piece in the above screenshot is the text Server Default)

Additional information about Mozilla browser 'Print to file/pdf':

Mozilla Browser (Firefox) has it's own way of outputting .ps or .pdf files that is independent of your printer server.

( Mozilla relies on libcairo2 vector graphic library for it's 'Print to file/pdf' )

Here is a screenshot that might be familiar to anyone who uses 'Print to file/pdf' or 'Print to file/ps' from Mozilla Firefox.


To clarify further, that 'Output format' radio button choice (PDF or Postscript) is very specific to Mozilla Firefox and is not system wide.


The above crop shows a dialog portion which you will only encounter in Mozilla Firefox, and so do not expect to see that in OpenOffice or elsewhere.

OpenOffice has its own 'Export to PDF' option should you wish to go that way.


Notes and Further Reading:

I have used Mozilla Firefox and Iceweasel (Debian) interchangeably in this article as the actual package name is not an important part of this article.

Splix V 2.0.0 drivers are in Debian 7 (wheezy) and earlier release (squeeze)
The Samsung ML 2510 which I own, does not require a module that supports JBIG compression, however some of the other Samsung SPL2 printer language printers do.

There is much to read about JBIG and JBIG2 if that interests you. Some points:
Many software packages are capable if producing output to the Pdf 1.3 standard, that is one way to avoid the possibility of requiring the receiver having a Pdf reader that needs JBIG2 decompression support.