Debian Lenny on Samsung X22

The laptop

My new laptop is Samsung X22. I like its serious, almost ascetic look. The screen is matte, not glossy. The weight is just within my requirements: 2.18 kg (unfortunately, an AC adapter is bulky). What's more, the laptop came without Vista. I don't mind having WinXP Pro around just in case I need to do test some software on Windows (or to play games). The keyboard is big and very similar to the one of my previous laptop (only Ctrl and Fn are swapped). Nice things to have: 1.3 MP webcam and SD/MS/xD card reader (I have some xD cards, but many embedded card readers don't support them). On the flip side: the laptop is rather big (14"), it is not water-shock-whatever-proof, the screen is only 1280×800 and its viewing angle is relatively narrow, and the battery life is short. Bonus: Bluetooth, ExpressCard slot, HDMI, optical drive.

This is the first time I bought a laptop with discrete graphics (Ati Radeon HD2400 aka RV610). The open source driver does support 3D only in experimental branches, but since I don't need 3D right now and AMD/Ati was kind enough to release the specs, some code and programming guide, I hope this card will have good open source drivers in the future. Anyway, with Intel I could not use 3D neither :)

Hardware: lspci, lsusb and dmidecode.


I used netinst image of Debian Lenny (5.0.1) and installed from a USB pen drive. This was the first time I tried Debian graphic installer. Well, I liked it. Probably, partition editor was not very GUI-sh, but it's OK. I installed i386 kernel.

The installer asked me for iwlwifi proprietary firmware (I didn't have one nor didn't put it on the installation pendrive). So, I installed from ethernet. Installation was smooth.



I installed firmware-iwlwifi package, and the wireless now works perfectly. For convenience, I replaced network-manager with wicd. I like it more.


Some Fn-combos don't work. Most notably: Fn+(F2|F4|F5|F8|F9|F10|Up|Down). These keys don't produce any xev keycode. Among features which are not available are manual brightness (Fn+Up/Fn+Down) and wireless switch (Fn+F9).

I found a kernel bug (almost resolved) with another Samsung model: #12021, and another similar Debian bug #475851 with Samsung Q45. After reading through it, I managed to enable brightness buttons with

$ sudo setkeycodes e008 225 e009 224

Finally, after a small patch to hal-info, all the keys work (at least, generate xev codes).

Good news: sleep button, mute and volume buttons work out of the box.


radeon driver in Debian Lenny is working OK (2D), but XVideo is not enabled by default, so probably I have to try a newer kernel or rebiuld the driver. Up-to-date version claims to support XVideo.

Proprietary Ati driver (fglrx) works too; (hint: enable non-free repository and install fglrx-driver, run aticonfig).

I tried also newer radeon driver from the unstable (since 6.12 radeon supports video and 2D acceleration on R6xx). In fact, HD video played even better than with a proprietary driver. Though I couldn't get proprietary fglrx working with X.org from unstable.


Webcam just works. I tried it in Cheese and in Skype. Both work. Picture quality is good. It seems to be the same Vimicro webcam (USB ID 0ac8:c302) used in Samsung Q45 notebook.


When I installed Lenny, sound was playing without problems, but I could not get microphone working. As usual with Lenny and Intel-HDA hardware, I had to build newer ALSA (as I did for eeePC 901, link points to a post in Russian). To make mic working on X22 I also had to add in /etc/modprobe.d/alsa-base this line:

options snd-hda-intel model=ultra
This HDA Intel Sound HOWTO was very helpful. I found, that Samsung X22 uses Realtek ALC262 codec. Then, I tried some ALC262 models, and model=utlra worked.


Fn+Esc did not restore screen/backlight on wake up. Blind typing upon wake up was useless.

I found, that either

s2ram -f -a 2
pm-suspend --quirk-s3-mode
suspend and restore the session normally. In X they restore the screen perfectly, but in console they don't turn on backlight. However, Ctrl+Alt+F7 switches to X and the backlight is restored. Minor glitch: when going to suspend, the screen is filled with blinking ’ñ’. Not a big deal, but I don't think it's normal.

I edited /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-samsung.fdi, and the snippet corresponding to X22 now looks like this:

      <!-- this does not work on my SX22S! -->
      <match key="system.hardware.product" string_outof="R40/R41;CoronaR">
        <merge key="power_management.quirk.vbestate_restore" type="bool">true</merge>
      <!-- I use this one: -->
      <match key="system.hardware.product" string="SX22S">
        <merge key="power_management.quirk.s3_mode" type="bool">true</merge>

Now Fn+Esc works as intended.

Optical drive

It seems to support most of the CD and DVD media, but I didn't use it much yet. It is reading CDs without problem.

Card reader

Works with my xD and SD cards as intended. I don't have MemoryStick cards to test.

Things not tested

I didn't try HDMI, ExpressCard slot, Bluetooth at all.