2013-08-31

HOWTO: configure the OS to use a 100 Hz refresh capable CRT monitor in Linux

  • Test environment.
    • Hardware
      • Monitor: Samsung SyncMaster 959NF
        • Test display resolution: 1024 * 768 @ 100 Hz
      • Video card: based on Nvidia GeForce2 MX400
        $ lspci | grep -i nvidia
        01:00.0 VGA compatible controller: NVIDIA Corporation NV11 [GeForce2 MX/MX 400] (rev b2)
      • CPU: x86-compatible (some old AMD Athlon one)
    • Software
      • OS: Debian GNU/Linux 7.0 "Wheezy" / i386
      • Video driver: nouveau
  • X11 graphical mode configuration.
    1. Use cvt utility to generate a modeline for X11:
      $ cvt 1024 768 100
      # 1024x768 99.97 Hz (CVT) hsync: 81.58 kHz; pclk: 112.25 MHz
      Modeline "1024x768_100.00"  112.25  1024 1096 1200 1376  768 771 775 816 -hsync +vsync
      
      Note: 100 Hz is a non-standard refresh rate for CVT.
      If CVT timings don't work for some ancient monitor, you can also try to use gtf utility to generate somewhat older GTF timings:
      $ gtf 1024 768 100
      
        # 1024x768 @ 100.00 Hz (GTF) hsync: 81.40 kHz; pclk: 113.31 MHz
        Modeline "1024x768_100.00"  113.31  1024 1096 1208 1392  768 769 772 814  -HSync +Vsync
      
      
      Both cvt & gtf utilities are part of xserver-xorg-core Debian package.
    2. Change X11 settings by putting the generated modeline into the proper section of the /etc/X11/xorg.conf file:
      Section "Monitor"
          Identifier     "Monitor0"
          VendorName     "Samsung"
          ModelName      "SyncMaster"
          HorizSync       30.0 - 110.0
          VertRefresh     50.0 - 160.0
          Option         "DPMS" "true"
          Modeline       "1024x768_100.00"  112.25  1024 1096 1200 1376  768 771 775 816 -hsync +vsync
      EndSection
      
      Section "Screen"
          Identifier     "Screen0"
          Monitor        "Monitor0"
          DefaultDepth    24
          SubSection     "Display"
              Depth       24
              Modes      "1024x768_100.00"
          EndSubSection
      EndSection
    3. Restart the X server for updated configuration to take effect.
  • Here are the sample settings for non-X11 user interfaces, put into /etc/default/grub (the GRUB2 config).
    For modified settings to make effect, don't forget to execute update-grub2 as superuser and then reboot.
    ...
    GRUB_CMDLINE_LINUX="video=VGA-1:1024x768M@100"
    ...
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    GRUB_GFXMODE=1024x768
    ...
    Notes:
    1. The Linux command line option mentioned aboves allows to set a desirable video mode for virtual console using kernel mode setting (KMS).
      There's more info about KMS settings on nouveau Wiki.
    2. Display refresh rate doesn't seem to be specifiable for GRUB bootloader graphical mode. This initial graphic mode depends heavily on VBE.
    3. Other caveats: video play in console framebuffer (i. e., using mplayer) has not seemed to work for me in this test setup.

See also:

2013-08-04

HOWTO: get a high-quality image from an eBay listing

Well, sometimes you can find an interesting item on eBay, and then you want to take a nice look at the photos. Unfortunately, the pictures are often displayed in a low resolution (and without a "zoom in" option). Luckily, often you still have a chance to get good quality images (with resolutions up to 1600 * 1200; it depends on the original quality of the picture the seller has uploaded).

Notes. The sites are in process of migration to HTTPS, so you'll often see image URLs beginning with "https://" instead of plain "http://". And it should work for all regional eBay sites (i. e., ebay.com, ebay.co.uk, ebay.de etc.), and also for "eBay Kleinanzeigen" (German eBay classified ads site).
  1. An old image URL style.
    1. First of all, copy an URL of the needed image; you'll get something like this:
      http://i.ebayimg.com/t/Some-nice-item-For-sale-/00/s/S0mE-W1LD/$GaRb4gE~~60_12.JPG
    2. Then you'll need to modify the URL a little; just replace the last number found in the URL (it's preceded by a '_' and followed by a '.'; in this sample, it's "12") with "10":
      http://i.ebayimg.com/t/Some-nice-item-For-sale-/00/s/S0mE-W1LD/$GaRb4gE~~60_10.JPG
      or with "57" (I don't know what's actually better):
      http://i.ebayimg.com/t/Some-nice-item-For-sale-/00/s/S0mE-W1LD/$GaRb4gE~~60_57.JPG
    3. Just paste the modified image URL into your browser's address bar and enjoy!
  2. A new image URL style. The method remains similar.
    1. Get an image URL:
      http://i.ebayimg.com/images/g/GaRbaG3/s-l64.jpg
    2. Change the appropriate URL fragment to "1600":
      http://i.ebayimg.com/images/g/GaRbaG3/s-l1600.jpg
    3. ...
    4. Done!

References:
  1. getProductDetails : thumbnail How can I get high resolution picture of catalogued item. - eBay Developer Support / Customer Help
  2. getProductDetails - API Reference - Product API - eBay Developers Program
---
Last updated: 2017-03-14