Suramya's Blog

Visit suramya.com Who am I?

August 5, 2012

Reinstall Status: 2 days later

Filed under: My Life — Suramya @ 11:59 PM

Most of the system is back to normal and is configured the way I like. However still having some problems with installing certain programs like Citrix. Basically it looks like the 32 bit version of the ia32-libs library is broken in Debian Unstable and they are expecting a fix any day now. However till its fixed it looks like I can’t install the Citrix client which is required for my work. Guess I will be using the Raspberry Pi to connect to office system till the fix is here.

Other than that, there is a slight issue with static when I skip ahead in a video, i.e. I get a lot of static on the soundtrack if I fastforward the currently playing music/video. Sounds like it could be a driver issue.

During this entire process I realized that running a 32 bit OS is a lot less work than a 64 bit OS esp if you are running on Debian unstable since in the unstable branch a lot of the 64 bit packages are broken at this time thanks to the above mentioned library.

I am debating if I should go back to the 32 bit version. Will decide in a couple of days after doing a bit more research on the topic. I might be getting a SSD in the near future so will have to reinstall any ways once that comes in and depending on my mood then I will choose 64bit or 32 bit. Not really eager to get an SSD when for a little bit more I can get a 2-3 TB drive but Krishna, Sid and Anil have done their level best to convince me of the advantages so thinking about it quite seriously.

Well this is all for now. Should go to sleep now since I have an early start tomorrow and today has been a long day. Will post more later.

– Suramya

August 4, 2012

Reinstalled system after accidental removal of KDE. Pleasantly surprised by ease of configuration

Filed under: Computer Tips,Knowledgebase,Linux/Unix Related,Techie Stuff — Suramya @ 11:19 PM

Last night I was trying out stuff on my computer and decided to install virtual box on the system to allow me to install Windows in a virtual environment. I ran the command to install virtual box and then said ok without paying too much attention to what it was doing. As a punishment for that, the apt-get program proceeded to uninstall most of the KDE environment on the system leaving me with Gnome as my primary desktop (and there is no way I am using Gnome as my primary desktop). I could have fixed it by reinstalling KDE but since I had been thinking about removing the 32 bit Debian and installing the 64 bit version I decided to use this opportunity to do so and downloaded the 64 bit version from the Debian site, put it on a USB drive and proceeded with the install which took about an hour to complete.

After the install completed, I upgraded the system to the latest ‘Unstable’ build (Debian Unstable has the latest software packages so I prefer using it as opposed to Stable which is rock solid but has fairly dated software versions.) which took most of the night thanks to the no of packages to download and install. Once everything was upgraded I started customizing my setup and initially was dreading the amount of time it would take to get both my monitors working (based on previous experience) but surprisingly this time I didn’t have to do a lot to get both the monitor’s working.

If you remember, the last time I tried enabling the second monitor I hit a lot of hurdles mostly thanks to the mess I had made with my previous meddling and experimentation but this time it was fairly simple. I thought that I would follow the same steps I had the last time I installed the monitor so I started by installing the fglrx driver but the latest version of the driver no longer supports my chipset (ATI RS880 [Radeon HD 4250]) and the installer told me to install the free Radeon driver in the package xserver-xorg-video-radeon instead. So I did that after purging the fglrx driver (See here for instructions). I also had to install the Firmware for the Radeon card which I did by issuing the following command:

apt-get install firmware-linux-nonfree

After the driver was installed I rebooted (to make sure all systems started up clean) and setup my dual monitors by following these steps:

  • Click on Start -> System Settings
  • Click on ‘Display and Monitor’ under Hardware.
  • Under ‘Size & Orientation’ change the ‘Position’ dropdown to ‘Left Of’ the first (If your second monitor is to the left of the first one)
  • Set the Primary output to the monitor where you want the Task bar etc to show up. If you don’t know which monitor is which, click on the identify Outputs button.
  • Once you are done, Click on ‘Apply’ and if all looks good you can set it as default by clicking on the ‘Save as Default button’.

If you are ok with the resolutions available to you in the dropdowns above then you are done and you can skip the steps below.

Unfortunately for me I wanted a resolution of 1440×900 as the default instead of 1600×900 which was too small & the fonts looked pretty bad at that resolution and the 1280×1024 which was the next available size looked worse because my of my monitor shape (16:9 resolution as opposed to 4:3). So I had to do a bit more work to fix the problem.

First I tried manually setting the mode to 1440×900 using xrandr but I got an error message that “xrandr ‘cannot find mode'”. So I did a little Google search and found a forum post where another person was having the same issue. That link told me how to add a custom mode to my system which I did using the following steps:

First we need to figure out if our configuration will support the mode we are trying to use and if so get the modeline we need for the new config, so we run this command:

cvt 1440 900

If the system can support the resolution specified (1440×900 in the above example) it will return a line that looks something like:

# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

Luckily for us my system can support the resolution so we then need to tell xrandr about the new mode using the following command:

xrandr --newmode "1440x900"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync 

Where the first paramter (“1440×900″ in this case) is an identifier and the rest is the information returned by cvt. (If successful the command will return no output.)

Then we need to tell the system that both the displays (called DVI-0 and VGA-0 on my system) should use the new mode which is accomplished using the following commands:

xrandr --addmode VGA-0  "1440x900"
xrandr --output VGA-0 --mode 1440x900
xrandr --addmode DVI-0  "1440x900"
xrandr --output DVI-0 --mode 1440x900

If the commands were successful then your screen should resize and start using the new resolution. Now that this is done we want this to happen everytime we log in without having to run the commands manually.

When you click on the ‘Save as Default’ button in the ‘Size & Orientation’ dialog box, KDE saves your settings in a file at the following location: ~/.kde/share/config/krandrrc that is executed everytime you log in to KDE. So to make the changes permanent we have to modify the file with the new settings.

The file contains the following lines right at the top:

[Display]
ApplyOnStartup=true
StartupCommands= 

We need to modify the StartupCommands= line to use our new settings. Basically it should contain all the commands we used above in a single line delimited by \n. On my system the file looks like the following after I updated it:

[Display]
ApplyOnStartup=true
StartupCommands=xrandr --newmode "1440x900"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync\nxrandr --addmode DVI-0  "1440x900"\nxrandr --addmode VGA-0
  "1440x900"\nxrandr --output VGA-0 --pos 1450x0 --mode 1440x900 --refresh 59.9782\nxrandr --output DVI-0 --pos 0x0 --mode 1440x900 --refresh 59.9782\nxrandr 
--output DVI-0 --primary

Once you make the change, save the file and log out. After loging out I usually restart X to make sure everything came up cleanly and then if all went well then the changes should take effect after you log in.

Hope others find this useful when configuring their systems.

– Suramya

PS: The best part is that after re-formating and using the Opensource version of the display driver instead of the proprietary one, my average memory usage went down from about 3GB about 1GB with all the same programs running in the background. :)

Powered by WordPress