Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brother HL-L2375DW works when compiling by source but not from package manager on Alpine ? #184

Open
2Belette opened this issue Apr 16, 2023 · 8 comments

Comments

@2Belette
Copy link

Would you got any idea why ?

The Brother HL-L2375DW doesn't appear in the list from the package in Alpine, but does if I compile by hand.

It seems based on the same version : https://pkgs.alpinelinux.org/package/v3.17/community/x86_64/brlaser

@craftyguy
Copy link

are you building it from git master branch? I'm also on Alpine and mine also doesn't work with the latest release, but does work with the latest in git. @pdewacht do you plan to tag a release any time soon?

@2Belette if they don't tag a release, I can update the Alpine package to build from a working sha in the master branch... but that's not ideal.

@QORTEC
Copy link
Contributor

QORTEC commented May 28, 2023

@craftyguy I'm maintaining a fork of brlaser at Owl-Maintain/brlaser. I plan on maintaining it until @pdewacht has time to continue working on the official brlaser driver.

I'm tagging releases, have more printer definitions, and minor code changes. Feel free to take a look and use it if it meets your needs.

EDIT:
The following printers have been added (upstream) since the last release [v6].

  • Brother DCP-L2520DW series
  • Brother HL-L2375DW series
  • Brother HL-L2390DW
  • Brother MFC-7420
  • Brother MFC-7460DN

@2Belette
Copy link
Author

@craftyguy would you update Alpine package as @QORTEC suggested ? I am using his fork and working perfectly

@2Belette
Copy link
Author

@QORTEC I realized I got Internal Server Error when I am installing it. I can't remember how I managed that in the past, I thought I had to install brlaser from my distro and then cp the rastertobrlaser to /usr/lib/cups/filter but it doesn't seem to be the trick anymore..

If you have any idea/suggestion

@QORTEC
Copy link
Contributor

QORTEC commented Aug 18, 2023

I build and test brlaser on Solus using the solbuild packaging tools, where its a simple cmake; make; make install.
According to both pkgs.alpinelinux.org and my own solbuild results, you'll need to install two binaries:

install -m 755 rastertobrlaser /usr/lib/cups/filter/
install -m 755 brlaser.drv     /usr/share/cups/drv/

I would suggest looking at the Alpine APKBUILD, it should give you a better idea of how brlaser "expected to be" installed on your system.

@2Belette quick question, since you said cp;

  • are the files user & group ownership set to root
  • are the files permissions set to 755 | -rwxr-x-r-x

If the above doesn't help I would suggest:

  • posting any errors that preceded Internal Server Error if applicable
  • uploading the related log files

@2Belette
Copy link
Author

Thanks @QORTEC .

Yes I checked and that the two files I copied. the user & group are set to root, permissions are set to 775 for rastertobrlaser but not for brlaser.drv (but all the other files don't have rx for g&o), I set to 755 anyway but same issue.

As a side note, I noticed that rastertobrlaser (~615KB) is very big in size compared to the origin (~38KB)

Here are the debug log :

D [25/Aug/2023:19:21:25 +0200] [Client 9] 2.0 CUPS-Get-PPDs 1
D [25/Aug/2023:19:21:25 +0200] CUPS-Get-PPDs ipp://localhost/printers/
D [25/Aug/2023:19:21:25 +0200] [CGI] argv[0] = "/usr/lib/cups/daemon/cups-driverd"
D [25/Aug/2023:19:21:25 +0200] [CGI] argv[1] = "list"
D [25/Aug/2023:19:21:25 +0200] [CGI] argv[2] = "1"
D [25/Aug/2023:19:21:25 +0200] [CGI] argv[3] = "0"
D [25/Aug/2023:19:21:25 +0200] [CGI] argv[4] = "requested-attributes=all ppd-make=\'Brother\' ppd-make-and-model=\'Brother HL-L2375DW series\'"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[0] = "CUPS_CACHEDIR=/var/cache/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[1] = "CUPS_DATADIR=/usr/share/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[2] = "CUPS_DOCROOT=/usr/share/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[3] = "CUPS_REQUESTROOT=/var/spool/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[4] = "CUPS_SERVERBIN=/usr/lib/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[5] = "CUPS_SERVERROOT=/etc/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[6] = "CUPS_STATEDIR=/run/cups"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[7] = "HOME=/var/spool/cups/tmp"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[8] = "PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[9] = "SERVER_ADMIN=root@xps"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[10] = "SOFTWARE=CUPS/2.4.6"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[11] = "TMPDIR=/var/spool/cups/tmp"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[12] = "USER=root"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[13] = "CUPS_MAX_MESSAGE=2047"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[14] = "CUPS_SERVER=/run/cups/cups.sock"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[15] = "CUPS_ENCRYPTION=IfRequested"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[16] = "IPP_PORT=631"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[17] = "LANG=en_US.UTF8"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[18] = "REDIRECT_STATUS=1"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[19] = "GATEWAY_INTERFACE=CGI/1.1"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[20] = "SERVER_NAME=localhost"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[21] = "SERVER_PORT=631"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[22] = "REMOTE_ADDR=localhost"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[23] = "REMOTE_HOST=localhost"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[24] = "SCRIPT_NAME=/"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[25] = "SCRIPT_FILENAME=/usr/share/cups/"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[26] = "SERVER_PROTOCOL=HTTP/1.1"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[27] = "HTTP_USER_AGENT=CUPS/2.4.6 (Linux 6.1.46-0-lts; x86_64) IPP/2.0"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[28] = "REQUEST_METHOD=POST"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[29] = "CONTENT_LENGTH=184"
D [25/Aug/2023:19:21:25 +0200] [CGI] envp[30] = "CONTENT_TYPE=application/ipp"
D [25/Aug/2023:19:21:25 +0200] [CGI] Started /usr/lib/cups/daemon/cups-driverd (PID 32041)
I [25/Aug/2023:19:21:25 +0200] [Client 9] Started "/usr/lib/cups/daemon/cups-driverd" (pid=32041, file=15)
D [25/Aug/2023:19:21:25 +0200] [Client 9] Waiting for CGI data.
I [25/Aug/2023:19:21:25 +0200] [cups-driverd] Read \"/var/cache/cups/ppds.dat\", 75 PPDs...
I [25/Aug/2023:19:21:25 +0200] [cups-driverd] Read \"/var/cache/cups/ppds.dat\", 75 PPDs...
D [25/Aug/2023:19:21:25 +0200] [cups-driverd] Loading \"/usr/share/cups/model\"...
D [25/Aug/2023:19:21:25 +0200] [cups-driverd] Loading \"/usr/share/cups/drv\"...
D [25/Aug/2023:19:21:25 +0200] [cups-driverd] Loading \"/usr/share/ppd\"...
D [25/Aug/2023:19:21:25 +0200] [cups-driverd] Loading \"/usr/share/ppd/cupsfilters\"...
D [25/Aug/2023:19:21:25 +0200] [Client 9] CGI data ready to be sent.
D [25/Aug/2023:19:21:25 +0200] [Client 9] con->http=0x7fee785c6700
D [25/Aug/2023:19:21:25 +0200] [Client 9] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=2147483647, response=0(), pipe_pid=32041, file=15
D [25/Aug/2023:19:21:25 +0200] [Client 9] Waiting for CGI data.
D [25/Aug/2023:19:21:25 +0200] [Client 9] cupsdSendHeader: code=500, type="text/html", auth_type=0
D [25/Aug/2023:19:21:25 +0200] [Client 9] Waiting for request.
D [25/Aug/2023:19:21:25 +0200] [Client 9] Closing because Keep-Alive is disabled.
D [25/Aug/2023:19:21:25 +0200] [Client 9] Closing connection.
D [25/Aug/2023:19:21:25 +0200] [CGI] cgiSetVariable: MESSAGE=\"Unable to get list of printer drivers\"
D [25/Aug/2023:19:21:25 +0200] [CGI] cgiSetVariable: ERROR=\"Internal Server Error\"

If I delete both rastertobrlaser and brlaser.drv from my build and revert back to the original files, I don't have 500 Error anymore and I can see the list of Model (but missing my HL-L2375DW obviously)

@QORTEC
Copy link
Contributor

QORTEC commented Aug 25, 2023

Can you tell me which commit you are building against?

I just tested my printer HL-2270DW and it seems to work (Owl-Maintain v6.2.6). I'll recompile the commit verify if there is an issue on my end.

--

Is there an easy way to install Alpine Linux and get a working desktop environment?
I would be happy to test the driver myself but first impression is it would be an involved process and I don't have a lot of free time at the moment.

@2Belette
Copy link
Author

Owl-Maintain@0ee2128 ( v6.2.6 )

The compile is working fine but at the end, during the make install, when the two files are copied and after the cupsd restart, that's when I got the 500 Internal Error during the Add Printer process.

For Alpine, I use sway, which is pretty straight forward to install, and Alpine has also a nice script 'setup-alpine' to set everything up. They also have a 'setup-desktop' script which allow to install 'gnome', 'plasma' or 'xfce' in one command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants