Optimal configuration

2010 October 21

Dual head with rotation with an nvidia graphics card on Debian Linux

Filed under: dualhead,linux,nouveau,nvidia,x11,xorg — Eric Fraga @ 16:16

I recently acquired a second display for my main system. I have been using a dual head system for a while but I now had two monitors which could change orientation. I decided it might be quite nice to have both of them in a portrait orientation as the majority of my work is either writing or coding. I would rather have more lines in my Emacs windows than more columns. I usually have auto-fill turned on and I also typically try to ensure that my coding limits itself to 80-100 columns at most.

However, when using the nv driver that is available in the Xorg system, I found that I could get dual head support but I could not manage to get xrandr to rotate the orientation for either screen. After a while searching, and trying a few of the options, it became clear to me that I was not going to manage to get nv to do what I wanted. At this point, I decided to explore the nouveau driver as I did not want to resort to the non-free nvidia driver that was also available.

nouveau seemed, from the documentation, to provide the features I wanted. However, this didn’t work at all out of the box, generating errors about drm cards, errors like this:

drmOpenDevice: node name is /dev/dri/card0
drmOpenByBusid: drmOpenMinor returns -1

After some searching on the web, I came across this page which pointed me in the right direction. It suggests updating libdrm but I already had the most up to date version. It also suggests, however, removing any traces of the proprietary nvidia driver. This did the trick! I did have to reboot after purging all evidence of that driver, and kernel modules etc, but I now have a dual rotated head system which is a joy to use!

2010 March 22

Installing Debian Linux on a Samsung N220

Filed under: linux — Eric Fraga @ 14:34

2010-03-22 Mon

Recently, I had to buy a new laptop for giving presentations. The laptop I ended up with is a Samsung N220, a netbook (although not a netbook as was as these latest netbooks are really the same size as some old laptops I’ve owned in the past…) with a very snazzy skin. I got the red one.

Anyway, this laptop came with an operating system I find no use for, even if it’s now in version 7, so the first thing I did was try the most recent Ubuntu release. I find that this is usually a good test of what is possible with new hardware. In this case, everything seemed to go quite nicely, including sound and being able to suspend to RAM.

However, I prefer having Debian on my systems. For new hardware, it’s usually best to go with the testing version as the drivers will be more up to date. The current testing version is known as squeeze. I downloaded the necessary files and prepared a USB disk using unetbootin. I booted the system after having setup the bios to allow booting from USB.

Almost everything worked out of the box. A few things did not work:

wireless
to get wireless working on my system, I noticed from dmesg that the card was being recognised. The card is a Realtek 8192 and the driver is r8192_pci. However, this driver needs firmware that is not distributed by Debian. I downloaded the firmware from links given in a thread on linuxquestions.org. Placed the files in /usr/local/lib/firmware/, rebooted and everything worked fine.

However, I believe that there may be some problems with the driver which make the wireless not function correctly after suspend to ram, although not always. I’m still investigating this.

screen brightness
the next problem was that the screen was quite dim and the keys for changing the brightness level (see next item) did not work. Some searching on the Web led me to the following magical incantation for setting the brightness:

     setpci -s 00:02.0 F4.B=xx

where xx is the level in hexadecimal with values between 00 (no backlighting) and ff (full light). I find that a value around 60 works quite well.

There is a script for making this easier to use.

hot keys
Most of the blue keys, meant to be used with Fn key, do not work out of the box. Two of them do: the suspend (top left on my keyboard) and the toggle for the touchpad (F10, again on my keyboard). The others do nothing at all. This page describes show to assign keycodes to these special function keys. Once keycodes have been assigned, you can then use whatever system your window or desktop manager of choice provides for binding these keys to desired commands. I use ratpoison which provides a very simple definekey command for this purpose.

Create a free website or blog at WordPress.com.