Wednesday, November 4, 2009

Enabling laptop VGA output

The following commands enable VGA output (works presumably with any XOrg driver, tested with several ATI Radeon cards). It is especially useful if you want to make your laptop work with a projector connected with a damaged or long cable.
xrandr --newmode 1024x768N 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
xrandr --addmode VGA-0 1024x768N
xrandr --output LVDS --mode 1024x768
xrandr --output VGA-0 --mode 1024x768N
The first command adds a new 1024x768 (60Hz) video mode and names it: 1024x768N. The second command assigns the video mode to the VGA port (VGA-0). While the third and fourth commands switch the LCD display (LVDS) to 1024x768 mode and the VGA port to the newly created one respectively.

Monday, November 2, 2009

HP Photosmart C4280 Cartridge Problems

If you have an HP Photosmart C4280 Printer, HP might try to rob you… on ink cartridges. If the printer displays a message:
Print cartridge(s) missing or not detected.

It doesn't mean that! You might think that the cartridge is empty or damaged. You couldn't be more WRONG! It just means that HP wants YOU to BUY a NEW CARTRIDGE - but DON'T DO THAT! You cartridge is presumably fine!

Actually you can try to convince the printer that the cartridge is ok by entering the service mode. To do that press buttons in the following sequence:

  • Power and Cancel simultanously, then
  • Blue, Green, Gray buttons, in turn.

Congrats! You entered the service mode. Now you can read and edit some of the printer settings. Watch the LCD display, it should say sth like:


Now, the color buttons mean:

  • Blue: next
  • Gray: previous
  • Green: enter

Which allow you to browse the menu and options.

In order to cure your cartridge press Blue once. You will see Information Menu displayed. Enter the menu by pressing Green. Go to Pen supply, level of Ink (LOI) submenu by pressing 11 times Blue and enter it by pressing Green. Then you can see some ink levels on the display. At this point your job is done. Press Cancel 3 times – it will quit the service mode. And you will notice that the nasty message about the cartridge being missing is gone.

Putting it all together, to reset the message press:

  • Power and Cancel simultaneously,
  • Blue, Green, Gray, in turn,
  • Blue
  • Green
  • 11 times Blue
  • Green
  • 3 times cancel.

I found these service codes on the web and accidently i figured out that viewing the ink level resets the nasty message. The drawback is that you need to reset the printer pretty much every print job.

It's been about 400 pages since I reset the thing and the cartridge is still operational despite its ink levels being reported as nonexistant.

Compiling Ubuntu 9.10 (Karmic Koala) Kernel

If you want to compile an Ubuntu linux kernel don't:
  • use make-kpg
  • use make menuconfig
To get the kernel source issue:
apt-get source linux-source

It will download a TAR archive into your working directory. Untar the archive and cd into the directory with the kernel source.

Re/Configure the kernel by issuing:

debian.master/scripts/misc/kernelconfig editconfig

It will ask you to reconfigure all kernel flavours in turn. Reconfigure the flavour you want to alter, not changing the others.

In order to build your kernel (the generic flavour) issue:

CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 skipabi=true skipmodule=true debian/rules binary-generic

After a while you should see deb packages in the parent directory.

If you want to come up with your flavour take a look at: