Search This Blog

Sunday, September 16, 2012

New acquisition: Samsung ML-2165w printer

Last week I ordered a laser printer for me in a Brazilian web site (I live Brazil by the way). I made the order on last Monday night and it arrived here last Saturday morning, that's half of the ETA :-) I chose ML-2165w because it is cheap (around USD 125 with shipping) and is wireless. I am not going to print a lot of documents, but some of them contain sensitive data that I prefer to print at home. My brother also own an ink jet printer, but it is usually out of order because its cartridge ink is dry (not empty, the ink is not fluid after several weeks without using it).

It took me sometime to find the correct driver for the printer, believe or not it is on Samsung's website [1] :-) Unfortunately, Gentoo does not come with an ebuild (package) to install the driver. The calculate overlay [2] contains an ebuild to install an old version of the driver (net-print/samsung-unified-linux-driver/samsung-unified-linux-driver-1.01.ebuild), so I copied the ebuild from there to my personal overlay, edit it to updated SRC_URI url to [1], commented the part that install sane configuration, which this newer version of the driver does not have anymore, run ebuild digest comand to calculate the checksums used to check the source code integrity used by the ebuild, installed the new ebuild and voilà. cups-1.6.1 recognised the printer and after configuring it as network printer (URI == socket://:9100) it printed my test document like a charm.

A short review of this printer:

PROS:

. the printer is cheap. However, the toner is very expensive, in some cases more expensive than the printer.
. toner lasts longer than ink cartridges when not used for long periods of time. That is the main reason I bought a laser printer, besides the fact that the cost per page of a toner is better than ink cartridges.
. comes with USB cable. You must be asking why USB cable if it is a wireless printer, well, you need the USB cable to configure the wireless part :-) If you have an access point that supports WPS (Wifi Protected Setup) then you do not need USB cable, that is not my case though.
. it is small and fast.
. it is wireless.
. I think the printing is very good even in toner economy mode.
. it is easy to configure even in Linux :-D as long as you know where to find the driver. As a side note even Win7 does not come with the driver for this printer, I needed to use the supplied DVD to install it in the Win7 that came with my notebook. OBS: when in doubt always reset the  network configuration and start from zero instead of overriding the current configuration. It took me sometime to re-configure the wifi configuration because of that detail.
. I read on the Internet that Samsung implemented the Easy Printer software for Linux as well. That is the software used to configure the printer on Windows. I have not tried it though. I used its Windows version to set up the wireless (wifi) configuration, if you do not have a Windows computer or a special access point that supports WPS you will probably need to install the Linux version of Easy Printer to set up the printer's wifi configuration. I also fixed the printer's IP on my wifi router, so it will always get the same IP from my router's dhcp server.


CONS:

. toner is very expensive.
. supplied toner prints up to 700 pages. That is enough for me, may not be for everyone.
. manual duplex printing, like most cheap printers.
. it consumes a considerable amount of energy (gets hot easily too).
. curles the paper considerably.
. does not come with printed manual, which is available on Samsung's website.
. documentation is a bit confusing regarding wireless configuration. It explains how to configure it but do not explain how to re-configure the wireless part. Repeating the configuration process does not work (it never associates to the access point even though it finds it when scanning) until you reset the printer's network configuration using Easy Printer. That crutial detail is not written in the manual.

[1] http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?VPath=DR/201110/20111019151150392/UnifiedLinuxDriver_1.01.tar.gz

[2] overlays are like unofficial repositories, usually with unstable programs or data (firmware, drivers, etc).

Monday, September 10, 2012

Plasma NM 0.9.0.5


Plasma NM 0.9.0.5

SHA256Sum: aa7a467f1f2a0e1ad22486381284bfb1350d644d5fcf61f8449c475dbec963eb

Changelog:

307496: Allow empty string in 'Subject Match' and 'Alternative Subject Matches' fields in wifi WPA2 enterprise dialog.
306132: Add storage type combo box for gsm password in GsmWidget.
307517: Fix crash when importing OpenVPN configuration file.
. Enable additional DNS details for IPv4 and IPv6 Automatic Method configuration.
. Added a title and icon to the dialog so that it's clear when it pops up to the user what the prompt is from.
. Fix a bug in which the wireless password prompt dialog would be shown at an incorrect size
. Fix insertion of new connections (such as VPN) in wrong position when no wireless interface is enabled.
303524: fix crash if opening kwallet fails. This fix the crash not the kwallet failing to open.
. Fix problem with system tray icon not showing status overlay.
298974: if a connection is restricted to one interface do not show it for other interfaces in interface details.
305077: Escape ampersands in connection list since Plasma::IconWidget::setText() automatically removes accelerators (ampersands).
. Do not display connections for unmanaged interfaces.
. Do not list unmanaged interfaces in system tray's tooltip.
304873: Read/Save EAP configuration in PPP tab for mobile broadband and bluetooth connections.

The following languages have more than 80% of strings translated:

ca cs da de el es et fi hu it kk km lt nb nds nl pl pt pt_BR ru sk sr sr@ijekavian sr@ijekavianlatin sr@latin sv uk zh_TW

Also read some usefull information about Plasma NM in my past posts.

Thursday, August 9, 2012

Submenus support in QML shutdown dialog

In the past weeks Konstantinos Smanis has been working in adding Grub2 and Burg submenu support in kdm and in the shutdown dialog. He had implement the support for the C++ version of the dialog used until KDE SC 4.8.x. However, since KDE SC 4.9 now uses QML based shutdown dialog I had to add some changes in it to support submenus as well. Here is result:





This will work out of the box in KDE SC 4.9.1 along with fixes for menus not reacting to clicks problem.

Thursday, August 2, 2012

Tux on Ice and swap

Strictly speaking this is off topic since it is not KDE related, anyway it looks interesting for those who use suspend to disk in Linux, specially the Tux on Ice flavor of the available suspend implementations for Linux.

I have been using Tux on Ice for years and also for years I have been suffering from segfaults in several programs after resume from disk. With my old notebook I workarounded this problem by cleaning the swap partition (swapoff -a; swapon -a) before suspending. That works but, as you may be thinking, it is damn slow if there are hundreds of MB in swap partition.

When I bought my current notebook I elimated any swap partition and started using a swap file instead. Resizing partitions is a slow process and not always safe, resizing a file is much easier (just delete it and recreate it :-)). Using swap file was something I wanted to do for a long time back then. Well, the swap partition problem was fixed but not the segfaults.

Last week I looked more deeply into the problem to figure out how to solve it for good or at least find a faster workaround. One thing that I noticed in my /var/log/message is the failed memory allocation below:


Jul 24 09:22:14 evolucao kernel: [81109.228445] [fglrx] IRQ 46 Disabled
Jul 24 09:22:15 evolucao kernel: [81109.228526] [fglrx] Preparing suspend fglrx in kernel.
Jul 24 09:22:15 evolucao kernel: [81109.228538] kworker/u:8: page allocation failure: order:10, mode:0x20
Jul 24 09:22:15 evolucao kernel: [81109.228540] Pid: 26030, comm: kworker/u:8 Tainted: P       A   O 3.4.6-lvs #9
Jul 24 09:22:15 evolucao kernel: [81109.228542] Call Trace:
Jul 24 09:22:16 evolucao kernel: [81109.228552]  [] warn_alloc_failed+0x108/0x11d
Jul 24 09:22:16 evolucao kernel: [81109.228559]  [] ? number.clone.1+0x129/0x229
Jul 24 09:22:16 evolucao kernel: [81109.228562]  [] __alloc_pages_nodemask+0x61e/0x6c3
Jul 24 09:22:17 evolucao kernel: [81109.228566]  [] cache_alloc_refill+0x276/0x4fb
Jul 24 09:22:17 evolucao kernel: [81109.228568]  [] __kmalloc+0x9d/0x144
Jul 24 09:22:17 evolucao kernel: [81109.228617]  [] ? KCL_MEM_SmallBufferAllocAtomic+0x19/0x1b [fglrx]
Jul 24 09:22:17 evolucao kernel: [81109.228640]  [] KCL_MEM_SmallBufferAllocAtomic+0x19/0x1b [fglrx]
Jul 24 09:22:18 evolucao kernel: [81109.228669]  [] libip_resume+0x253/0x5c0 [fglrx]
Jul 24 09:22:19 evolucao kernel: [81109.228704]  [] ? mc_heap_get_reserved_blocks_info+0x17e/0x2a0 [fglrx]
Jul 24 09:22:19 evolucao kernel: [81109.228725]  [] ? KCL_MEM_SmallBufferAllocAtomic+0x19/0x1b [fglrx]
Jul 24 09:22:20 evolucao kernel: [81109.228758]  [] ? firegl_pm_save_framebuffer+0x204/0x300 [fglrx]
Jul 24 09:22:20 evolucao kernel: [81109.228785]  [] ? firegl_cail_powerdown+0x8d/0x240 [fglrx]
Jul 24 09:22:20 evolucao kernel: [81109.228812]  [] ? libip_suspend+0x22/0x50 [fglrx]
Jul 24 09:22:21 evolucao kernel: [81109.228831]  [] ? ip_firegl_lseek+0xeb8/0x17ef [fglrx]
Jul 24 09:22:21 evolucao kernel: [81109.228835]  [] ? pci_legacy_suspend+0x35/0xb8
Jul 24 09:22:21 evolucao kernel: [81109.228838]  [] ? pci_pm_freeze+0x43/0x8b
Jul 24 09:22:21 evolucao kernel: [81109.228844]  [] ? device_pm_wait_for_dev+0x24/0x24
Jul 24 09:22:21 evolucao kernel: [81109.228846]  [] ? pci_pm_poweroff+0x98/0x98
Jul 24 09:22:21 evolucao kernel: [81109.228849]  [] ? dpm_run_callback.clone.4+0x2a/0x58
Jul 24 09:22:22 evolucao kernel: [81109.228851]  [] ? __device_suspend+0x145/0x1c4
Jul 24 09:22:22 evolucao kernel: [81109.228856]  [] ? async_schedule+0x12/0x12
Jul 24 09:22:22 evolucao kernel: [81109.228858]  [] ? async_suspend+0x1a/0x85
Jul 24 09:22:22 evolucao kernel: [81109.228861]  [] ? async_run_entry_fn+0xa3/0x159
Jul 24 09:22:22 evolucao kernel: [81109.228865]  [] ? process_one_work+0x214/0x393
Jul 24 09:22:22 evolucao kernel: [81109.228868]  [] ? need_to_create_worker+0x19/0x32
Jul 24 09:22:22 evolucao kernel: [81109.228871]  [] ? worker_thread+0x17e/0x243
Jul 24 09:22:23 evolucao kernel: [81109.228875]  [] ? preempt_schedule+0x35/0x48
Jul 24 09:22:23 evolucao kernel: [81109.228877]  [] ? manage_workers.clone.17+0x16e/0x16e
Jul 24 09:22:23 evolucao kernel: [81109.228880]  [] ? kthread+0x84/0x8c
Jul 24 09:22:23 evolucao kernel: [81109.228883]  [] ? kernel_thread_helper+0x4/0x10
Jul 24 09:22:23 evolucao kernel: [81109.228885]  [] ? kthread_freezable_should_stop+0x4d/0x4d
Jul 24 09:22:23 evolucao kernel: [81109.228888]  [] ? gs_change+0xb/0xb


You must be thinking in blaming fglrx for this problem but I use the opensource driver in my old notebook, which probably still has this problem (I still own my old notebook). Moreover, in the first months after buying my current notebook I used to use the opensource drivers with it too, so I am almost sure this problem is not related to that allocation failure above. OBS: I changed to the proprietary ATI driver because only with it my notebook's fan keeps quiet without the "silent" speed button that comes with my notebook. The silent button also limits the cores' clock to almost 1 GHz below the maximum clock and having to press it everytime I want full CPU power or restart the notebook is really annoying. For someone who uses Gentoo I used to press that button quite often when I used the opensource driver. Unfortunately, the GPU does not inform its power profile to the kernel so the opensource driver's dynamic profile does not work with it. I am stuck to the proprietary driver until someone can fix that issue. I hope this news allows someone to finally implement the dynamic profile for my GPU.

Turning back to the segfault problem, some days ago I tried something different. Tux On Ice works with swap partition, swap files and also with a dedicated file to store the image. I decided to split my 4 GB swap file into two: one 2 GB file for swap and another 2 GB file for the hibernate image. My notebook came with 4 GB of RAM memory and I usually do not need more than 1 GB of swap even when I run two virtual machines, Chromium, Firefox and several other programs running in parallel, so I can afford a smaller swap file (again: swap files are really easy to resize :-)). Guess what? There has been no segfaults so far :-D. I also love the fact that Tux on Ice compresses the RAM image using all available cores before saving it.

I do not know if the vanilla suspend implementation in the Linux kernel also suffers from this problem. By what I could find on the Internet it may be affected as well. As far as I know the vanilla suspend does not allow using anything but swap partitions to store the image (not even swap files). So if you have this problem you can give Tux on Ice a try.

I did a final test by suspending to disk with chromium, VirtualBox, Amarok, kmail, konversation, kopete and skype running. The command free reported "-/+ buffers/cache: 2310964 KB", which means about 59%  of the available RAM memory used by applications (excluding buffers and disck cache). There was also 666844 KB in my swap file. The suspend process was not that fast but (about 20s). Resuming took much more time (about 2 minutes until the Plasma Desktop reappears). There was a lot of disk activity and the swap usage went from 666844 KB to 1027240 KB and then down to 879456 KB in a period of two minutes after which I could finally type commands in konsole. However everything is still working, no segfault and Amarok kept playing the same song I was listening to when I suspended my notebook :-) I am now at the fifth day running without reboots and segfaults, the swap usage dropped to 353112 KB during this period.

The failed memory allocation I talked about above happened this time and everything still works with fglrx (including kwin's effects). Well, I have found a fast suspend/resume configuration at last (as long as there was not much data in swap). If I close the memory hungry programs (like VirtualBox and Chromium) before suspending then it suspends in about 10s and resumes in about 15s, half of that time running pm-utils' scripts That is not that bad :-)

Tuesday, July 24, 2012

Plasma NM 0.9.0.4


Plasma NM 0.9.0.4

SHA256Sum: 520d0592171ce1aa1c54916f408e7f2d1e016da0acefc725f7170b67a292e256

If you use WPA2 enterprise connections (like eduroam) please test this new release and check if the missing password field problem is fixed. Update: unfortunately the problem still happens.

Kubuntu packages:
https://launchpad.net/ubuntu/quantal/i386/plasma-widget-networkmanagement/0.9.0.4-0ubuntu2

Please (K)Ubuntu users, upgrade your systems to the packages above before reporting bugs that has already been fixed. You can check the version number by clicking on "Manage Connections" button then on the "Other" tab. Also report Plasma NM's version number when reporting a bug.

Changelog:

279942: Add two tooltips to explain how to correctly configure TLS encryption using PKCS12 private keys.
302006: Properly fix this crash without side effects. VPNC group password decryption during importing a VPNC configuration file should work again now.
303155: Use different icons for wired interfaces when cable is plugged/unplugged.
302790: Show ad-hoc connections in connection list when "Show More" is active. If you create an ad-hoc connection you must click on "Show More" and then click on the connection to activated it. Wifi shared connections are always shown, so they do not need this. This feature are for those who want to use static IP configuration with ad-hoc connections.
302470: Change icons used in VPN import/export buttons in kcm.
. add support for network zones from FirewallD (requires NetworkManager >= 0.9.4.0).
293045: Remove warning message once NetworkManager is up and running.
302451: Fix issue when importing openvpn configuration files.
299868: Try to fix ask password dialog for WPA2 connections.


The following languages have more than 80% of strings translated:

ca cs da de el es et fi hu it km lt nb nds nl pl pt pt_BR sk sr sr@ijekavian sr@ijekavianlatin sr@latin sv uk zh_TW

Also read some usefull information about Plasma NM in my past posts.

Sunday, July 22, 2012

Plasma NM: details editor

One more feature implemented in Plasma NM (and one more bug closed). I have added the button "Configure Details to Show..." to the kcm in master branch:



which launches the editor:


Well, I think what the editor does is almost self-explanatory. After editing what details to show they will appear in the interfade details window. The default details are the same ones currently used in master and nm09 branches. If you do not use the editor you will not notice any difference in the interface details window (actually there are some small changes in the labels).

Now that the editor is in place I can implement more details. For instance, the details in the "Available" list above work already and are new to Plasma NM. If you used to miss any of them you can enable them now :-) You can even change the order at they will appear on the interface details window too.

OBS: NetworkManager does not report the IPv4 gateway when the connection uses static IP address. I tested it with NM 0.9.2.0 and 0.9.4.0 using qdbus, so it is not a problem in Plasma NM.

Saturday, July 14, 2012

Improving QtNetworkManager (former libnm-qt)

One of the big changes in master branch last year was the introduction of QtNetworkManager. Well, it still needs work and here I want to talk about what is needed:

Move the create/update/delete connections code to QtNetworkManager

The port of Plasma NM to use QtNetworkManager is not finished, one the things that must be done is move the code that creates/updates/deletes connections from Plasma NM to QtNetworkManager. It means moving most of the code in git://anongit.kde.org/networkmanagement/backends/NetworkManager/ to git://anongit.kde.org/libnm-qt/ and updating Plasma NM to use it. It sounds easy but it is not. The code in networkmanagement/backends/NetworkManager/ depends on some classes that belongs to Plasma NM and will not be moved, so new classes will have to be created to replace them.

Move the DBus parsing code to QtNetworkManager

This code is in git://anongit.kde.org/networkmanagement/backends/NetworkManager/connectiondbus.{cpp,h} and is essencial for any program that want to create connections with NetworkManager.

Create examples about how to use QtNetworkManager

This is a request that I received some time ago. I added some examples in git://anongit.kde.org/libnm-qt/examples. Some things cannot be done in QtNetworkManager yet (creating new connections is troublesome because the DBus parsing code is in Plasma NM right now). I need to finish that part before I can create examples of how to create/edit connections.

Anyone can help with those parts. It is not a simple task (if it were I would have done it long ago), if you think you are up to the challenge contact me :-)

Other things to implement