From 36854bb2464ea6acb43124792fa3c105473d0ebf Mon Sep 17 00:00:00 2001 From: Peter Boy Date: Aug 21 2023 07:33:53 +0000 Subject: Added metadata, moved partials into main text body. --- diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 7c22b2d..2cdfdc7 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -119,7 +119,7 @@ * Printing and scanning ** xref:how-to-debug-printing-problems.adoc[Troubleshooting printing issues] -** xref:how-to-debug-scanning-problems.adoc[Troubleshooting scanning issues] +** xref:how-to-debug-scanning-problems.adoc[How to debut scanning issues] ** xref:cups-useful-tricks.adoc[Useful tricks] ** xref:cups-terminology.adoc[Terminology] ** xref:cups-known-issues.adoc[Known issues] diff --git a/modules/ROOT/pages/_partials/2delete-con_cups-user-stories.adoc b/modules/ROOT/pages/_partials/2delete-con_cups-user-stories.adoc new file mode 100644 index 0000000..67c8049 --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-con_cups-user-stories.adoc @@ -0,0 +1,114 @@ +[id='proc_cups-user-stories'] += User stories + +There are several common user stories when it comes to debugging printing issues. I'll mention some of them with steps how to get necessary information. + +== I have HP printer and have a problem with HPLIP script + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_journal_logging[start to capture journal logs] +* xref:how-to-debug-printing-problems.adoc#_hplip_scripts_debug_logging[run the script with enabled debugging] +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_journal_logging[get the journal logs] +* attach the files to the bugzilla ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* provide printer model name and printer PPD file from `/etc/cups/ppd/` + +== I have HP printer, installed it with HPLIP and have a problem with it + +HPLIP installed print queue has a device uri starting with hp://. + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_journal_logging[start to capture journal logs] +* trigger your issue +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_journal_logging[get the journal logs] +* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB +* attach the files to the bugzilla ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* provide printer model name and printer PPD file from `/etc/cups/ppd/` + +== My printer doesn't print correctly or at all, but I can see the printer in print dialog + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture logs] +* trigger your issue - print the specific document to the specific print queue you have problem with +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[get the logs] +* attach the created files to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* attach your printer PPD file from `/etc/cups/ppd/` if available +* attach the file you wanted to print +* tell what application you printed from +* mention your xref:how-to-debug-printing-problems.adoc#_which_driver_am_i_using[printer model] +* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB + +== CUPS generic issue + +For generic issues - printer wasn't found, segfault - please follow the steps in the following sections (`avahi-daemon` must run): + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture logs] +* trigger the issue - e.g. try to find printers via [command]`sudo lpinfo -l -v`, do some action in web ui - depends on your problem +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[get the logs] +* attach created files to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* put the output of xref:how-to-debug-printing-problems.adoc#_what_make_and_model_is_my_printer[lpinfo] into a file and attach it +* put the output of xref:how-to-debug-printing-problems.adoc#_which_print_queues_are_available_for_me[both lpstat commands] into a file and attach it +* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB + +== My printer doesn't print correctly - I use 'everywhere' model + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_cups_everywhere_model[get data from get-printer-attributes request] +* xref:how-to-debug-printing-problems.adoc#_my_printer_doesnt_print_correctly_or_at_all_but_i_can_see_the_printer_in_print_dialog[follow the steps with CUPS job log user story] + +== I have a generic problem with cups-browsed + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_cups_browsed_logging[enable cups-browsed logging], but don't restart cups-browsed yet. +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture cupsd logs] +* start cups-browsed via `systemctl` and start to capture its logs: + +---- +$ journalctl -u cups-browsed -f > cups_browsed_log +---- + +* trigger the issue or wait until cups-browsed triggers the issue itself +* cancel cups-browsed and xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[cupsd log] captures +* attach created files [filename]`cups_whole_log` and [filename]`cups_browsed_log` to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] + +== Printer found by cups-browsed doesn't print or print badly + +The most difficult user story - we need to know how the print queue was created and how it behaves during printing. The print queue found by cups-browsed has a device uri starting with `implicitclass://`. + +Please follow the steps: + +* xref:how-to-debug-printing-problems.adoc#_cups_filters_driverless_driver[get printer info from get-printer-attributes and PPD file] +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_cups_browsed_logging[enable cups-browsed logging], but don't restart cups-browsed yet. +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture cupsd logs] +* start cups-browsed via `systemctl` and start to capture its logs: + +---- +$ journalctl -u cups-browsed -f > cups_browsed_queue_creation +---- + +* give cups-browsed some time to process found devices (depends on how many devices you have in the local network or how many print queues are stored in the location you set with [option]`BrowsePoll` directive) +* cancel cups-browsed and xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[cupsd log] captures - save the files as `cups_queue_creation` and `cups_browsed_queue_creation` + +Now we need to capture the logs during printing: + +* xref:how-to-debug-printing-problems.adoc#_prepare_cups_for_job_logging[prepare CUPS for job logging] +* xref:cups-useful-tricks.adoc#_restarting_cups_service[restart CUPS service] +* start to capture cups_browsed logs again: + +---- +$ journalctl -u cups-browsed -f > cups_browsed_printing +---- + +* trigger your issue - print the specific document to the specific print queue you have problem with +* xref:how-to-debug-printing-problems.adoc#_get_a_job_log_for_a_specific_job_id[get the job log for the job you have just triggered] and cancel the capture of cups-browsed logging +* attach all gathered log files diff --git a/modules/ROOT/pages/_partials/2delete-concept_chromium-web-browser.adoc b/modules/ROOT/pages/_partials/2delete-concept_chromium-web-browser.adoc new file mode 100644 index 0000000..5dad452 --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-concept_chromium-web-browser.adoc @@ -0,0 +1,16 @@ +[id='chromium-and-google-chrome'] += Chromium and Google Chrome web browsers + +Fedora Workstation, in its out of the box configuration, only includes free and open source software. **Mozilla Firefox** is the browser included in Fedora Workstation by default. However, it easy to install either **Google Chrome** or **Chromium**, if preferred. + +[id='chromium'] +== Chromium + +Chromium is the upstream project for Google Chrome. Chromium is included in the Fedora Repositories. Fedora's Chromium package only contains free and open source software, so does not include several features of Google Chrome that rely on proprietary software. + +[id='google-chrome'] +== Google Chrome + +Google Chrome is a popular web browser developed by Google. Chrome is built on top of the open-source browser project, Chromium. Chrome includes additional features such as support for proprietary media files (such as H.264 or AAC) and playback of rights-protected media (Netflix, etc.) Chrome also includes support for other Google services such as browser sync and location services, which are not supported by Chromium. + +Google Chrome is available in Fedora Workstation via a curated third-party repository. Once this repository is enabled, Chrome can be installed via Software or the command line. diff --git a/modules/ROOT/pages/_partials/2delete-proc_cups-how-to-debug-scanning-issues.adoc b/modules/ROOT/pages/_partials/2delete-proc_cups-how-to-debug-scanning-issues.adoc new file mode 100644 index 0000000..3313a05 --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-proc_cups-how-to-debug-scanning-issues.adoc @@ -0,0 +1,115 @@ +[id='proc_cups-how-to-debug-scanning-issues'] += How to debug scanning issues + +SANE library, communication libraries and backends can turn on and off debug logging via `SANE_DEBUG_*` environment variables. + +The common environment variables: + +* `SANE_DEBUG_DLL` - enables debugging SANE library +* `SANE_DEBUG_SANEI_USB` - enables debugging communication library for USB - add the environment variable if your device is connected via USB cable +* `SANE_DEBUG_SANEI_TCP` - enables debugging communication library for wireless/ethernet - add the environment variable if your device is connected by Wifi or Ethernet + +Environment variables for enabling debugging a specific backends have a structure - `SANE_DEBUG_`, so the environment variable for f.e. *HPAIO* backend is `SANE_DEBUG_HPAIO*`. + +You can find which SANE backend supports your device http://www.sane-project.org/sane-mfgs.html[here]. If your device is HP and it isn't supported by *airscan* backend or any other SANE backend, it can be supported by *hpaio* backend from *hplip* package, see the list of supported devices https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index[here]. + +== Debugging scanner discovery + +If you don't see your scanner in scanning application, then debugging of discovery process is in order. I prefer using [command]`scanimage` in the examples, but the similar steps can be applied for every scanning application like [command]`xsane`, [command]`scanadf`, [command]`simple-scan` etc. + +You will need to use environment variables when you start a scanning application ([command]`scanimage` in this case). The environment variables used with [command]`scanimage` command depends on how your scanner is connected and which backend suppose to support it. So for getting debug logs for HP LaserJet device, *connected via Ethernet/Wifi and supported by HPAIO backend*, use command: + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 scanimage -L &> discovery_output +---- + +or, f.e. if you have CanoScan 8600F, connected by USB and supported by genesys backend, use command: + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_GENESYS=255 SANE_DEBUG_SANEI_USB=255 scanimage -L &> discovery_output +---- + +Please attach the created [filename]`discovery_output` file as an attachment to the bugzilla ticket. + +== Debugging scanning process + +If the scanner is found, but an issue happens during scanning itself, we need to debug scanning process itself - which means debugging communication between backend and scanner when you start scanning a document. + +The debugging scanning itself looks similar as discovery - setup the environment variables before running the command/scanning application and catch logs into a file. The possible command can be (f.e. if you have *network scanner supported by HPAIO backend*): + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 xsane &> debug_log +---- + +or (once you find out device uri from [command]`scanimage -L` - see the xref:_getting_a_scanner_device_uri[next section]): + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 scanimage -d > out.pnm 2> debug_log +---- + +, where you substitute `` for the actual device uri, f.e. 'hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112'. + +Please attach the created file - [filename]`debug_log` - as an attachment to the bugzilla ticket. + +== Getting a scanner device uri + +This point is basically a manual how to get a scanner uri for debugging scanning itself via [command]`scanimage`. You don't need to provide a scanner uri in GUI applications like [command]`xsane` or [command]`simple-scan`, because the application will do it for you or you can choose the scanner by a mouse click. + +The [command]`scanimage -L` command returns an output where device uri of the device is shown, f.e.: + +---- +$ scanimage -L +device `v4l:/dev/video0' is a Noname Integrated Camera: Integrated C virtual device +device `hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112&queue=false' is a Hewlett-Packard laserjet_m1536dnf_mfp all-in-one +---- + +F.e.the string 'hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112&queue=false' is a device uri for for Hewlett-Packard laserjet_m1536dnf_mfp all-in-one scanner. + +== Debugging HP scanner if it is supported by HPLIP + +The hplip package doesn't have unified logging, so some logs come out of HPAIO backend to standard output and HP internal utilities logs come to journal. So we need to capture both to get the understanding of situation. + +It can be done this way: + +* start capturing journal logs at background: + +---- +$ journalctl -f > journal_logs & +---- + +* trigger an action (xref:_debugging_scanner_discovery[discovery] or xref:_debugging_scanning_process[scanning]) +* kill the journalctl process, f.e. this way (if there is only one journactl process) + +---- +$ kill `pidof journalctl` +---- + +then attach the created file - [filename]`journal_logs` - as an attachment to the bugzilla ticket. Please do only one action per capture - that means if you are asked to attach log files for HP scanner discovery and scanning supported by hplip, you will attach as an attachment four files - [filename]`discovery_output`, [filename]`journal_logs` for discovery output, [filename]`debug_logs` and [filename]`journal_logs` for debug_logs. + +== Debugging sane-airscan + +If your device supports eSCL or WSD (you can find it out from device specification - look for the mentioned protocols or AirScan), then its scanning functionality is supported by *sane-airscan*. Regarding debugging, on the top of usual logging sane-airscan gathers a communication dump and output image, which is helpful during investigation. + +sane-airscan debugging can be enabled in [filename]`/etc/sane.d/airscan.conf` by setting: + +---- +[debug] +trace = /path/to/dir/where/debugfiles/will/be/saved +enable = true +---- + +Then do trigger your issue (xref:_debugging_scanner_discovery[discovery] or xref:_debugging_scanning_process[scanning]), go to the dir you defined in [filename]`/etc/sane.d/airscan.conf`, take all files from there and attach them to the bug ticket. + +== How to divide logs + +In case your debug log is too big for bugzilla to attach (because your issue doesn't happen with the lowest settings or logs are big even with the lowest settings), do divide the logs to three files like this: + +---- +$ grep dll debug_log > debug_log_dll +$ grep debug_log > debug_log_connection +$ grep debug_log > debug_log_backend +---- + + is the name of backend which supports your scanner (pixma, genesys, plustek, hpaio, airscan etc.), is the type of connection you use for the device (tcp, usb). + +The division makes the investigation more difficult (the person needs to have three opened files at the same time), so do divide the logs only if log file is too big. diff --git a/modules/ROOT/pages/_partials/2delete-proc_cups-identifying-your-problem-area.adoc b/modules/ROOT/pages/_partials/2delete-proc_cups-identifying-your-problem-area.adoc new file mode 100644 index 0000000..ce34651 --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-proc_cups-identifying-your-problem-area.adoc @@ -0,0 +1,422 @@ +[id='proc_cups-identifying-your-problem-area'] += Identifying your problem area + +Printing issues can be fairly complex and active cooperation or lots of data can be requested from reporter by maintainer to helping maintainer to at least understand and (if it is not hardware specific issue) reproduce the issue, so please have a patience and try to narrow the problem as much you are able to for maintainers. + +There can be: + +* issues with seeing or connecting to the printer (it can be cups backend issues, avahi issues, libusb issues, cups-browsed issues), +* accessibility issues (correct/wrong setup in cupsd.conf or its bad interpretation by cupsd daemon, bad cooperation with NIS, SSSD...), +* printing with help of samba (issues with smb backend, which is part of samba) or with samba authenticated through Kerberos (samba_krb5_printing), +* issues with filters used during filtering the document into document format supported by printer, which influence how or if the document will be printed (issue with filters - pdftops, pdftopdf, pstops, bannertopdf etc. - or issues with binaries or libraries which filters uses - libgs, qpdf, poppler...), +* issues with Postscript Printer Description files, which are old way of defining printers capabilities like supported page sizes, borders etc... + +Not mentioning possible limitations or issues in firmware or hardware of printer itself, so any kind of data or narrowing the issue is welcomed. + +The best start is to attach files with logs described further down. + +== CUPS logging + +All CUPS logging is redirected to journal by default since Fedora 28 (there was a redirecting of error_log to journal by default before Fedora 28). + +We need to define two different ways of capturing incident-bound CUPS whole logs - the one if the broken print queue isn't provided by HPLIP and the other if it is. They differs in the filter option of journald - if you use non-HPLIP queue for debugging, it is okay to gather the logs from cups systemd unit (by '-u cups'), because all error messages are correctly redirected to cups systemd unit logging and they are accessible in the output after unit filtering. HPLIP libraries are not implemented to do the same (upstream is unresponsive to accept a potencial fix into the project and the issue is not critical enough to drag a downstream patch forever), so their messages aren't marked for cups systemd unit and they're filtered out after calling journald with '-u cups'. For such queues journald log without filtering is required. + +[NOTE] +=============================== +Incident-bound journald log without filtering is required only for HPLIP print queues (their device uri starts with hp://) and it is unwanted for other queues, because it can be hard to read in larger cases. Please attach incident-bound journald log only when it is necessary. +=============================== + +=== Location of CUPS logging + +CUPS logging is located in the system journal by default, but the logging into a file can be set in [filename]`/etc/cups/cups-files.conf` with directive [option]`ErrorLog`. If you want to change the default settings, then the name of the logging file is irrelevant, but it is recommended to put the file into path `/var/log/cups`, otherwise SELinux will block cupsd from accessing it. + +Setting the logging to a file has following cons (without further operations): + +* unable to get only logs connected to a job without chaining more commands +* unable to get logs for specified time frame without chaining more commands + +For capturing a incident-bound logs `tail -f` can be used e.g.: + +---- +tail -f /var/log/cups/error_log +---- + +=== Enable CUPS debug logging + +Enable full debugging information with: + +---- +$ cupsctl LogLevel=debug2 +---- + +=== CUPS job log + +[IMPORTANT] +=============================== +If the problem appears when you sent document to print or if you are trying to, capture logs for this job. If the job log is available, its attaching is *REQUIRED*. +=============================== + +==== Prepare CUPS for job logging + +For being able to see specific job log, please turn on: + +---- +PreserveJobFiles Yes +---- + +in your [filename]`/etc/cups/cupsd.conf` file and restart cup service. Do not forget to remove the line after you are done with debugging. [command]`lpstat -W all` seems to be empty after printing if you do not enable the directive. + +==== Get a job log for a specific job ID + +To capture job log you need to know Job ID (JID) of the job - it is the number after dash in a request ID: + +Request ID looks like this: + +---- +- +---- + +and can be seen in terminal if you send a document to print by [command]`lp` command: + +---- +$ lp -d ... +request id is - (N file(s)) +---- + +Or when you list jobs (see [command]`man lpstat`) - the latest job is at the end: + +---- +$ lpstat -W all +... +- 1024 Wed 11 Jan 2017 05:52:19 PM CET +---- + +You can get the latest job logs automatically (if you have [command]`awk` installed and [command]`lpstat -W` all returns jobs) by: + +---- +$ journalctl -u cups JID=`lpstat -W all | awk '{print $1}' | awk -F '-' '{print $NF}' | tail -n 1` > cups_job_log +---- + +Or manually, if you found JID by yourself: + +---- +journalctl -u cups JID= > cups_job_log +---- + +=== Incident-bound cupsd log (broken print queue isn't HPLIP supported) + +Sometimes we cannot bind the error with a specific print job, so the job log is uneffective. Incident-bound cupsd log is needed. + +==== How to start to capture incident-bound cupsd logging + +In new terminal/terminal tab, please issue: + +---- +journalctl -f -u cups > cups_whole_log +---- + +==== How to get incident-bound cupsd logging + +After you trigger the error condition you are trying to diagnose e.g. printing something, try to find a printer via [command]`lpinfo` etc., you terminate capturing incident-bound cupsd log from xref:_how_to_start_to_capture_incident_bound_cupsd_logging[step above] by `+`. + +=== Incident-bound cupsd log (broken print queue is HPLIP supported) + +Unfortunately, HPLIP libraries don't log into CUPS unit in journal, so if your print queue is installed with HPLIP driver (its device uri starts with `hp://`), we need incident-bound journal log. + +==== How to start to capture incident-bound journal logging + +In new terminal/terminal tab, please issue: + +---- +journalctl -f > journal_whole_log +---- + +==== How to get incident-bound journal logging + +After you trigger the error condition you are trying to diagnose e.g. printing something, running HP script etc., you terminate capturing incident-bound journal log from xref:_how_to_start_to_capture_incident_bound_journal_logging[step above] by `+`. + +=== Turning off debug logging + +Please attach [filename]`cups_job_log` for the problematic job, [filename]`cups_whole_log` or [filename]`journal_log` if you caught whole cupsd log during the problematic event to bug report as an attachment. + +Then to turn off debugging information, do this: + +---- +$ sudo sed -i 's,LogLevel debug2,LogLevel warn,' /etc/cups/cupsd.conf +$ sudo systemctl restart cups +---- + +=== More commands for working with systemd-journald + +View the log messages with: + +---- +journalctl -u cups -e +---- + +or: + +---- +journalctl -u cups --since=... +---- + +To filter out messages relating to a specific job ID, use: + +---- +journalctl -u cups JID=... +---- + +(tab completion will show you which job IDs have log messages) + +== cups-browsed logging + +cups-browsed daemon was introduced in Fedora around cups-1.5 version. It can browse Bonjour broadcasts, CUPS broadcasts (deprecated) and LDAP servers for printers and create or remove local queues pointing to those printers. It can creates broadcasts of local CUPS queues, but it is marked as deprecated. + +For setting debug logging on you need to add: + +---- +DebugLogging stderr +---- + +to [filename]`/etc/cups/cups-browsed.conf`. + +The logs will be available in system journal after cups-browsed restart. + +== HPLIP scripts debug logging + +Python scripts from HPLIP (e.g. [command]`hp-setup`, [command]`hp-clean`, [command]`hp-scan`) have debug logging redirected to the standard error file descriptor, so they are not logged in journal. For getting their debug logging, run the script with `-ldebug` parameter e.g.: + +---- +$ hp-setup -ldebug -i +---- + +and reproduce the issue. Then copy the messages from terminal into [filename]`hp_script_log`. Please attach the file to the bugzilla ticket too. + +== What make and model is my printer? + +Each different printer has a model-specific Device ID. You can find out with the [command]`lpinfo` command: + +---- +su -c "lpinfo -l -v" +---- + +This command runs each of the backends in discovery mode, to get them to report devices they can automatically detect. This will output a series of blocks of lines, each one like this: + +---- +Device: uri = usb://HP/DESKJET%20990C?serial=U123456789AB + class = direct + info = HP DESKJET 990C + make-and-model = HP DESKJET 990C + device-id = MFG:HEWLETT-PACKARD;MDL:DESKJET 990C;CMD:MLC,PCL,PML;CLS:PRI +NTER;DES:Hewlett-Packard DeskJet 990C;SN:U123456789AB;S:00808880800010032C100000 +0C2000000;P:0800,FL,B0;J: ; + location = +---- + +The line which identifies this particular model type is the long one that starts "device-id =" (shown here wrapping over three lines). + +Note that if your printer cannot be automatically detected, you may still be able to find out the Device ID by running the appropriate backend with the printer hostname as the argument. The *usb*, *parallel*, *snmp*, and *dnssd* backends all try to report the actual Device ID given by the printer. + +---- +$ /usr/lib/cups/backend/snmp 10.34.18.3 + +network socket://10.34.18.3 "HP Color LaserJet CP2025dn" "HP Color LaserJet CP2025dn" +"MFG:Hewlett-Packard;CMD:PJL,PML,PCLXL,POSTSCRIPT,PCL;MDL:HP Color LaserJet CP2025dn; +CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP2025dn;MEM:MEM=55MB;COMMENT:RES=600x8;" "HP Color LaserJet CP2025dn" +---- + +Device ID is in this case (see http://www.cups.org/documentation.php/doc-1.5/man-backend.html[backend(7)]) the last but one field. + +== Which print queues are available for me? + +The queues on your machine can be permanent ones or temporary. CUPS is capable to list all available print queues on the local network (permanent and temporary queues) by: + +---- +$ lpstat -e +---- + +For permanent queues you are able to get more info with: + +---- +$ lpstat -t +---- + +== Which driver am I using? + +The PPD file for the printer queue can tell you which driver is in use. You can use this command to find out which driver is being used: + +---- +grep -H '^*NickName:' /etc/cups/ppd/*.ppd +---- + +You can also find this out using the [command]`system-config-printer` application. Double-click on the icon for the queue and look at the Make and Model field. + +To see the available drivers, click on the _Change..._ button next to that field. You might find it useful to try another driver to see if that shows the same problem. + +=== Driverless models + +Most printers released since 2010 are capable of AirPrint or IPP Everywhere, which means they don't need to be installed to work - the device is found by Avahi and the print capabilities are communicated via IPP protocol - they are basically driverless devices. There are two solutions in Fedora which implement IPP everywhere: + +- CUPS 'everywhere' model +- cups-filters 'driverless' driver + +==== CUPS 'everywhere' model + +It is CUPS implementation of IPP everywhere standard, available as a special printer model. The model is used when you use CUPS temporary queue for your device or if you install your device with as IPP Everywhere model in CUPS web ui or via lpadmin (using `-m everywhere`). + +Because the created PPD file depends on IPP communication with printer, we need info which is gathered from the device. You can use [command]`ipptool` for that: + +---- +$ ipptool --ippserver ipptool.attr get-printer-attributes.test +---- + +Attach the created [filename]`ipptool.attr` to the bugzilla ticket if needed. + +==== cups-filters 'driverless' driver + +Cups-filters special driver which is used for generating PPD according IPP Everywhere standard. The driver is used if you choose *driverless* model during printer installation. + +We need get-printer-attributes request output too: + +---- +$ ipptool --ippserver ipptool.attr get-printer-attributes.test +---- + +and debug logs from the driver itself when it generates PPD for your device: + +---- +$ driverless -d cat 2> driverless_debug > created_ppd +---- + +Attach all created files to the bugzilla ticket if needed. + +== Finding where the problem lies + +When a print job is processed it is sent through a chain of _filters_ to convert the file into a format the printer can understand, and then finally sent to a _backend_, a program which can transport the data to the printer. By slightly changing how you print you can try a different printing path to see if that changes anything. If it works around the problem, you know which area the problem was in -- include that information in a bug report so that we can fix it. + +=== Application + +Try printing from a different application to see if the problem goes away or if it occurs regardless of how a file is printed. Try printing the document from the command line using the [command]`lp` command. + +=== Document format + +If you are having problems printing PDF files, try printing other types of file to see if the problem is with printing anything or if it is specific to printing PDF files. Try converting the file to a different format and printing that. + +If the problem relates to printing text files, try removing/installing the paps package. This package provides an alternative text-to-PostScript filter to the one that comes with CUPS. + +To inspect the document that was submitted to CUPS for printing, enable the [option]`PreserveJobFiles` option like this: + +---- +cupsctl PreserveJobFiles=yes +---- + +Submitted job documents will remain in `/var/spool/cups`. There are files with two types of names - [filename]`dXXXXX-YYY` and [filename]`cXXXXX`. [filename]`dXXXXX-YYY` is file which goes to CUPS system, unfiltered file - `XXXXX` is job ID, which is filled with zeros to be 5 characters long, and `YYY` is sequence number of file in the job. [filename]`cXXXXX` is file which contains printing options for a job specified by job ID in `XXXXX`. Please attach [filename]`dXXXXX-YYY` to the bug for a job when you experience the issue + +==== Running filters by hand + +More advanced users may like to try running the CUPS filters by hand and examining the data file at each step as it is converted between different formats. Here is an example of doing this for a gutenprint queue named pqueue with the CUPS test page which is its own special MIME type, `application/vnd.cups-banner`: + +First you need to know the filter pipeline for `application/vnd.cups-banner` -> `printer/pqueue` (output MIME type). You can either xref:_enable_cups_debug_logging[enable debugging], print a test page, get xref:_cups_job_log[CUPS job log] and in cups_job_log you'll find something similar to: + +---- +envp[29]="FINAL_CONTENT_TYPE=printer/pqueue" +Started filter /usr/lib/cups/filter/bannertopdf (PID 1111) +Started filter /usr/lib/cups/filter/pdftopdf (PID 1112) +Started filter /usr/lib/cups/filter/gstoraster (PID 1113) +Started filter /usr/lib/cups/filter/rastertogutenprint.5.2 (PID 1114) +---- + +or run + +---- +/usr/lib/cups/filter/bannertopdf 1 me '' 1 '' bannertopdf.pdf +cupsfilter -e -m printer/pqueue -p /etc/cups/ppd/pqueue.ppd bannertopdf.pdf > /dev/null +---- + +and you'll see: + +---- +INFO: pdftopdf (PID 1111) started. +INFO: gstoraster (PID 1112) started. +INFO: rastertogutenprint.5.2 (PID 1113) started. +---- + + +[NOTE] +=============================== +This filter pipeline is from cups-1.6. With cups < 1.6 you can see bannertops -> pstops -> pstoraster instead. +=============================== + +Now you can run filters by hand: + +---- +export PPD=/etc/cups/ppd/pqueue.ppd +/usr/lib/cups/filter/bannertopdf 1 me '' 1 '' bannertopdf.pdf +/usr/lib/cups/filter/pdftopdf 1 me '' 1 '' pdftopdf.pdf +/usr/lib/cups/filter/pdftoraster 1 me '' 1 ''out.ras +/usr/lib/cups/filter/rastertogutenprint.5.2 1 me '' 1 ''out.prn +---- + +Here, [command]`evince` or [command]`okular` can be used to examine the output after the first two filters, [command]`rasterview` can be used to examine the output of the third filter, and the last filter's output must be inspected by hand or sent directly ([command]`lpr -oraw out.prn`) to the printer. + +=== Driver + +If you have access to a different make/model of printer it might be worth trying to see if the problem occurs on both of them or just one. This can give an indication about whether it is a problem with a particular driver, or if it is a more general problem. + +Even if you only have access to the one printer there is often a choice of drivers to use for a given printer model, and trying each one in turn can be useful in narrowing down the problem. See xref:_which_driver_am_i_using[above] for how to do that. + +==== Foomatic + +For Foomatic drivers you can try enabling Foomatic debugging by editing the file [filename]`/etc/foomatic/filter.conf` and adding a line: + +---- +debug: 1 +---- + +Next time you print a job to a queue using foomatic the debugging will be put in [filename]`/tmp/foomatic-rip.log`, and the input file as received by foomatic-rip will be in [filename]`/tmp/foomatic-rip.ps`. + +=== Backend (job transport) + +It may be possible for you to try a different backend. Using [command]`system-config-printer`, double-click on the printer queue icon and click the _Change..._ button next to the _Device URI_ field. You may see a _Connection_ expander arrow near the bottom right hand corner of the window -- click that to see which backends are available. For USB-connected HP printers, typically either of the *hp* and *usb* backends can be used. + +For capturing USB communication: + +* find out the bus number where USB device is connected, f.e.: + +---- +$ lsusb +Bus 002 Device 010: ID 03f0:012a HP, Inc HP LaserJet M1536dnf MFP + + = +---- + +* start USB packet capture: + +---- +$ sudo tcpdump -i usbmonN -s0 -w usb.pcap +---- + +where N is the bus number. + +For network printers you may have different protocols you can try. + +* *socket* is for HP JetDirect (usually port 9100) +* *lpd* is for older style UNIX print shares +* *smb* is for CIFS shares from Windows systems +* *ipp* is for Internet Printing Protocol-enabled devices and also for other CUPS servers +-- You can capture the IPP traffic with [command]`tcpdump` like this (the interface name may differ from *p4p1*): + +---- + tcpdump -n -i p4p1 -U -s0 -w ipp.pcap port ipp +---- + +* *bjnp* is for Canon's proprietary bjnp network protocol (usually port 8611) + +=== Configuration tool + +If your problem relates to configuring print queues, try using one of the other methods of doing so. There are four available: + +* The GNOME 3 System Settings application (*control-center*), _System Settings_ > _Printers_ from the GNOME Shell +* [command]`system-config-printer`, _System_ > _Administration_ > _Printing_ from the GNOME menu +* the CUPS web interface, http://localhost:631/ +* the command line tools [command]`lpadmin`, [command]`lpoptions`, [command]`cupsctl`, [command]`cupsaccept`, [command]`cupsenable` etc. diff --git a/modules/ROOT/pages/_partials/2delete-proc_installing-chromium-web-browser.adoc b/modules/ROOT/pages/_partials/2delete-proc_installing-chromium-web-browser.adoc new file mode 100644 index 0000000..a2c18f5 --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-proc_installing-chromium-web-browser.adoc @@ -0,0 +1,95 @@ +[id='installing'] += Installing the browsers + +Both Chromium and Google Chrome can be installed on Fedora. + + +[id='installing-chromium'] +== Installing Chromium + +Chromium can be installed using the Software application and via command line. + +=== Installing Chromium using Software (GUI) + +. Click on Software tool in Fedora. + +. Search for Chromium Web Browser. + +. Click on Install. + +=== Installing Chromium using Terminal + +. To install Chromium Web Browser, use the command: ++ +---- +# dnf install chromium +---- ++ +. To upgrade Chromium, use the command: ++ +---- +# dnf upgrade chromium +---- + +[TIP] +==== +If you require support for non-free multimedia formats like H.264 or AAC, or the ability to play DRM-protected media such as Netflix, Spotify, etc. it may be preferable to install the *chromium-freeworld* package from the https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/[RPM Fusion] repositories, as the necessary plug-ins are already built-in. +==== + +[id='installing-chrome'] +== Installing Chrome + +Chrome can be installed using Software or a terminal, once the repository is enabled. + +=== Installing Chrome using Software (GUI) + +. Open the *Software* application. + +. Click on the menu at the top right and select *Software Repositories*. + +. Make sure Third Party Repositories is enabled. If the button label is *Install*, then click that button to install the third party repositiories. If the button reads *Remove All* then the third party repositories are already installed. ++ +image:installing-chromium-or-google-chrome-browsers-0.png[] ++ +. Scroll down to find the repository called *google-chrome*. Click on it and choose *Enable*. ++ +image:installing-chromium-or-google-chrome-browsers-1.png[] + +You can now search for *Google Chrome* in Software, and install it. + +=== Installing Chrome using Terminal + +The additional repositories can also be managed using a terminal and DNF. + +. Install Third Party Repositories ++ +---- +$ sudo dnf install fedora-workstation-repositories +---- ++ +. Enable the Google Chrome repo: ++ +---- +$ sudo dnf config-manager --set-enabled google-chrome +---- ++ +. Finally, install Chrome: ++ +---- +$ sudo dnf install google-chrome-stable +---- + +[NOTE] +==== +If you want to install the Chrome Dev Channel version, use the following command: + +---- +$ sudo dnf install google-chrome-unstable +---- + +If you want to install Chrome Beta use the following: + +---- +$ sudo dnf install google-chrome-beta +---- +==== diff --git a/modules/ROOT/pages/_partials/2delete-proc_installing_vlc.adoc b/modules/ROOT/pages/_partials/2delete-proc_installing_vlc.adoc new file mode 100644 index 0000000..e018adb --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-proc_installing_vlc.adoc @@ -0,0 +1,10 @@ +[[installing-vlc]] += Installing VLC + + +* Install VLC: ++ +---- +$ sudo dnf install vlc +---- + diff --git a/modules/ROOT/pages/_partials/2delete-proc_running_vlc.adoc b/modules/ROOT/pages/_partials/2delete-proc_running_vlc.adoc new file mode 100644 index 0000000..3272b74 --- /dev/null +++ b/modules/ROOT/pages/_partials/2delete-proc_running_vlc.adoc @@ -0,0 +1,20 @@ +[[running-vlc]] += Running VLC + +* To run the VLC media player using GUI: ++ +-- +. Open the launcher by pressing the _Super_ key. +. Type _vlc_. +. Press _Enter_. +-- + + +* To run VLC from the command line: ++ +[subs="quotes"] +---- +$ vlc _source_ +---- ++ +Replace _source_ with path to the file to be played, URL, or other data source. For more details, see link:https://wiki.videolan.org/Documentation:Command_line/#Opening_streams[Opening streams] on VideoLAN wiki. diff --git a/modules/ROOT/pages/_partials/con_cups-user-stories.adoc b/modules/ROOT/pages/_partials/con_cups-user-stories.adoc deleted file mode 100644 index 67c8049..0000000 --- a/modules/ROOT/pages/_partials/con_cups-user-stories.adoc +++ /dev/null @@ -1,114 +0,0 @@ -[id='proc_cups-user-stories'] -= User stories - -There are several common user stories when it comes to debugging printing issues. I'll mention some of them with steps how to get necessary information. - -== I have HP printer and have a problem with HPLIP script - -Please follow the steps in the following sections: - -* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] -* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_journal_logging[start to capture journal logs] -* xref:how-to-debug-printing-problems.adoc#_hplip_scripts_debug_logging[run the script with enabled debugging] -* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_journal_logging[get the journal logs] -* attach the files to the bugzilla ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] -* provide printer model name and printer PPD file from `/etc/cups/ppd/` - -== I have HP printer, installed it with HPLIP and have a problem with it - -HPLIP installed print queue has a device uri starting with hp://. - -Please follow the steps in the following sections: - -* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] -* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_journal_logging[start to capture journal logs] -* trigger your issue -* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_journal_logging[get the journal logs] -* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB -* attach the files to the bugzilla ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] -* provide printer model name and printer PPD file from `/etc/cups/ppd/` - -== My printer doesn't print correctly or at all, but I can see the printer in print dialog - -Please follow the steps in the following sections: - -* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] -* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture logs] -* trigger your issue - print the specific document to the specific print queue you have problem with -* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[get the logs] -* attach the created files to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] -* attach your printer PPD file from `/etc/cups/ppd/` if available -* attach the file you wanted to print -* tell what application you printed from -* mention your xref:how-to-debug-printing-problems.adoc#_which_driver_am_i_using[printer model] -* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB - -== CUPS generic issue - -For generic issues - printer wasn't found, segfault - please follow the steps in the following sections (`avahi-daemon` must run): - -* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] -* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture logs] -* trigger the issue - e.g. try to find printers via [command]`sudo lpinfo -l -v`, do some action in web ui - depends on your problem -* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[get the logs] -* attach created files to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] -* put the output of xref:how-to-debug-printing-problems.adoc#_what_make_and_model_is_my_printer[lpinfo] into a file and attach it -* put the output of xref:how-to-debug-printing-problems.adoc#_which_print_queues_are_available_for_me[both lpstat commands] into a file and attach it -* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB - -== My printer doesn't print correctly - I use 'everywhere' model - -Please follow the steps in the following sections: - -* xref:how-to-debug-printing-problems.adoc#_cups_everywhere_model[get data from get-printer-attributes request] -* xref:how-to-debug-printing-problems.adoc#_my_printer_doesnt_print_correctly_or_at_all_but_i_can_see_the_printer_in_print_dialog[follow the steps with CUPS job log user story] - -== I have a generic problem with cups-browsed - -Please follow the steps in the following sections: - -* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] -* xref:how-to-debug-printing-problems.adoc#_cups_browsed_logging[enable cups-browsed logging], but don't restart cups-browsed yet. -* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture cupsd logs] -* start cups-browsed via `systemctl` and start to capture its logs: - ----- -$ journalctl -u cups-browsed -f > cups_browsed_log ----- - -* trigger the issue or wait until cups-browsed triggers the issue itself -* cancel cups-browsed and xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[cupsd log] captures -* attach created files [filename]`cups_whole_log` and [filename]`cups_browsed_log` to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] - -== Printer found by cups-browsed doesn't print or print badly - -The most difficult user story - we need to know how the print queue was created and how it behaves during printing. The print queue found by cups-browsed has a device uri starting with `implicitclass://`. - -Please follow the steps: - -* xref:how-to-debug-printing-problems.adoc#_cups_filters_driverless_driver[get printer info from get-printer-attributes and PPD file] -* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] -* xref:how-to-debug-printing-problems.adoc#_cups_browsed_logging[enable cups-browsed logging], but don't restart cups-browsed yet. -* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture cupsd logs] -* start cups-browsed via `systemctl` and start to capture its logs: - ----- -$ journalctl -u cups-browsed -f > cups_browsed_queue_creation ----- - -* give cups-browsed some time to process found devices (depends on how many devices you have in the local network or how many print queues are stored in the location you set with [option]`BrowsePoll` directive) -* cancel cups-browsed and xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[cupsd log] captures - save the files as `cups_queue_creation` and `cups_browsed_queue_creation` - -Now we need to capture the logs during printing: - -* xref:how-to-debug-printing-problems.adoc#_prepare_cups_for_job_logging[prepare CUPS for job logging] -* xref:cups-useful-tricks.adoc#_restarting_cups_service[restart CUPS service] -* start to capture cups_browsed logs again: - ----- -$ journalctl -u cups-browsed -f > cups_browsed_printing ----- - -* trigger your issue - print the specific document to the specific print queue you have problem with -* xref:how-to-debug-printing-problems.adoc#_get_a_job_log_for_a_specific_job_id[get the job log for the job you have just triggered] and cancel the capture of cups-browsed logging -* attach all gathered log files diff --git a/modules/ROOT/pages/_partials/concept_chromium-web-browser.adoc b/modules/ROOT/pages/_partials/concept_chromium-web-browser.adoc deleted file mode 100644 index 5dad452..0000000 --- a/modules/ROOT/pages/_partials/concept_chromium-web-browser.adoc +++ /dev/null @@ -1,16 +0,0 @@ -[id='chromium-and-google-chrome'] -= Chromium and Google Chrome web browsers - -Fedora Workstation, in its out of the box configuration, only includes free and open source software. **Mozilla Firefox** is the browser included in Fedora Workstation by default. However, it easy to install either **Google Chrome** or **Chromium**, if preferred. - -[id='chromium'] -== Chromium - -Chromium is the upstream project for Google Chrome. Chromium is included in the Fedora Repositories. Fedora's Chromium package only contains free and open source software, so does not include several features of Google Chrome that rely on proprietary software. - -[id='google-chrome'] -== Google Chrome - -Google Chrome is a popular web browser developed by Google. Chrome is built on top of the open-source browser project, Chromium. Chrome includes additional features such as support for proprietary media files (such as H.264 or AAC) and playback of rights-protected media (Netflix, etc.) Chrome also includes support for other Google services such as browser sync and location services, which are not supported by Chromium. - -Google Chrome is available in Fedora Workstation via a curated third-party repository. Once this repository is enabled, Chrome can be installed via Software or the command line. diff --git a/modules/ROOT/pages/_partials/proc_cups-how-to-debug-scanning-issues.adoc b/modules/ROOT/pages/_partials/proc_cups-how-to-debug-scanning-issues.adoc deleted file mode 100644 index 3313a05..0000000 --- a/modules/ROOT/pages/_partials/proc_cups-how-to-debug-scanning-issues.adoc +++ /dev/null @@ -1,115 +0,0 @@ -[id='proc_cups-how-to-debug-scanning-issues'] -= How to debug scanning issues - -SANE library, communication libraries and backends can turn on and off debug logging via `SANE_DEBUG_*` environment variables. - -The common environment variables: - -* `SANE_DEBUG_DLL` - enables debugging SANE library -* `SANE_DEBUG_SANEI_USB` - enables debugging communication library for USB - add the environment variable if your device is connected via USB cable -* `SANE_DEBUG_SANEI_TCP` - enables debugging communication library for wireless/ethernet - add the environment variable if your device is connected by Wifi or Ethernet - -Environment variables for enabling debugging a specific backends have a structure - `SANE_DEBUG_`, so the environment variable for f.e. *HPAIO* backend is `SANE_DEBUG_HPAIO*`. - -You can find which SANE backend supports your device http://www.sane-project.org/sane-mfgs.html[here]. If your device is HP and it isn't supported by *airscan* backend or any other SANE backend, it can be supported by *hpaio* backend from *hplip* package, see the list of supported devices https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index[here]. - -== Debugging scanner discovery - -If you don't see your scanner in scanning application, then debugging of discovery process is in order. I prefer using [command]`scanimage` in the examples, but the similar steps can be applied for every scanning application like [command]`xsane`, [command]`scanadf`, [command]`simple-scan` etc. - -You will need to use environment variables when you start a scanning application ([command]`scanimage` in this case). The environment variables used with [command]`scanimage` command depends on how your scanner is connected and which backend suppose to support it. So for getting debug logs for HP LaserJet device, *connected via Ethernet/Wifi and supported by HPAIO backend*, use command: - ----- -$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 scanimage -L &> discovery_output ----- - -or, f.e. if you have CanoScan 8600F, connected by USB and supported by genesys backend, use command: - ----- -$ SANE_DEBUG_DLL=255 SANE_DEBUG_GENESYS=255 SANE_DEBUG_SANEI_USB=255 scanimage -L &> discovery_output ----- - -Please attach the created [filename]`discovery_output` file as an attachment to the bugzilla ticket. - -== Debugging scanning process - -If the scanner is found, but an issue happens during scanning itself, we need to debug scanning process itself - which means debugging communication between backend and scanner when you start scanning a document. - -The debugging scanning itself looks similar as discovery - setup the environment variables before running the command/scanning application and catch logs into a file. The possible command can be (f.e. if you have *network scanner supported by HPAIO backend*): - ----- -$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 xsane &> debug_log ----- - -or (once you find out device uri from [command]`scanimage -L` - see the xref:_getting_a_scanner_device_uri[next section]): - ----- -$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 scanimage -d > out.pnm 2> debug_log ----- - -, where you substitute `` for the actual device uri, f.e. 'hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112'. - -Please attach the created file - [filename]`debug_log` - as an attachment to the bugzilla ticket. - -== Getting a scanner device uri - -This point is basically a manual how to get a scanner uri for debugging scanning itself via [command]`scanimage`. You don't need to provide a scanner uri in GUI applications like [command]`xsane` or [command]`simple-scan`, because the application will do it for you or you can choose the scanner by a mouse click. - -The [command]`scanimage -L` command returns an output where device uri of the device is shown, f.e.: - ----- -$ scanimage -L -device `v4l:/dev/video0' is a Noname Integrated Camera: Integrated C virtual device -device `hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112&queue=false' is a Hewlett-Packard laserjet_m1536dnf_mfp all-in-one ----- - -F.e.the string 'hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112&queue=false' is a device uri for for Hewlett-Packard laserjet_m1536dnf_mfp all-in-one scanner. - -== Debugging HP scanner if it is supported by HPLIP - -The hplip package doesn't have unified logging, so some logs come out of HPAIO backend to standard output and HP internal utilities logs come to journal. So we need to capture both to get the understanding of situation. - -It can be done this way: - -* start capturing journal logs at background: - ----- -$ journalctl -f > journal_logs & ----- - -* trigger an action (xref:_debugging_scanner_discovery[discovery] or xref:_debugging_scanning_process[scanning]) -* kill the journalctl process, f.e. this way (if there is only one journactl process) - ----- -$ kill `pidof journalctl` ----- - -then attach the created file - [filename]`journal_logs` - as an attachment to the bugzilla ticket. Please do only one action per capture - that means if you are asked to attach log files for HP scanner discovery and scanning supported by hplip, you will attach as an attachment four files - [filename]`discovery_output`, [filename]`journal_logs` for discovery output, [filename]`debug_logs` and [filename]`journal_logs` for debug_logs. - -== Debugging sane-airscan - -If your device supports eSCL or WSD (you can find it out from device specification - look for the mentioned protocols or AirScan), then its scanning functionality is supported by *sane-airscan*. Regarding debugging, on the top of usual logging sane-airscan gathers a communication dump and output image, which is helpful during investigation. - -sane-airscan debugging can be enabled in [filename]`/etc/sane.d/airscan.conf` by setting: - ----- -[debug] -trace = /path/to/dir/where/debugfiles/will/be/saved -enable = true ----- - -Then do trigger your issue (xref:_debugging_scanner_discovery[discovery] or xref:_debugging_scanning_process[scanning]), go to the dir you defined in [filename]`/etc/sane.d/airscan.conf`, take all files from there and attach them to the bug ticket. - -== How to divide logs - -In case your debug log is too big for bugzilla to attach (because your issue doesn't happen with the lowest settings or logs are big even with the lowest settings), do divide the logs to three files like this: - ----- -$ grep dll debug_log > debug_log_dll -$ grep debug_log > debug_log_connection -$ grep debug_log > debug_log_backend ----- - - is the name of backend which supports your scanner (pixma, genesys, plustek, hpaio, airscan etc.), is the type of connection you use for the device (tcp, usb). - -The division makes the investigation more difficult (the person needs to have three opened files at the same time), so do divide the logs only if log file is too big. diff --git a/modules/ROOT/pages/_partials/proc_cups-identifying-your-problem-area.adoc b/modules/ROOT/pages/_partials/proc_cups-identifying-your-problem-area.adoc deleted file mode 100644 index ce34651..0000000 --- a/modules/ROOT/pages/_partials/proc_cups-identifying-your-problem-area.adoc +++ /dev/null @@ -1,422 +0,0 @@ -[id='proc_cups-identifying-your-problem-area'] -= Identifying your problem area - -Printing issues can be fairly complex and active cooperation or lots of data can be requested from reporter by maintainer to helping maintainer to at least understand and (if it is not hardware specific issue) reproduce the issue, so please have a patience and try to narrow the problem as much you are able to for maintainers. - -There can be: - -* issues with seeing or connecting to the printer (it can be cups backend issues, avahi issues, libusb issues, cups-browsed issues), -* accessibility issues (correct/wrong setup in cupsd.conf or its bad interpretation by cupsd daemon, bad cooperation with NIS, SSSD...), -* printing with help of samba (issues with smb backend, which is part of samba) or with samba authenticated through Kerberos (samba_krb5_printing), -* issues with filters used during filtering the document into document format supported by printer, which influence how or if the document will be printed (issue with filters - pdftops, pdftopdf, pstops, bannertopdf etc. - or issues with binaries or libraries which filters uses - libgs, qpdf, poppler...), -* issues with Postscript Printer Description files, which are old way of defining printers capabilities like supported page sizes, borders etc... - -Not mentioning possible limitations or issues in firmware or hardware of printer itself, so any kind of data or narrowing the issue is welcomed. - -The best start is to attach files with logs described further down. - -== CUPS logging - -All CUPS logging is redirected to journal by default since Fedora 28 (there was a redirecting of error_log to journal by default before Fedora 28). - -We need to define two different ways of capturing incident-bound CUPS whole logs - the one if the broken print queue isn't provided by HPLIP and the other if it is. They differs in the filter option of journald - if you use non-HPLIP queue for debugging, it is okay to gather the logs from cups systemd unit (by '-u cups'), because all error messages are correctly redirected to cups systemd unit logging and they are accessible in the output after unit filtering. HPLIP libraries are not implemented to do the same (upstream is unresponsive to accept a potencial fix into the project and the issue is not critical enough to drag a downstream patch forever), so their messages aren't marked for cups systemd unit and they're filtered out after calling journald with '-u cups'. For such queues journald log without filtering is required. - -[NOTE] -=============================== -Incident-bound journald log without filtering is required only for HPLIP print queues (their device uri starts with hp://) and it is unwanted for other queues, because it can be hard to read in larger cases. Please attach incident-bound journald log only when it is necessary. -=============================== - -=== Location of CUPS logging - -CUPS logging is located in the system journal by default, but the logging into a file can be set in [filename]`/etc/cups/cups-files.conf` with directive [option]`ErrorLog`. If you want to change the default settings, then the name of the logging file is irrelevant, but it is recommended to put the file into path `/var/log/cups`, otherwise SELinux will block cupsd from accessing it. - -Setting the logging to a file has following cons (without further operations): - -* unable to get only logs connected to a job without chaining more commands -* unable to get logs for specified time frame without chaining more commands - -For capturing a incident-bound logs `tail -f` can be used e.g.: - ----- -tail -f /var/log/cups/error_log ----- - -=== Enable CUPS debug logging - -Enable full debugging information with: - ----- -$ cupsctl LogLevel=debug2 ----- - -=== CUPS job log - -[IMPORTANT] -=============================== -If the problem appears when you sent document to print or if you are trying to, capture logs for this job. If the job log is available, its attaching is *REQUIRED*. -=============================== - -==== Prepare CUPS for job logging - -For being able to see specific job log, please turn on: - ----- -PreserveJobFiles Yes ----- - -in your [filename]`/etc/cups/cupsd.conf` file and restart cup service. Do not forget to remove the line after you are done with debugging. [command]`lpstat -W all` seems to be empty after printing if you do not enable the directive. - -==== Get a job log for a specific job ID - -To capture job log you need to know Job ID (JID) of the job - it is the number after dash in a request ID: - -Request ID looks like this: - ----- -- ----- - -and can be seen in terminal if you send a document to print by [command]`lp` command: - ----- -$ lp -d ... -request id is - (N file(s)) ----- - -Or when you list jobs (see [command]`man lpstat`) - the latest job is at the end: - ----- -$ lpstat -W all -... -- 1024 Wed 11 Jan 2017 05:52:19 PM CET ----- - -You can get the latest job logs automatically (if you have [command]`awk` installed and [command]`lpstat -W` all returns jobs) by: - ----- -$ journalctl -u cups JID=`lpstat -W all | awk '{print $1}' | awk -F '-' '{print $NF}' | tail -n 1` > cups_job_log ----- - -Or manually, if you found JID by yourself: - ----- -journalctl -u cups JID= > cups_job_log ----- - -=== Incident-bound cupsd log (broken print queue isn't HPLIP supported) - -Sometimes we cannot bind the error with a specific print job, so the job log is uneffective. Incident-bound cupsd log is needed. - -==== How to start to capture incident-bound cupsd logging - -In new terminal/terminal tab, please issue: - ----- -journalctl -f -u cups > cups_whole_log ----- - -==== How to get incident-bound cupsd logging - -After you trigger the error condition you are trying to diagnose e.g. printing something, try to find a printer via [command]`lpinfo` etc., you terminate capturing incident-bound cupsd log from xref:_how_to_start_to_capture_incident_bound_cupsd_logging[step above] by `+`. - -=== Incident-bound cupsd log (broken print queue is HPLIP supported) - -Unfortunately, HPLIP libraries don't log into CUPS unit in journal, so if your print queue is installed with HPLIP driver (its device uri starts with `hp://`), we need incident-bound journal log. - -==== How to start to capture incident-bound journal logging - -In new terminal/terminal tab, please issue: - ----- -journalctl -f > journal_whole_log ----- - -==== How to get incident-bound journal logging - -After you trigger the error condition you are trying to diagnose e.g. printing something, running HP script etc., you terminate capturing incident-bound journal log from xref:_how_to_start_to_capture_incident_bound_journal_logging[step above] by `+`. - -=== Turning off debug logging - -Please attach [filename]`cups_job_log` for the problematic job, [filename]`cups_whole_log` or [filename]`journal_log` if you caught whole cupsd log during the problematic event to bug report as an attachment. - -Then to turn off debugging information, do this: - ----- -$ sudo sed -i 's,LogLevel debug2,LogLevel warn,' /etc/cups/cupsd.conf -$ sudo systemctl restart cups ----- - -=== More commands for working with systemd-journald - -View the log messages with: - ----- -journalctl -u cups -e ----- - -or: - ----- -journalctl -u cups --since=... ----- - -To filter out messages relating to a specific job ID, use: - ----- -journalctl -u cups JID=... ----- - -(tab completion will show you which job IDs have log messages) - -== cups-browsed logging - -cups-browsed daemon was introduced in Fedora around cups-1.5 version. It can browse Bonjour broadcasts, CUPS broadcasts (deprecated) and LDAP servers for printers and create or remove local queues pointing to those printers. It can creates broadcasts of local CUPS queues, but it is marked as deprecated. - -For setting debug logging on you need to add: - ----- -DebugLogging stderr ----- - -to [filename]`/etc/cups/cups-browsed.conf`. - -The logs will be available in system journal after cups-browsed restart. - -== HPLIP scripts debug logging - -Python scripts from HPLIP (e.g. [command]`hp-setup`, [command]`hp-clean`, [command]`hp-scan`) have debug logging redirected to the standard error file descriptor, so they are not logged in journal. For getting their debug logging, run the script with `-ldebug` parameter e.g.: - ----- -$ hp-setup -ldebug -i ----- - -and reproduce the issue. Then copy the messages from terminal into [filename]`hp_script_log`. Please attach the file to the bugzilla ticket too. - -== What make and model is my printer? - -Each different printer has a model-specific Device ID. You can find out with the [command]`lpinfo` command: - ----- -su -c "lpinfo -l -v" ----- - -This command runs each of the backends in discovery mode, to get them to report devices they can automatically detect. This will output a series of blocks of lines, each one like this: - ----- -Device: uri = usb://HP/DESKJET%20990C?serial=U123456789AB - class = direct - info = HP DESKJET 990C - make-and-model = HP DESKJET 990C - device-id = MFG:HEWLETT-PACKARD;MDL:DESKJET 990C;CMD:MLC,PCL,PML;CLS:PRI -NTER;DES:Hewlett-Packard DeskJet 990C;SN:U123456789AB;S:00808880800010032C100000 -0C2000000;P:0800,FL,B0;J: ; - location = ----- - -The line which identifies this particular model type is the long one that starts "device-id =" (shown here wrapping over three lines). - -Note that if your printer cannot be automatically detected, you may still be able to find out the Device ID by running the appropriate backend with the printer hostname as the argument. The *usb*, *parallel*, *snmp*, and *dnssd* backends all try to report the actual Device ID given by the printer. - ----- -$ /usr/lib/cups/backend/snmp 10.34.18.3 - -network socket://10.34.18.3 "HP Color LaserJet CP2025dn" "HP Color LaserJet CP2025dn" -"MFG:Hewlett-Packard;CMD:PJL,PML,PCLXL,POSTSCRIPT,PCL;MDL:HP Color LaserJet CP2025dn; -CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP2025dn;MEM:MEM=55MB;COMMENT:RES=600x8;" "HP Color LaserJet CP2025dn" ----- - -Device ID is in this case (see http://www.cups.org/documentation.php/doc-1.5/man-backend.html[backend(7)]) the last but one field. - -== Which print queues are available for me? - -The queues on your machine can be permanent ones or temporary. CUPS is capable to list all available print queues on the local network (permanent and temporary queues) by: - ----- -$ lpstat -e ----- - -For permanent queues you are able to get more info with: - ----- -$ lpstat -t ----- - -== Which driver am I using? - -The PPD file for the printer queue can tell you which driver is in use. You can use this command to find out which driver is being used: - ----- -grep -H '^*NickName:' /etc/cups/ppd/*.ppd ----- - -You can also find this out using the [command]`system-config-printer` application. Double-click on the icon for the queue and look at the Make and Model field. - -To see the available drivers, click on the _Change..._ button next to that field. You might find it useful to try another driver to see if that shows the same problem. - -=== Driverless models - -Most printers released since 2010 are capable of AirPrint or IPP Everywhere, which means they don't need to be installed to work - the device is found by Avahi and the print capabilities are communicated via IPP protocol - they are basically driverless devices. There are two solutions in Fedora which implement IPP everywhere: - -- CUPS 'everywhere' model -- cups-filters 'driverless' driver - -==== CUPS 'everywhere' model - -It is CUPS implementation of IPP everywhere standard, available as a special printer model. The model is used when you use CUPS temporary queue for your device or if you install your device with as IPP Everywhere model in CUPS web ui or via lpadmin (using `-m everywhere`). - -Because the created PPD file depends on IPP communication with printer, we need info which is gathered from the device. You can use [command]`ipptool` for that: - ----- -$ ipptool --ippserver ipptool.attr get-printer-attributes.test ----- - -Attach the created [filename]`ipptool.attr` to the bugzilla ticket if needed. - -==== cups-filters 'driverless' driver - -Cups-filters special driver which is used for generating PPD according IPP Everywhere standard. The driver is used if you choose *driverless* model during printer installation. - -We need get-printer-attributes request output too: - ----- -$ ipptool --ippserver ipptool.attr get-printer-attributes.test ----- - -and debug logs from the driver itself when it generates PPD for your device: - ----- -$ driverless -d cat 2> driverless_debug > created_ppd ----- - -Attach all created files to the bugzilla ticket if needed. - -== Finding where the problem lies - -When a print job is processed it is sent through a chain of _filters_ to convert the file into a format the printer can understand, and then finally sent to a _backend_, a program which can transport the data to the printer. By slightly changing how you print you can try a different printing path to see if that changes anything. If it works around the problem, you know which area the problem was in -- include that information in a bug report so that we can fix it. - -=== Application - -Try printing from a different application to see if the problem goes away or if it occurs regardless of how a file is printed. Try printing the document from the command line using the [command]`lp` command. - -=== Document format - -If you are having problems printing PDF files, try printing other types of file to see if the problem is with printing anything or if it is specific to printing PDF files. Try converting the file to a different format and printing that. - -If the problem relates to printing text files, try removing/installing the paps package. This package provides an alternative text-to-PostScript filter to the one that comes with CUPS. - -To inspect the document that was submitted to CUPS for printing, enable the [option]`PreserveJobFiles` option like this: - ----- -cupsctl PreserveJobFiles=yes ----- - -Submitted job documents will remain in `/var/spool/cups`. There are files with two types of names - [filename]`dXXXXX-YYY` and [filename]`cXXXXX`. [filename]`dXXXXX-YYY` is file which goes to CUPS system, unfiltered file - `XXXXX` is job ID, which is filled with zeros to be 5 characters long, and `YYY` is sequence number of file in the job. [filename]`cXXXXX` is file which contains printing options for a job specified by job ID in `XXXXX`. Please attach [filename]`dXXXXX-YYY` to the bug for a job when you experience the issue - -==== Running filters by hand - -More advanced users may like to try running the CUPS filters by hand and examining the data file at each step as it is converted between different formats. Here is an example of doing this for a gutenprint queue named pqueue with the CUPS test page which is its own special MIME type, `application/vnd.cups-banner`: - -First you need to know the filter pipeline for `application/vnd.cups-banner` -> `printer/pqueue` (output MIME type). You can either xref:_enable_cups_debug_logging[enable debugging], print a test page, get xref:_cups_job_log[CUPS job log] and in cups_job_log you'll find something similar to: - ----- -envp[29]="FINAL_CONTENT_TYPE=printer/pqueue" -Started filter /usr/lib/cups/filter/bannertopdf (PID 1111) -Started filter /usr/lib/cups/filter/pdftopdf (PID 1112) -Started filter /usr/lib/cups/filter/gstoraster (PID 1113) -Started filter /usr/lib/cups/filter/rastertogutenprint.5.2 (PID 1114) ----- - -or run - ----- -/usr/lib/cups/filter/bannertopdf 1 me '' 1 '' bannertopdf.pdf -cupsfilter -e -m printer/pqueue -p /etc/cups/ppd/pqueue.ppd bannertopdf.pdf > /dev/null ----- - -and you'll see: - ----- -INFO: pdftopdf (PID 1111) started. -INFO: gstoraster (PID 1112) started. -INFO: rastertogutenprint.5.2 (PID 1113) started. ----- - - -[NOTE] -=============================== -This filter pipeline is from cups-1.6. With cups < 1.6 you can see bannertops -> pstops -> pstoraster instead. -=============================== - -Now you can run filters by hand: - ----- -export PPD=/etc/cups/ppd/pqueue.ppd -/usr/lib/cups/filter/bannertopdf 1 me '' 1 '' bannertopdf.pdf -/usr/lib/cups/filter/pdftopdf 1 me '' 1 '' pdftopdf.pdf -/usr/lib/cups/filter/pdftoraster 1 me '' 1 ''out.ras -/usr/lib/cups/filter/rastertogutenprint.5.2 1 me '' 1 ''out.prn ----- - -Here, [command]`evince` or [command]`okular` can be used to examine the output after the first two filters, [command]`rasterview` can be used to examine the output of the third filter, and the last filter's output must be inspected by hand or sent directly ([command]`lpr -oraw out.prn`) to the printer. - -=== Driver - -If you have access to a different make/model of printer it might be worth trying to see if the problem occurs on both of them or just one. This can give an indication about whether it is a problem with a particular driver, or if it is a more general problem. - -Even if you only have access to the one printer there is often a choice of drivers to use for a given printer model, and trying each one in turn can be useful in narrowing down the problem. See xref:_which_driver_am_i_using[above] for how to do that. - -==== Foomatic - -For Foomatic drivers you can try enabling Foomatic debugging by editing the file [filename]`/etc/foomatic/filter.conf` and adding a line: - ----- -debug: 1 ----- - -Next time you print a job to a queue using foomatic the debugging will be put in [filename]`/tmp/foomatic-rip.log`, and the input file as received by foomatic-rip will be in [filename]`/tmp/foomatic-rip.ps`. - -=== Backend (job transport) - -It may be possible for you to try a different backend. Using [command]`system-config-printer`, double-click on the printer queue icon and click the _Change..._ button next to the _Device URI_ field. You may see a _Connection_ expander arrow near the bottom right hand corner of the window -- click that to see which backends are available. For USB-connected HP printers, typically either of the *hp* and *usb* backends can be used. - -For capturing USB communication: - -* find out the bus number where USB device is connected, f.e.: - ----- -$ lsusb -Bus 002 Device 010: ID 03f0:012a HP, Inc HP LaserJet M1536dnf MFP - - = ----- - -* start USB packet capture: - ----- -$ sudo tcpdump -i usbmonN -s0 -w usb.pcap ----- - -where N is the bus number. - -For network printers you may have different protocols you can try. - -* *socket* is for HP JetDirect (usually port 9100) -* *lpd* is for older style UNIX print shares -* *smb* is for CIFS shares from Windows systems -* *ipp* is for Internet Printing Protocol-enabled devices and also for other CUPS servers --- You can capture the IPP traffic with [command]`tcpdump` like this (the interface name may differ from *p4p1*): - ----- - tcpdump -n -i p4p1 -U -s0 -w ipp.pcap port ipp ----- - -* *bjnp* is for Canon's proprietary bjnp network protocol (usually port 8611) - -=== Configuration tool - -If your problem relates to configuring print queues, try using one of the other methods of doing so. There are four available: - -* The GNOME 3 System Settings application (*control-center*), _System Settings_ > _Printers_ from the GNOME Shell -* [command]`system-config-printer`, _System_ > _Administration_ > _Printing_ from the GNOME menu -* the CUPS web interface, http://localhost:631/ -* the command line tools [command]`lpadmin`, [command]`lpoptions`, [command]`cupsctl`, [command]`cupsaccept`, [command]`cupsenable` etc. diff --git a/modules/ROOT/pages/_partials/proc_installing-chromium-web-browser.adoc b/modules/ROOT/pages/_partials/proc_installing-chromium-web-browser.adoc deleted file mode 100644 index a2c18f5..0000000 --- a/modules/ROOT/pages/_partials/proc_installing-chromium-web-browser.adoc +++ /dev/null @@ -1,95 +0,0 @@ -[id='installing'] -= Installing the browsers - -Both Chromium and Google Chrome can be installed on Fedora. - - -[id='installing-chromium'] -== Installing Chromium - -Chromium can be installed using the Software application and via command line. - -=== Installing Chromium using Software (GUI) - -. Click on Software tool in Fedora. - -. Search for Chromium Web Browser. - -. Click on Install. - -=== Installing Chromium using Terminal - -. To install Chromium Web Browser, use the command: -+ ----- -# dnf install chromium ----- -+ -. To upgrade Chromium, use the command: -+ ----- -# dnf upgrade chromium ----- - -[TIP] -==== -If you require support for non-free multimedia formats like H.264 or AAC, or the ability to play DRM-protected media such as Netflix, Spotify, etc. it may be preferable to install the *chromium-freeworld* package from the https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/[RPM Fusion] repositories, as the necessary plug-ins are already built-in. -==== - -[id='installing-chrome'] -== Installing Chrome - -Chrome can be installed using Software or a terminal, once the repository is enabled. - -=== Installing Chrome using Software (GUI) - -. Open the *Software* application. - -. Click on the menu at the top right and select *Software Repositories*. - -. Make sure Third Party Repositories is enabled. If the button label is *Install*, then click that button to install the third party repositiories. If the button reads *Remove All* then the third party repositories are already installed. -+ -image:installing-chromium-or-google-chrome-browsers-0.png[] -+ -. Scroll down to find the repository called *google-chrome*. Click on it and choose *Enable*. -+ -image:installing-chromium-or-google-chrome-browsers-1.png[] - -You can now search for *Google Chrome* in Software, and install it. - -=== Installing Chrome using Terminal - -The additional repositories can also be managed using a terminal and DNF. - -. Install Third Party Repositories -+ ----- -$ sudo dnf install fedora-workstation-repositories ----- -+ -. Enable the Google Chrome repo: -+ ----- -$ sudo dnf config-manager --set-enabled google-chrome ----- -+ -. Finally, install Chrome: -+ ----- -$ sudo dnf install google-chrome-stable ----- - -[NOTE] -==== -If you want to install the Chrome Dev Channel version, use the following command: - ----- -$ sudo dnf install google-chrome-unstable ----- - -If you want to install Chrome Beta use the following: - ----- -$ sudo dnf install google-chrome-beta ----- -==== diff --git a/modules/ROOT/pages/_partials/proc_installing_vlc.adoc b/modules/ROOT/pages/_partials/proc_installing_vlc.adoc deleted file mode 100644 index e018adb..0000000 --- a/modules/ROOT/pages/_partials/proc_installing_vlc.adoc +++ /dev/null @@ -1,10 +0,0 @@ -[[installing-vlc]] -= Installing VLC - - -* Install VLC: -+ ----- -$ sudo dnf install vlc ----- - diff --git a/modules/ROOT/pages/_partials/proc_running_vlc.adoc b/modules/ROOT/pages/_partials/proc_running_vlc.adoc deleted file mode 100644 index 3272b74..0000000 --- a/modules/ROOT/pages/_partials/proc_running_vlc.adoc +++ /dev/null @@ -1,20 +0,0 @@ -[[running-vlc]] -= Running VLC - -* To run the VLC media player using GUI: -+ --- -. Open the launcher by pressing the _Super_ key. -. Type _vlc_. -. Press _Enter_. --- - - -* To run VLC from the command line: -+ -[subs="quotes"] ----- -$ vlc _source_ ----- -+ -Replace _source_ with path to the file to be played, URL, or other data source. For more details, see link:https://wiki.videolan.org/Documentation:Command_line/#Opening_streams[Opening streams] on VideoLAN wiki. diff --git a/modules/ROOT/pages/how-to-debug-printing-problems.adoc b/modules/ROOT/pages/how-to-debug-printing-problems.adoc index 6c50595..c5c1bb3 100644 --- a/modules/ROOT/pages/how-to-debug-printing-problems.adoc +++ b/modules/ROOT/pages/how-to-debug-printing-problems.adoc @@ -1,13 +1,549 @@ -ifdef::context[:parent-context: {context}] -:context: how-to-debug-printing-problems -[id='how-to-debug-printing-problems'] -= How to debug printing problems -:toc: += How to debug printing issues +Brandon Nielsen ; Zdenek Dohnal +:revnumber: F35 onwards +:revdate: 2022-02-10 +:category: Troubleshooting +:tags: How-to printer + If you are experiencing a problem with printing, please take a look at the https://fedoraproject.org/wiki/Bugs/Common[common bugs] page before filing a bug. If the problem you are seeing is not listed there or none of the workarounds seem to help, please consider xref:cups-filing-a-bug-report.adoc#_filing_a_bug_report[filing a bug report] to help us make Fedora run better on your hardware. -include::{partialsdir}/proc_cups-identifying-your-problem-area.adoc[leveloffset=+1] -include::{partialsdir}/con_cups-user-stories.adoc[leveloffset=+1] -ifdef::parent-context[:context: {parent-context}] -ifndef::parent-context[:!context:] + +== Identifying your problem area + +Printing issues can be fairly complex and active cooperation or lots of data can be requested from reporter by maintainer to helping maintainer to at least understand and (if it is not hardware specific issue) reproduce the issue, so please have a patience and try to narrow the problem as much you are able to for maintainers. + +There can be: + +* issues with seeing or connecting to the printer (it can be cups backend issues, avahi issues, libusb issues, cups-browsed issues), +* accessibility issues (correct/wrong setup in cupsd.conf or its bad interpretation by cupsd daemon, bad cooperation with NIS, SSSD...), +* printing with help of samba (issues with smb backend, which is part of samba) or with samba authenticated through Kerberos (samba_krb5_printing), +* issues with filters used during filtering the document into document format supported by printer, which influence how or if the document will be printed (issue with filters - pdftops, pdftopdf, pstops, bannertopdf etc. - or issues with binaries or libraries which filters uses - libgs, qpdf, poppler...), +* issues with Postscript Printer Description files, which are old way of defining printers capabilities like supported page sizes, borders etc... + +Not mentioning possible limitations or issues in firmware or hardware of printer itself, so any kind of data or narrowing the issue is welcomed. + +The best start is to attach files with logs described further down. + +=== CUPS logging + +All CUPS logging is redirected to journal by default since Fedora 28 (there was a redirecting of error_log to journal by default before Fedora 28). + +We need to define two different ways of capturing incident-bound CUPS whole logs - the one if the broken print queue isn't provided by HPLIP and the other if it is. They differs in the filter option of journald - if you use non-HPLIP queue for debugging, it is okay to gather the logs from cups systemd unit (by '-u cups'), because all error messages are correctly redirected to cups systemd unit logging and they are accessible in the output after unit filtering. HPLIP libraries are not implemented to do the same (upstream is unresponsive to accept a potencial fix into the project and the issue is not critical enough to drag a downstream patch forever), so their messages aren't marked for cups systemd unit and they're filtered out after calling journald with '-u cups'. For such queues journald log without filtering is required. + +[NOTE] +=============================== +Incident-bound journald log without filtering is required only for HPLIP print queues (their device uri starts with hp://) and it is unwanted for other queues, because it can be hard to read in larger cases. Please attach incident-bound journald log only when it is necessary. +=============================== + +==== Location of CUPS logging + +CUPS logging is located in the system journal by default, but the logging into a file can be set in [filename]`/etc/cups/cups-files.conf` with directive [option]`ErrorLog`. If you want to change the default settings, then the name of the logging file is irrelevant, but it is recommended to put the file into path `/var/log/cups`, otherwise SELinux will block cupsd from accessing it. + +Setting the logging to a file has following cons (without further operations): + +* unable to get only logs connected to a job without chaining more commands +* unable to get logs for specified time frame without chaining more commands + +For capturing a incident-bound logs `tail -f` can be used e.g.: + +---- +tail -f /var/log/cups/error_log +---- + +==== Enable CUPS debug logging + +Enable full debugging information with: + +---- +$ cupsctl LogLevel=debug2 +---- + +==== CUPS job log + +[IMPORTANT] +=============================== +If the problem appears when you sent document to print or if you are trying to, capture logs for this job. If the job log is available, its attaching is *REQUIRED*. +=============================== + +===== Prepare CUPS for job logging + +For being able to see specific job log, please turn on: + +---- +PreserveJobFiles Yes +---- + +in your [filename]`/etc/cups/cupsd.conf` file and restart cup service. Do not forget to remove the line after you are done with debugging. [command]`lpstat -W all` seems to be empty after printing if you do not enable the directive. + +===== Get a job log for a specific job ID + +To capture job log you need to know Job ID (JID) of the job - it is the number after dash in a request ID: + +Request ID looks like this: + +---- +- +---- + +and can be seen in terminal if you send a document to print by [command]`lp` command: + +---- +$ lp -d ... +request id is - (N file(s)) +---- + +Or when you list jobs (see [command]`man lpstat`) - the latest job is at the end: + +---- +$ lpstat -W all +... +- 1024 Wed 11 Jan 2017 05:52:19 PM CET +---- + +You can get the latest job logs automatically (if you have [command]`awk` installed and [command]`lpstat -W` all returns jobs) by: + +---- +$ journalctl -u cups JID=`lpstat -W all | awk '{print $1}' | awk -F '-' '{print $NF}' | tail -n 1` > cups_job_log +---- + +Or manually, if you found JID by yourself: + +---- +journalctl -u cups JID= > cups_job_log +---- + +==== Incident-bound cupsd log (broken print queue isn't HPLIP supported) + +Sometimes we cannot bind the error with a specific print job, so the job log is uneffective. Incident-bound cupsd log is needed. + +===== How to start to capture incident-bound cupsd logging + +In new terminal/terminal tab, please issue: + +---- +journalctl -f -u cups > cups_whole_log +---- + +===== How to get incident-bound cupsd logging + +After you trigger the error condition you are trying to diagnose e.g. printing something, try to find a printer via [command]`lpinfo` etc., you terminate capturing incident-bound cupsd log from xref:_how_to_start_to_capture_incident_bound_cupsd_logging[step above] by `+`. + +==== Incident-bound cupsd log (broken print queue is HPLIP supported) + +Unfortunately, HPLIP libraries don't log into CUPS unit in journal, so if your print queue is installed with HPLIP driver (its device uri starts with `hp://`), we need incident-bound journal log. + +===== How to start to capture incident-bound journal logging + +In new terminal/terminal tab, please issue: + +---- +journalctl -f > journal_whole_log +---- + +===== How to get incident-bound journal logging + +After you trigger the error condition you are trying to diagnose e.g. printing something, running HP script etc., you terminate capturing incident-bound journal log from xref:_how_to_start_to_capture_incident_bound_journal_logging[step above] by `+`. + +==== Turning off debug logging + +Please attach [filename]`cups_job_log` for the problematic job, [filename]`cups_whole_log` or [filename]`journal_log` if you caught whole cupsd log during the problematic event to bug report as an attachment. + +Then to turn off debugging information, do this: + +---- +$ sudo sed -i 's,LogLevel debug2,LogLevel warn,' /etc/cups/cupsd.conf +$ sudo systemctl restart cups +---- + +==== More commands for working with systemd-journald + +View the log messages with: + +---- +journalctl -u cups -e +---- + +or: + +---- +journalctl -u cups --since=... +---- + +To filter out messages relating to a specific job ID, use: + +---- +journalctl -u cups JID=... +---- + +(tab completion will show you which job IDs have log messages) + +=== cups-browsed logging + +cups-browsed daemon was introduced in Fedora around cups-1.5 version. It can browse Bonjour broadcasts, CUPS broadcasts (deprecated) and LDAP servers for printers and create or remove local queues pointing to those printers. It can creates broadcasts of local CUPS queues, but it is marked as deprecated. + +For setting debug logging on you need to add: + +---- +DebugLogging stderr +---- + +to [filename]`/etc/cups/cups-browsed.conf`. + +The logs will be available in system journal after cups-browsed restart. + +=== HPLIP scripts debug logging + +Python scripts from HPLIP (e.g. [command]`hp-setup`, [command]`hp-clean`, [command]`hp-scan`) have debug logging redirected to the standard error file descriptor, so they are not logged in journal. For getting their debug logging, run the script with `-ldebug` parameter e.g.: + +---- +$ hp-setup -ldebug -i +---- + +and reproduce the issue. Then copy the messages from terminal into [filename]`hp_script_log`. Please attach the file to the bugzilla ticket too. + +=== What make and model is my printer? + +Each different printer has a model-specific Device ID. You can find out with the [command]`lpinfo` command: + +---- +su -c "lpinfo -l -v" +---- + +This command runs each of the backends in discovery mode, to get them to report devices they can automatically detect. This will output a series of blocks of lines, each one like this: + +---- +Device: uri = usb://HP/DESKJET%20990C?serial=U123456789AB + class = direct + info = HP DESKJET 990C + make-and-model = HP DESKJET 990C + device-id = MFG:HEWLETT-PACKARD;MDL:DESKJET 990C;CMD:MLC,PCL,PML;CLS:PRI +NTER;DES:Hewlett-Packard DeskJet 990C;SN:U123456789AB;S:00808880800010032C100000 +0C2000000;P:0800,FL,B0;J: ; + location = +---- + +The line which identifies this particular model type is the long one that starts "device-id =" (shown here wrapping over three lines). + +Note that if your printer cannot be automatically detected, you may still be able to find out the Device ID by running the appropriate backend with the printer hostname as the argument. The *usb*, *parallel*, *snmp*, and *dnssd* backends all try to report the actual Device ID given by the printer. + +---- +$ /usr/lib/cups/backend/snmp 10.34.18.3 + +network socket://10.34.18.3 "HP Color LaserJet CP2025dn" "HP Color LaserJet CP2025dn" +"MFG:Hewlett-Packard;CMD:PJL,PML,PCLXL,POSTSCRIPT,PCL;MDL:HP Color LaserJet CP2025dn; +CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP2025dn;MEM:MEM=55MB;COMMENT:RES=600x8;" "HP Color LaserJet CP2025dn" +---- + +Device ID is in this case (see http://www.cups.org/documentation.php/doc-1.5/man-backend.html[backend(7)]) the last but one field. + +=== Which print queues are available for me? + +The queues on your machine can be permanent ones or temporary. CUPS is capable to list all available print queues on the local network (permanent and temporary queues) by: + +---- +$ lpstat -e +---- + +For permanent queues you are able to get more info with: + +---- +$ lpstat -t +---- + +=== Which driver am I using? + +The PPD file for the printer queue can tell you which driver is in use. You can use this command to find out which driver is being used: + +---- +grep -H '^*NickName:' /etc/cups/ppd/*.ppd +---- + +You can also find this out using the [command]`system-config-printer` application. Double-click on the icon for the queue and look at the Make and Model field. + +To see the available drivers, click on the _Change..._ button next to that field. You might find it useful to try another driver to see if that shows the same problem. + +==== Driverless models + +Most printers released since 2010 are capable of AirPrint or IPP Everywhere, which means they don't need to be installed to work - the device is found by Avahi and the print capabilities are communicated via IPP protocol - they are basically driverless devices. There are two solutions in Fedora which implement IPP everywhere: + +- CUPS 'everywhere' model +- cups-filters 'driverless' driver + +===== CUPS 'everywhere' model + +It is CUPS implementation of IPP everywhere standard, available as a special printer model. The model is used when you use CUPS temporary queue for your device or if you install your device with as IPP Everywhere model in CUPS web ui or via lpadmin (using `-m everywhere`). + +Because the created PPD file depends on IPP communication with printer, we need info which is gathered from the device. You can use [command]`ipptool` for that: + +---- +$ ipptool --ippserver ipptool.attr get-printer-attributes.test +---- + +Attach the created [filename]`ipptool.attr` to the bugzilla ticket if needed. + +===== cups-filters 'driverless' driver + +Cups-filters special driver which is used for generating PPD according IPP Everywhere standard. The driver is used if you choose *driverless* model during printer installation. + +We need get-printer-attributes request output too: + +---- +$ ipptool --ippserver ipptool.attr get-printer-attributes.test +---- + +and debug logs from the driver itself when it generates PPD for your device: + +---- +$ driverless -d cat 2> driverless_debug > created_ppd +---- + +Attach all created files to the bugzilla ticket if needed. + +=== Finding where the problem lies + +When a print job is processed it is sent through a chain of _filters_ to convert the file into a format the printer can understand, and then finally sent to a _backend_, a program which can transport the data to the printer. By slightly changing how you print you can try a different printing path to see if that changes anything. If it works around the problem, you know which area the problem was in -- include that information in a bug report so that we can fix it. + +==== Application + +Try printing from a different application to see if the problem goes away or if it occurs regardless of how a file is printed. Try printing the document from the command line using the [command]`lp` command. + +==== Document format + +If you are having problems printing PDF files, try printing other types of file to see if the problem is with printing anything or if it is specific to printing PDF files. Try converting the file to a different format and printing that. + +If the problem relates to printing text files, try removing/installing the paps package. This package provides an alternative text-to-PostScript filter to the one that comes with CUPS. + +To inspect the document that was submitted to CUPS for printing, enable the [option]`PreserveJobFiles` option like this: + +---- +cupsctl PreserveJobFiles=yes +---- + +Submitted job documents will remain in `/var/spool/cups`. There are files with two types of names - [filename]`dXXXXX-YYY` and [filename]`cXXXXX`. [filename]`dXXXXX-YYY` is file which goes to CUPS system, unfiltered file - `XXXXX` is job ID, which is filled with zeros to be 5 characters long, and `YYY` is sequence number of file in the job. [filename]`cXXXXX` is file which contains printing options for a job specified by job ID in `XXXXX`. Please attach [filename]`dXXXXX-YYY` to the bug for a job when you experience the issue + +===== Running filters by hand + +More advanced users may like to try running the CUPS filters by hand and examining the data file at each step as it is converted between different formats. Here is an example of doing this for a gutenprint queue named pqueue with the CUPS test page which is its own special MIME type, `application/vnd.cups-banner`: + +First you need to know the filter pipeline for `application/vnd.cups-banner` -> `printer/pqueue` (output MIME type). You can either xref:_enable_cups_debug_logging[enable debugging], print a test page, get xref:_cups_job_log[CUPS job log] and in cups_job_log you'll find something similar to: + +---- +envp[29]="FINAL_CONTENT_TYPE=printer/pqueue" +Started filter /usr/lib/cups/filter/bannertopdf (PID 1111) +Started filter /usr/lib/cups/filter/pdftopdf (PID 1112) +Started filter /usr/lib/cups/filter/gstoraster (PID 1113) +Started filter /usr/lib/cups/filter/rastertogutenprint.5.2 (PID 1114) +---- + +or run + +---- +/usr/lib/cups/filter/bannertopdf 1 me '' 1 '' bannertopdf.pdf +cupsfilter -e -m printer/pqueue -p /etc/cups/ppd/pqueue.ppd bannertopdf.pdf > /dev/null +---- + +and you'll see: + +---- +INFO: pdftopdf (PID 1111) started. +INFO: gstoraster (PID 1112) started. +INFO: rastertogutenprint.5.2 (PID 1113) started. +---- + + +[NOTE] +=============================== +This filter pipeline is from cups-1.6. With cups < 1.6 you can see bannertops -> pstops -> pstoraster instead. +=============================== + +Now you can run filters by hand: + +---- +export PPD=/etc/cups/ppd/pqueue.ppd +/usr/lib/cups/filter/bannertopdf 1 me '' 1 '' bannertopdf.pdf +/usr/lib/cups/filter/pdftopdf 1 me '' 1 '' pdftopdf.pdf +/usr/lib/cups/filter/pdftoraster 1 me '' 1 ''out.ras +/usr/lib/cups/filter/rastertogutenprint.5.2 1 me '' 1 ''out.prn +---- + +Here, [command]`evince` or [command]`okular` can be used to examine the output after the first two filters, [command]`rasterview` can be used to examine the output of the third filter, and the last filter's output must be inspected by hand or sent directly ([command]`lpr -oraw out.prn`) to the printer. + +==== Driver + +If you have access to a different make/model of printer it might be worth trying to see if the problem occurs on both of them or just one. This can give an indication about whether it is a problem with a particular driver, or if it is a more general problem. + +Even if you only have access to the one printer there is often a choice of drivers to use for a given printer model, and trying each one in turn can be useful in narrowing down the problem. See xref:_which_driver_am_i_using[above] for how to do that. + +===== Foomatic + +For Foomatic drivers you can try enabling Foomatic debugging by editing the file [filename]`/etc/foomatic/filter.conf` and adding a line: + +---- +debug: 1 +---- + +Next time you print a job to a queue using foomatic the debugging will be put in [filename]`/tmp/foomatic-rip.log`, and the input file as received by foomatic-rip will be in [filename]`/tmp/foomatic-rip.ps`. + +==== Backend (job transport) + +It may be possible for you to try a different backend. Using [command]`system-config-printer`, double-click on the printer queue icon and click the _Change..._ button next to the _Device URI_ field. You may see a _Connection_ expander arrow near the bottom right hand corner of the window -- click that to see which backends are available. For USB-connected HP printers, typically either of the *hp* and *usb* backends can be used. + +For capturing USB communication: + +* find out the bus number where USB device is connected, f.e.: + +---- +$ lsusb +Bus 002 Device 010: ID 03f0:012a HP, Inc HP LaserJet M1536dnf MFP + + = +---- + +* start USB packet capture: + +---- +$ sudo tcpdump -i usbmonN -s0 -w usb.pcap +---- + +where N is the bus number. + +For network printers you may have different protocols you can try. + +* *socket* is for HP JetDirect (usually port 9100) +* *lpd* is for older style UNIX print shares +* *smb* is for CIFS shares from Windows systems +* *ipp* is for Internet Printing Protocol-enabled devices and also for other CUPS servers +-- You can capture the IPP traffic with [command]`tcpdump` like this (the interface name may differ from *p4p1*): + +---- + tcpdump -n -i p4p1 -U -s0 -w ipp.pcap port ipp +---- + +* *bjnp* is for Canon's proprietary bjnp network protocol (usually port 8611) + +==== Configuration tool + +If your problem relates to configuring print queues, try using one of the other methods of doing so. There are four available: + +* The GNOME 3 System Settings application (*control-center*), _System Settings_ > _Printers_ from the GNOME Shell +* [command]`system-config-printer`, _System_ > _Administration_ > _Printing_ from the GNOME menu +* the CUPS web interface, http://localhost:631/ +* the command line tools [command]`lpadmin`, [command]`lpoptions`, [command]`cupsctl`, [command]`cupsaccept`, [command]`cupsenable` etc. + + + +== User stories + +There are several common user stories when it comes to debugging printing issues. I'll mention some of them with steps how to get necessary information. + +=== I have HP printer and have a problem with HPLIP script + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_journal_logging[start to capture journal logs] +* xref:how-to-debug-printing-problems.adoc#_hplip_scripts_debug_logging[run the script with enabled debugging] +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_journal_logging[get the journal logs] +* attach the files to the bugzilla ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* provide printer model name and printer PPD file from `/etc/cups/ppd/` + +=== I have HP printer, installed it with HPLIP and have a problem with it + +HPLIP installed print queue has a device uri starting with hp://. + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_journal_logging[start to capture journal logs] +* trigger your issue +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_journal_logging[get the journal logs] +* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB +* attach the files to the bugzilla ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* provide printer model name and printer PPD file from `/etc/cups/ppd/` + +=== My printer doesn't print correctly or at all, but I can see the printer in print dialog + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture logs] +* trigger your issue - print the specific document to the specific print queue you have problem with +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[get the logs] +* attach the created files to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* attach your printer PPD file from `/etc/cups/ppd/` if available +* attach the file you wanted to print +* tell what application you printed from +* mention your xref:how-to-debug-printing-problems.adoc#_which_driver_am_i_using[printer model] +* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB + +=== CUPS generic issue + +For generic issues - printer wasn't found, segfault - please follow the steps in the following sections (`avahi-daemon` must run): + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture logs] +* trigger the issue - e.g. try to find printers via [command]`sudo lpinfo -l -v`, do some action in web ui - depends on your problem +* xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[get the logs] +* attach created files to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] +* put the output of xref:how-to-debug-printing-problems.adoc#_what_make_and_model_is_my_printer[lpinfo] into a file and attach it +* put the output of xref:how-to-debug-printing-problems.adoc#_which_print_queues_are_available_for_me[both lpstat commands] into a file and attach it +* attach files with output of [command]`lsusb -v` and from `/var/log/ipp-usb` if the device is connected by USB + +=== My printer doesn't print correctly - I use 'everywhere' model + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_cups_everywhere_model[get data from get-printer-attributes request] +* xref:how-to-debug-printing-problems.adoc#_my_printer_doesnt_print_correctly_or_at_all_but_i_can_see_the_printer_in_print_dialog[follow the steps with CUPS job log user story] + +=== I have a generic problem with cups-browsed + +Please follow the steps in the following sections: + +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_cups_browsed_logging[enable cups-browsed logging], but don't restart cups-browsed yet. +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture cupsd logs] +* start cups-browsed via `systemctl` and start to capture its logs: + +---- +$ journalctl -u cups-browsed -f > cups_browsed_log +---- + +* trigger the issue or wait until cups-browsed triggers the issue itself +* cancel cups-browsed and xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[cupsd log] captures +* attach created files [filename]`cups_whole_log` and [filename]`cups_browsed_log` to the ticket and xref:how-to-debug-printing-problems.adoc#_turning_off_debug_logging[turn off debug logging] + +=== Printer found by cups-browsed doesn't print or print badly + +The most difficult user story - we need to know how the print queue was created and how it behaves during printing. The print queue found by cups-browsed has a device uri starting with `implicitclass://`. + +Please follow the steps: + +* xref:how-to-debug-printing-problems.adoc#_cups_filters_driverless_driver[get printer info from get-printer-attributes and PPD file] +* xref:how-to-debug-printing-problems.adoc#_enable_cups_debug_logging[enable CUPS debug logging] +* xref:how-to-debug-printing-problems.adoc#_cups_browsed_logging[enable cups-browsed logging], but don't restart cups-browsed yet. +* xref:how-to-debug-printing-problems.adoc#_how_to_start_to_capture_incident_bound_cupsd_logging[start to capture cupsd logs] +* start cups-browsed via `systemctl` and start to capture its logs: + +---- +$ journalctl -u cups-browsed -f > cups_browsed_queue_creation +---- + +* give cups-browsed some time to process found devices (depends on how many devices you have in the local network or how many print queues are stored in the location you set with [option]`BrowsePoll` directive) +* cancel cups-browsed and xref:how-to-debug-printing-problems.adoc#_how_to_get_incident_bound_cupsd_logging[cupsd log] captures - save the files as `cups_queue_creation` and `cups_browsed_queue_creation` + +Now we need to capture the logs during printing: + +* xref:how-to-debug-printing-problems.adoc#_prepare_cups_for_job_logging[prepare CUPS for job logging] +* xref:cups-useful-tricks.adoc#_restarting_cups_service[restart CUPS service] +* start to capture cups_browsed logs again: + +---- +$ journalctl -u cups-browsed -f > cups_browsed_printing +---- + +* trigger your issue - print the specific document to the specific print queue you have problem with +* xref:how-to-debug-printing-problems.adoc#_get_a_job_log_for_a_specific_job_id[get the job log for the job you have just triggered] and cancel the capture of cups-browsed logging +* attach all gathered log files diff --git a/modules/ROOT/pages/how-to-debug-scanning-problems.adoc b/modules/ROOT/pages/how-to-debug-scanning-problems.adoc index f7bbc28..a64c313 100644 --- a/modules/ROOT/pages/how-to-debug-scanning-problems.adoc +++ b/modules/ROOT/pages/how-to-debug-scanning-problems.adoc @@ -1,10 +1,122 @@ -ifdef::context[:parent-context: {context}] -:context: how-to-debug-scanning-problems -[id='how-to-debug-scanning-problems'] -= How to debug scanning problems -:toc: += How to debug scanning issues +Brandon Nielsen ; +:revnumber: unspecified +:revdate: 2021-06-16 +:category: Troubleshooting +:tags: How-to scanners -include::{partialsdir}/proc_cups-how-to-debug-scanning-issues.adoc[leveloffset=+1] -ifdef::parent-context[:context: {parent-context}] -ifndef::parent-context[:!context:] + +SANE library, communication libraries and backends can turn on and off debug logging via `SANE_DEBUG_*` environment variables. + +The common environment variables: + +* `SANE_DEBUG_DLL` - enables debugging SANE library +* `SANE_DEBUG_SANEI_USB` - enables debugging communication library for USB - add the environment variable if your device is connected via USB cable +* `SANE_DEBUG_SANEI_TCP` - enables debugging communication library for wireless/ethernet - add the environment variable if your device is connected by Wifi or Ethernet + +Environment variables for enabling debugging a specific backends have a structure - `SANE_DEBUG_`, so the environment variable for f.e. *HPAIO* backend is `SANE_DEBUG_HPAIO*`. + +You can find which SANE backend supports your device http://www.sane-project.org/sane-mfgs.html[here]. If your device is HP and it isn't supported by *airscan* backend or any other SANE backend, it can be supported by *hpaio* backend from *hplip* package, see the list of supported devices https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index[here]. + +== Debugging scanner discovery + +If you don't see your scanner in scanning application, then debugging of discovery process is in order. I prefer using [command]`scanimage` in the examples, but the similar steps can be applied for every scanning application like [command]`xsane`, [command]`scanadf`, [command]`simple-scan` etc. + +You will need to use environment variables when you start a scanning application ([command]`scanimage` in this case). The environment variables used with [command]`scanimage` command depends on how your scanner is connected and which backend suppose to support it. So for getting debug logs for HP LaserJet device, *connected via Ethernet/Wifi and supported by HPAIO backend*, use command: + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 scanimage -L &> discovery_output +---- + +or, f.e. if you have CanoScan 8600F, connected by USB and supported by genesys backend, use command: + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_GENESYS=255 SANE_DEBUG_SANEI_USB=255 scanimage -L &> discovery_output +---- + +Please attach the created [filename]`discovery_output` file as an attachment to the bugzilla ticket. + +== Debugging scanning process + +If the scanner is found, but an issue happens during scanning itself, we need to debug scanning process itself - which means debugging communication between backend and scanner when you start scanning a document. + +The debugging scanning itself looks similar as discovery - setup the environment variables before running the command/scanning application and catch logs into a file. The possible command can be (f.e. if you have *network scanner supported by HPAIO backend*): + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 xsane &> debug_log +---- + +or (once you find out device uri from [command]`scanimage -L` - see the xref:_getting_a_scanner_device_uri[next section]): + +---- +$ SANE_DEBUG_DLL=255 SANE_DEBUG_HPAIO=255 SANE_DEBUG_SANEI_TCP=255 scanimage -d > out.pnm 2> debug_log +---- + +, where you substitute `` for the actual device uri, f.e. 'hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112'. + +Please attach the created file - [filename]`debug_log` - as an attachment to the bugzilla ticket. + +== Getting a scanner device uri + +This point is basically a manual how to get a scanner uri for debugging scanning itself via [command]`scanimage`. You don't need to provide a scanner uri in GUI applications like [command]`xsane` or [command]`simple-scan`, because the application will do it for you or you can choose the scanner by a mouse click. + +The [command]`scanimage -L` command returns an output where device uri of the device is shown, f.e.: + +---- +$ scanimage -L +device `v4l:/dev/video0' is a Noname Integrated Camera: Integrated C virtual device +device `hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112&queue=false' is a Hewlett-Packard laserjet_m1536dnf_mfp all-in-one +---- + +F.e.the string 'hpaio:/net/laserjet_m1536dnf_mfp?ip=192.168.1.112&queue=false' is a device uri for for Hewlett-Packard laserjet_m1536dnf_mfp all-in-one scanner. + +== Debugging HP scanner if it is supported by HPLIP + +The hplip package doesn't have unified logging, so some logs come out of HPAIO backend to standard output and HP internal utilities logs come to journal. So we need to capture both to get the understanding of situation. + +It can be done this way: + +* start capturing journal logs at background: + +---- +$ journalctl -f > journal_logs & +---- + +* trigger an action (xref:_debugging_scanner_discovery[discovery] or xref:_debugging_scanning_process[scanning]) +* kill the journalctl process, f.e. this way (if there is only one journactl process) + +---- +$ kill `pidof journalctl` +---- + +then attach the created file - [filename]`journal_logs` - as an attachment to the bugzilla ticket. Please do only one action per capture - that means if you are asked to attach log files for HP scanner discovery and scanning supported by hplip, you will attach as an attachment four files - [filename]`discovery_output`, [filename]`journal_logs` for discovery output, [filename]`debug_logs` and [filename]`journal_logs` for debug_logs. + +== Debugging sane-airscan + +If your device supports eSCL or WSD (you can find it out from device specification - look for the mentioned protocols or AirScan), then its scanning functionality is supported by *sane-airscan*. Regarding debugging, on the top of usual logging sane-airscan gathers a communication dump and output image, which is helpful during investigation. + +sane-airscan debugging can be enabled in [filename]`/etc/sane.d/airscan.conf` by setting: + +---- +[debug] +trace = /path/to/dir/where/debugfiles/will/be/saved +enable = true +---- + +Then do trigger your issue (xref:_debugging_scanner_discovery[discovery] or xref:_debugging_scanning_process[scanning]), go to the dir you defined in [filename]`/etc/sane.d/airscan.conf`, take all files from there and attach them to the bug ticket. + +== How to divide logs + +In case your debug log is too big for bugzilla to attach (because your issue doesn't happen with the lowest settings or logs are big even with the lowest settings), do divide the logs to three files like this: + +---- +$ grep dll debug_log > debug_log_dll +$ grep debug_log > debug_log_connection +$ grep debug_log > debug_log_backend +---- + + is the name of backend which supports your scanner (pixma, genesys, plustek, hpaio, airscan etc.), is the type of connection you use for the device (tcp, usb). + +The division makes the investigation more difficult (the person needs to have three opened files at the same time), so do divide the logs only if log file is too big. + diff --git a/modules/ROOT/pages/how-to-set-nvidia-as-primary-gpu-on-optimus-based-laptops.adoc b/modules/ROOT/pages/how-to-set-nvidia-as-primary-gpu-on-optimus-based-laptops.adoc index 176c5e6..20f8bb6 100644 --- a/modules/ROOT/pages/how-to-set-nvidia-as-primary-gpu-on-optimus-based-laptops.adoc +++ b/modules/ROOT/pages/how-to-set-nvidia-as-primary-gpu-on-optimus-based-laptops.adoc @@ -1,7 +1,15 @@ = How to Set Nvidia as Primary GPU on Optimus-based Laptops +Akashdeep Dhar ; Jun Aruga ; Ankur Sinha; +:revnumber: F37 +:revdate: 2022-09-12 +:category: Administration +:tags: How-to Nvidia +//:imagesdir: ./images + include::{partialsdir}/3rdparty-message.adoc[] + == Introduction The objective is to enable NVIDIA GPU of an Optimus-based laptop *all the time* and use it for every single activity. Please do not use this guide if you want to render your desktop using the integrated GPU and specifically select applications to be rendered using the NVIDIA GPU. diff --git a/modules/ROOT/pages/installing-and-running-vlc.adoc b/modules/ROOT/pages/installing-and-running-vlc.adoc index 9cd71c7..a84df8a 100644 --- a/modules/ROOT/pages/installing-and-running-vlc.adoc +++ b/modules/ROOT/pages/installing-and-running-vlc.adoc @@ -1,25 +1,52 @@ += Installing and Running VLC +Lyle Corman ; Ankur Sinha +:revnumber: unspecified +:revdate: 2019 +:category: Software installation +:tags: How-to VLC +//:page-aliases: :experimental: -:imagesdir: ./images -:md: en-US/modules -ifdef::context[:parent-context: {context}] -:context: installing-and-running-vlc - +//:imagesdir: ./images -[[installing-and-running-vlc]] -= Installing and Running VLC include::{partialsdir}/3rdparty-message.adoc[] + == Prerequisites * VLC is provided by the RPMFusion repositories. xref:rpmfusion-setup.adoc[Use these instructions to enable them]. -:leveloffset: +1 -include::{partialsdir}/proc_installing_vlc.adoc[] -include::{partialsdir}/proc_running_vlc.adoc[] +== Installing VLC + + +* Install VLC: ++ +[source,] +---- +$ sudo dnf install vlc +---- + + + +== Running VLC + +* To run the VLC media player using GUI: ++ +-- +. Open the launcher by pressing the _Super_ key. +. Type _vlc_. +. Press _Enter_. +-- + + +* To run VLC from the command line: ++ +[subs="quotes"] +---- +$ vlc _source_ +---- ++ +Replace _source_ with path to the file to be played, URL, or other data source. For more details, see link:https://wiki.videolan.org/Documentation:Command_line/#Opening_streams[Opening streams] on VideoLAN wiki. -:leveloffset: 0 -ifdef::parent-context[:context: {parent-context}] -ifndef::parent-context[:!context:] diff --git a/modules/ROOT/pages/installing-chromium-or-google-chrome-browsers.adoc b/modules/ROOT/pages/installing-chromium-or-google-chrome-browsers.adoc index 39c93a0..78a2033 100644 --- a/modules/ROOT/pages/installing-chromium-or-google-chrome-browsers.adoc +++ b/modules/ROOT/pages/installing-chromium-or-google-chrome-browsers.adoc @@ -1,13 +1,121 @@ -ifdef::context[:parent-context: {context}] -:context: installing-chromium-or-google-chrome-browsers -[id='installing-chromium-or-google-chrome-browsers'] = Installing Chromium or Google Chrome browsers +Peter Lilley; +:revnumber: unspecified +:revdate: 2021-01-17 +:category: Software installation +:tags: How-to Chromium Chrome +//:page-aliases: + include::{partialsdir}/3rdparty-message.adoc[] -include::{partialsdir}/concept_chromium-web-browser.adoc[leveloffset=+1] +== Chromium and Google Chrome web browsers + +Fedora Workstation, in its out of the box configuration, only includes free and open source software. **Mozilla Firefox** is the browser included in Fedora Workstation by default. However, it easy to install either **Google Chrome** or **Chromium**, if preferred. + +=== Chromium + +Chromium is the upstream project for Google Chrome. Chromium is included in the Fedora Repositories. Fedora's Chromium package only contains free and open source software, so does not include several features of Google Chrome that rely on proprietary software. + +=== Google Chrome + +Google Chrome is a popular web browser developed by Google. Chrome is built on top of the open-source browser project, Chromium. Chrome includes additional features such as support for proprietary media files (such as H.264 or AAC) and playback of rights-protected media (Netflix, etc.) Chrome also includes support for other Google services such as browser sync and location services, which are not supported by Chromium. + +Google Chrome is available in Fedora Workstation via a curated third-party repository. Once this repository is enabled, Chrome can be installed via Software or the command line. + + + +== Installing the browsers + +Both Chromium and Google Chrome can be installed on Fedora. + + +=== Installing Chromium + +Chromium can be installed using the Software application and via command line. + +==== Installing Chromium using Software (GUI) + +. Click on Software tool in Fedora. + +. Search for Chromium Web Browser. + +. Click on Install. + +==== Installing Chromium using Terminal + +. To install Chromium Web Browser, use the command: ++ +---- +# dnf install chromium +---- ++ +. To upgrade Chromium, use the command: ++ +---- +# dnf upgrade chromium +---- + +[TIP] +==== +If you require support for non-free multimedia formats like H.264 or AAC, or the ability to play DRM-protected media such as Netflix, Spotify, etc. it may be preferable to install the *chromium-freeworld* package from the https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/[RPM Fusion] repositories, as the necessary plug-ins are already built-in. +==== + +=== Installing Chrome + +Chrome can be installed using Software or a terminal, once the repository is enabled. + +==== Installing Chrome using Software (GUI) + +. Open the *Software* application. + +. Click on the menu at the top right and select *Software Repositories*. + +. Make sure Third Party Repositories is enabled. If the button label is *Install*, then click that button to install the third party repositiories. If the button reads *Remove All* then the third party repositories are already installed. ++ +image:installing-chromium-or-google-chrome-browsers-0.png[] ++ +. Scroll down to find the repository called *google-chrome*. Click on it and choose *Enable*. ++ +image:installing-chromium-or-google-chrome-browsers-1.png[] + +You can now search for *Google Chrome* in Software, and install it. + +==== Installing Chrome using Terminal + +The additional repositories can also be managed using a terminal and DNF. + +. Install Third Party Repositories ++ +---- +$ sudo dnf install fedora-workstation-repositories +---- ++ +. Enable the Google Chrome repo: ++ +---- +$ sudo dnf config-manager --set-enabled google-chrome +---- ++ +. Finally, install Chrome: ++ +---- +$ sudo dnf install google-chrome-stable +---- + +[NOTE] +==== +If you want to install the Chrome Dev Channel version, use the following command: + +---- +$ sudo dnf install google-chrome-unstable +---- + +If you want to install Chrome Beta use the following: + +---- +$ sudo dnf install google-chrome-beta +---- +==== -include::{partialsdir}/proc_installing-chromium-web-browser.adoc[leveloffset=+1] -ifdef::parent-context[:context: {parent-context}] -ifndef::parent-context[:!context:] diff --git a/modules/ROOT/pages/installing-from-source.adoc b/modules/ROOT/pages/installing-from-source.adoc index dc339ce..4e21980 100644 --- a/modules/ROOT/pages/installing-from-source.adoc +++ b/modules/ROOT/pages/installing-from-source.adoc @@ -1,4 +1,10 @@ = Installing software from source on Fedora +ramin; Alan Bowman +:revnumber: F37 +:revdate: 2023-01-23 +:category: Software installation +:tags: How-to +//:page-aliases: Most of the software you will install on your Fedora system will either come from a desktop application manager tool such as the https://wiki.gnome.org/Apps/Software[GNOME Software tool] or from a command line package manager such as https://docs.fedoraproject.org/en-US/quick-docs/dnf/[dnf]. These tools make it easy to install, update, and if needed remove applications on your system. @@ -99,8 +105,9 @@ Your application is now installed. The README file or the application website wi NOTE: If you get any errors during the configure and build process, carefully read the error messages and follow the instructions on how to resolve them. There can be dependency issues for some applications, meaning that to install application C, you need to have applications A and B installed. Resolving dependency issues can be challenging and you might need to look for help online to help solve the problem. -== See also [[see_also]] +[discrete] +== See also -* https://www.gnu.org/software/make/[GNU Make (build and compile tool)documentation] +* https://www.gnu.org/software/make/[GNU Make (build and compile tool) documentation] * https://www.gnu.org/software/tar/[GNU Tar documentation] * https://www.gnu.org/software/gzip/[GNU Gzip documentation]