Announcement

Collapse
No announcement yet.

HP Printer problem

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HP Printer problem

    I have the cheapest printer I could find locally. HP Deskjet 1000 usb printer. Lately I am unable to print unless I first remove the printer, reboot, and then reinstall it. That works, but not always.
    I have tried all 6xusb ports but no go, unless I reinstall as mentioned above.
    The error messages in syslog indicate that apparmor may be the cause.
    Here are some of the related error messages:

    Code:
    apparmor="DENIED" operation="signal" profile="/usr/sbin/cupsd" pid=11706 comm="cupsd" requested_mask="send" denied_mask="send" signal=term peer="unconfined"
    
    hp-systray(hpdio)[2034]: error: Unable to communicate with device (code=12): hp:/usb/Deskjet_1000_J110_series?serial=CN23921MK105D2
    Dec 23 18:14:14 ocky-desktop hp-systray: hp-systray(hpdio)[2034]: error: Device not found
    How would I go about tearing down the /usr/sbin/cupsd profile ? (Assuming of course that is the cause).

    I suppose I need to disable it but how do I add the teardown option ?

    sudo ln -s /etc/apparmor.d/usr.sbin.cupsd /etc/apparmor.d/disable/
    sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.cupsd

    Any help most welcome.

    #2
    It looks like apparmor and cups are not working together, which is not uncommon.
    My Trusty apparmor looks like this:
    Code:
    $ sudo apparmor_status
    [sudo] password for jerry: 
    apparmor module is loaded.
    18 profiles are loaded.
    18 profiles are in enforce mode.
       /sbin/dhclient
       /usr/bin/freshclam
       /usr/lib/NetworkManager/nm-dhcp-client.action
       /usr/lib/connman/scripts/dhclient-script
       /usr/lib/cups/backend/cups-pdf
       /usr/lib/lightdm/lightdm-guest-session
       /usr/lib/lightdm/lightdm-guest-session//chromium
       /usr/lib/telepathy/mission-control-5
       /usr/lib/telepathy/telepathy-*
       /usr/lib/telepathy/telepathy-*//pxgsettings
       /usr/lib/telepathy/telepathy-*//sanitized_helper
       /usr/lib/telepathy/telepathy-ofono
       /usr/sbin/cups-browsed
      [B] /usr/sbin/cupsd[/B]
       /usr/sbin/mysqld-akonadi
       /usr/sbin/mysqld-akonadi///usr/sbin/mysqld
       /usr/sbin/ntpd
       /usr/sbin/tcpdump
    0 profiles are in complain mode.
    8 processes have profiles defined.
    8 processes are in enforce mode.
       /sbin/dhclient (2859) 
       /usr/bin/freshclam (1667) 
       /usr/lib/telepathy/mission-control-5 (3358) 
    [B]   /usr/sbin/cups-browsed (1322) 
       /usr/sbin/cupsd (6519) 
       /usr/sbin/cupsd (6523) [/B]
       /usr/sbin/mysqld-akonadi///usr/sbin/mysqld (2868) 
       /usr/sbin/ntpd (2961) 
    0 processes are in complain mode.
    0 processes are unconfined but have a profile defined.
    $
    To disable apparmor's effect on cupsd run
    Code:
     sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.cupsd
    sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.cups-browsed
    That will work until you reboot.
    To disable cupsd and cups-browsed permenantly do
    Code:
    sudo ln -s /etc/apparmor.d/usr.sbin.cupsd /etc/apparmor.d/disable/
    sudo ln -s /etc/apparmor.d/usr.sbin.cups-browsed /etc/apparmor.d/disable/
    sudo /etc/init.d/apparmor restart
    You can disable apparmor and unload the kernel module:
    Code:
    sudo /etc/init.d/apparmor stop
    
    sudo update-rc.d -f apparmor remove
    or
    Code:
    sudo service apparmor stop
    sudo update-rc.d -f apparmor remove
    or, remove apparmor
    Code:
    sudo apt-get remove apparmor apparmor-utils -y
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Weha

      When you say not working, do you send a job to print and the computer and the printer do nothing? I have two laptops that will not print, but I have no issue with my desktop.
      I am thinking of removing apparmor. Let us know how you made out.

      Comment


        #4
        Permanently disabled the cups profiles:
        Code:
        sudo ln -s /etc/apparmor.d/usr.sbin.cupsd /etc/apparmor.d/disable/
        sudo ln -s /etc/apparmor.d/usr.sbin.cups-browsed /etc/apparmor.d/disable/
        sudo /etc/init.d/apparmor restart
        Rebooted, but still the printer was initially not recognised. After an uninstall, then a reboot still nothing i.e. could not even setup the printer I had removed.
        i then tried in Xubuntu 14.04 and had no problem (even with the same apparmor Denied message referred to before). However I must mention that printing
        in Xubuntu does not always work, but usually comes right when I switch the usb port and restart it.

        Now, after rebooting into Kubuntu the damn printer works. Once it is recognised and works, it will be fine for the day. Rebooted again and it is still
        recognised. I hope that is a good omen

        I will need to see how it goes for the next couple of days. (It seems to be a hit and miss unfathomable problem. Some suggest using the foomatic driver in preference to the
        rather buggy hp driver).

        Have a look .. http://www.dedoimedo.com/computers/l...-printing.html

        Oh yes, Merry Christmas to all !
        Last edited by weha; Dec 24, 2014, 06:52 AM.

        Comment

        Working...
        X