[simple-scan] Update README.md file with information how to debug Sane backends, and fix minor issues



commit 66cbf1ba528e9b54e51f4aea695ce0681fdfde98
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Mon Dec 2 15:59:41 2019 +0100

    Update README.md file with information how to debug Sane backends, and
    fix minor issues

 README.md | 38 ++++++++++++++++++++++++++++++++++----
 1 file changed, 34 insertions(+), 4 deletions(-)
---
diff --git a/README.md b/README.md
index a6ee6dc..84d38cb 100644
--- a/README.md
+++ b/README.md
@@ -9,10 +9,14 @@ It allows you to capture images using [image scanners](https://en.wikipedia.org/
 
 # Building from source
 
-Install the dependencies (first line is Ubuntu/Debian, second is Fedora):
+Install the dependencies
+
+For Ubuntu/Debian:
 ```
 $ sudo apt install git meson valac libgtk-3-dev libgusb-dev libcolord-dev libpackagekit-glib2-dev 
libwebp-dev libsane-dev gettext itstool
 ```
+
+For Fedora:
 ```
 $ sudo dnf install -y meson vala gettext itstool gtk3-devel libgusb-devel colord-devel PackageKit-glib-devel 
libwebp-devel sane-backends-devel
 ```
@@ -32,21 +36,21 @@ $ XDG_DATA_DIRS=install/share:$XDG_DATA_DIRS ./install/bin/simple-scan
 
 # Debugging
 
-There is a --debug command line switch to enable more verbose logging:
+There is a `--debug` command line switch to enable more verbose logging:
 ```
 $ simple-scan --debug
 ```
 
 Log messages can also be found in the `$HOME/.cache/simple-scan` folder.
 
-If you don't have a scanner ready, you can use a virtual "test" scanner:
+If you don't have a scanner ready, you can use a virtual `test` scanner:
 ```
 $ simple-scan --debug test
 ```
 
 This app works by using the [SANE API](http://sane-project.org/html/) to
 capture images. It chooses the settings it thinks are appropriate for what you
-are trying to do. Drivers have many options and are of differring quality - it
+are trying to do. Drivers have many options and are of differing quality - it
 is useful to work out if any issues are caused by the app or the drivers. To
 confirm it is a driver issue you can use the graphical tool (XSane) or the
 command line
@@ -54,6 +58,32 @@ command line
 by the SANE project - these allow to to easily see and control all the
 settings your driver provides.
 
+If XSane is also not working, then the issue could be casued by wrongly
+loaded backend. To enable debug traces on Sane, set `SANE_DEBUG_DLL`
+environment variable:
+
+```
+$ export SANE_DEBUG_DLL=255
+```
+
+With such set, loading of Sane backends will be displayed, during *Simple Scan*
+run.
+
+Example:
+
+With HP MFP 135a scanner, there is missing `libusb-0.1.so.4`
+shared library, during loading `smfp` prioprietary backend:
+
+```
+[dll] sane_get_devices
+[dll] load: searching backend `smfp' in `/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane'
+[dll] load: trying to load `/usr/lib/x86_64-linux-gnu/sane/libsane-smfp.so.1'
+[dll] load: couldn't open `/usr/lib/x86_64-linux-gnu/sane/libsane-smfp.so.1' (No such file or directory)
+[dll] load: trying to load `/usr/lib/sane/libsane-smfp.so.1'
+[dll] load: dlopen()ing `/usr/lib/sane/libsane-smfp.so.1'
+[dll] load: dlopen() failed (libusb-0.1.so.4: No such file or directory)
+```
+
 # Contributing
 
 To contribute code create merge requests on


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]