OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Pete on September 15, 2023, 08:40:22 pm

Title: ArcaOS 5.1.0 and cups
Post by: Pete on September 15, 2023, 08:40:22 pm
Hi All

Having got 5.1.0 installed and seems to be working well I decided to hook up my printer.

Having watched the install stuff loads of "legacy printer drivers" on to the hard drive it was a bit disappointing to find that cups does not get installed.

Used ANPM to install the various cups bits and hplip to get my HP Envy Photo 6234 working, started the Install CUPS Printer and got:-

   "CUPSLPR.EXE not found"

or words to that effect.

A quick search of hard disk and DVD discovers no trace of cupslpr.exe - luckily I (thought I) knew the answer to this problem: copy the lpr.exe supplied with cups and now living in @unixroot\usr\bin to [BootDrive]:\tcpip\bin\cupslpr.exe

Well, Install CUPS Printer was happy with that and I got my printer installed.
All was looking good until I actually tried to print from Lucide which showed an error message about connecting to spooler to which I clicked Retry which seemed to have worked but nothing came out of the printer.

Checking the OS/2 printer there was nothing waiting to print, printer and driver setup looks good nothing obviously wrong.

Checking the cups side of things via the cups browser interface No Job got to cups...

I retried printing the document. This time it got stuck in the os/2 spooler waiting to pass the job to the cups spooler. Deleted the os/2 print job and had a think...

I checked the working cups setup on my old system and noticed that the lpr.exe files are very different sizes - the old system uses Pauls cups 2.1.0 zip packages which are unpacked into their own directories rather than scattered around inside @unixroot/usr. Could be that the ANPM installed cups (2.2.13) supplied lpr.exe relies on other files within @unixroot/usr...

I copied @unixroot\usr\bin\lpr.exe to @unixroot\usr\bin\cupslpr.exe, moved CUPS Daemon out of the Startup folder, checked the spooled print job had been deleted then rebooted.

After reboot I deleted [BootDrive]:\tcpip\bin\cupslpr.exe, started CUPS Daemon and retried printing from Lucide: Success.


Regards

Pete





Title: Re: ArcaOS 5.1.0 and cups
Post by: ivan on September 15, 2023, 11:01:32 pm
Hi Pete,

I see you have discovered the joy of using cups for printing.  I discovered that some years ago which is why I sold my all in one inkjet printer and got a brother DCP-9020cdw colour laser postscript printer all in one that allows me to print from any computer on the network.
BTW I have calculated that toner is much cheaper than ink and does not dry out if not used.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 16, 2023, 06:23:55 am
Hi ivan

I "discovered the joy of using cups for printing" a few years ago - I think I can claim to be 1 of the few people involved in testing when Paul first started porting cups and I helped put together the original cups "How To" for OS/2  :-)

Yes, I guess even now cups has pitfalls for the unwary - such as my expecting the rpm installed cups to use the same location for cupslpr.exe as Pauls zip versions.

I am also surprised that the RPM installed cups did not install a cupslpr.exe into the correct location. Guess I should file a bug report about that.


Regards

Pete




 
Title: Re: ArcaOS 5.1.0 and cups
Post by: Neil Waldhauer on September 16, 2023, 02:48:51 pm
I used "Install Printer" to install what it called a Cups printer. It seems to work.

Can you explain what isn't working? I've always found cups a little bit confusing.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Alex Taylor on September 16, 2023, 03:12:56 pm
If I recall, you did an upgrade install?

FWIW, the CUPS RPM doesn't install cupslpr.exe, but the ArcaOS installer does that if CUPS is selected during installation.

However, the philosophy of the upgrade install is not to make any non-essential changes to your system configuration -- that includes optional installed components. So if you didn't have CUPS installed before the upgrade, the upgrade won't install it for you.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 16, 2023, 04:32:03 pm
Hi Alex

No, it was not an Upgrade Install - New install on new hardware.

CUPS was selected during installation.
Looks like the Installer cocked up as cupslpr.exe was nowhere on the system - or on the install dvd. The only cups packages included seem to be cupsgui.wpi and cupspdr.zip neither of which contain cupslpr.exe
Maybe I am looking in the wrong place... What cups packages should be included in the 5.1.0 release?


"Install CUPS Printer" aka cupswiz.exe was happy to find a copy of cupslpr.exe in BootDrive:\tcp\bin and created a printer object that could not print. Moving cupslpr.exe to @unixroot\usr\bin resulted in a working printer. I do not know if that is a difference between cups (Pauls builds) installed from zip files, cups installed via RPM or a later variation of the RPM installed cups.
Does cupswiz check both locations? - it could create the missing cupslpr.exe if it finds lpr.exe in @unixroot\usr\bin


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 16, 2023, 04:44:21 pm
Hi Neil

Problem resolved.

The cupslpr.exe file which is required to pass the print job from the OS/2 printer to the cups printer was not present after install - or anywhere on the install dvd.

I created cupslpr.exe - which is a copy of the cups supplied lpr.exe - in BootDrive:\tcip\bin which is where it has been located and worked for previous cups releases. The latest cups wants cupslpr.exe in the @unixroot\usr\bin directory


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 16, 2023, 07:53:00 pm
Hi All

Apologies, found the cups packages on the install dvd.

As no-one else seems to have reported a cups problem during 5.1.0 install I'm guessing that the reason that cups did not get installed during installation is that I somehow missed checking that option. Have to rummage through the logs to check I guess...


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Dave Yeo on September 17, 2023, 01:08:11 am
I went with the advanced install and otherwise then checking SeaMonkey, went with the defaults, I see
Code: [Select]
H:\tmp>which cupslpr.exe
M:/TCPIP/BIN/cupslpr.exe
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 17, 2023, 01:36:49 am
Hi All

@Dave Can you print from an os/2 app?

If "Yes" then there is something not quite right with my setup. Guess I can leave it as cupslpr.exe works perfectly located in /usr/bin


Yes, I did select cups during install.

Looking through H:\var\log\2_CUPS.L2 and H:\var\log\2_CUPS.L1 it seems something glitched:-

2_CUPS.L2

Rpmdb checksum is invalid: dCDPT(pkg checksums): gnu-ghostscript.i686 0:9.14-1.oc00 - u


Error Downloading Packages:
  1:cups-2.2.13-1.oc00.pentium4: failure: cups-2.2.13-1.oc00.pentium4.rpm from arca_inst: [Errno 256] No more mirrors to try.


Which may explain 2_CUPS.L1
Copying file: J:\usr\bin\lpr.exe --> H:\TCPIP\BIN\CUPSLPR.EXE: FAILED (error SYS0003: The system cannot find the path specified.)

Installing CUPS GUI


At least I know now that it was not an "Operator Error"  :-)


Regards

Pete

Title: Re: ArcaOS 5.1.0 and cups
Post by: Dave Yeo on September 17, 2023, 03:24:43 am
Hi Pete, I don't currently have a printer so no, I can't print due to not having it setup.
I see 2_CUPS.L1 ends with,
Code: [Select]
Copying file: M:\usr\bin\lpr.exe --> M:\TCPIP\BIN\CUPSLPR.EXE: OK

Installing CUPS GUI

Do want the list of packages that was installed here? 43 of them not including the first preliminary 7. Should be listed in your 2_CUPS.L1.
I have noticed that the RPM servers seem to be down a lot recently, both Netlabs and the Rosenthals mirror, which also raises the question of whether you had other failures. Might be worth searching your /var/log for "Error Downloading Packages" or Error, though that does find a bunch of stuff with error in the name.
Edit:, missed that the RPM's were on the ISO, which makes it weirder, perhaps a bad burn as IIRC, you used a DVD to install. Shame doesn't seem to be a MD5SUM of the ISO, guess due to the personalization.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Rich Walsh on September 17, 2023, 05:42:18 am
At least I know now that it was not an "Operator Error"  :-)

Actually, I think it was "Media Error". After Win set up your NVME drive, installing AOS 5.1 should have been a non-event. Instead you still had to use all sorts of workarounds and are still having problems. Personally, I'd just start from scratch.

If you create another partition, you can reassign the letter of your current boot partition to the new one, then reinstall using a fresh download of the ISO. If it works, great - if not, you can restore the drive letter to the previous partition and be none the worse off.

BTW... did you disable HyperThreading in the BIOS?  Also, contrary to AN, I'd recommend having CSM *off* until you can demonstrate a need for it to be on.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 18, 2023, 01:24:32 am
Hi Rich

Yep, media error. Tested cups and a few other files on dvd - opened rpms with Archive Viewer aka arcview.exe - and had several packages reporting "premature end of file".

Testing the same packages in the mounted ISO file there were no problems.

So, as Dave suggested, a bad burn. Will follow Rodericks advice and turn down the burn speed if I bother burning another dvd.

At the moment this install seems fairly solid and is working well. Having overcome the cups problem there does not seem to be a point in a reinstall.


Regarding CSM: This system needed it on in order to boot to the installer - system got stuck showing pmshell.exe onscreen without that setting.


Ahhh... So I should turn HyperThreading off? - Seems to be working fine at the moment... What should go wrong with it on?


Regards

Pete


Title: Re: ArcaOS 5.1.0 and cups
Post by: Dave Yeo on September 18, 2023, 09:21:43 pm
Ahhh... So I should turn HyperThreading off? - Seems to be working fine at the moment... What should go wrong with it on?

Crappy performance and reported crashes. Our system is simply SMP and expects each CPU (core) to be equal, whereas HyperThreading and similar fake cores. From https://en.wikipedia.org/wiki/Hyper-threading, should read the whole article,
Quote
It is possible to optimize operating system behavior on multi-processor hyper-threading capable systems. For example, consider an SMP system with two physical processors that are both hyper-threaded (for a total of four logical processors). If the operating system's thread scheduler is unaware of hyper-threading, it will treat all four logical processors the same. If only two threads are eligible to run, it might choose to schedule those threads on the two logical processors that happen to belong to the same physical processor; that processor would become extremely busy while the other would remain idle, leading to poorer performance than is possible by scheduling the threads onto different physical processors. This problem can be avoided by improving the scheduler to treat logical processors differently from physical processors; in a sense, this is a limited form of the scheduler changes that are required for NUMA systems.

One thing for sure is that Arca Noae and previous vendors strongly recommend turning it off.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 19, 2023, 01:08:55 am
Hi Dave

Well, so far the only system "hang" has been Dooble (QT5) which is something I consider "normal" based on using Dooble on an older system.

Oh for a reasonably modern *working* browser.


Looking through the BIOS I see no option to turn off HyperThreading... Maybe I need to boot Windows and use AMD tuning software to turn this off. May just not bother unless the system develops "Crappy performance and reported crashes" as all seems to be Hunky Dory at the moment, system is certainly fast and responsive - except for the Dooble incident.

Reminds me, must do the pci report for Martin.


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Dave Yeo on September 19, 2023, 02:25:36 am
It's an AMD? Most of what I said was for Intel. IIRC, with AMD, you have full integer cores and shared FPU, so different then Intel. Others can chime in with their experiences.
Sometimes the only way to turn off some cores is with ACPI parameters and then it is figuring out which are which as it is not always every second core.
As for Dooble, and the Qt5webengine, a lot of the problems are memory related, 4GB (actually closer to 3.5 GB) is just not enough memory for modern browsers. And of course the Qt5webengine is a work in progress, progress that hopefully will lead to the Qt6webengine.
I'd suggest running mem /v now and again to see how much memory, especially low shared is available and also consider raising your VIRTUALADDRESSLIMIT, perhaps to 2560 at first, then you could try 2816 and the max of 3072. How high it can go is hardware dependent, don't want to intrude on video memory as an example. The default is conservative.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 19, 2023, 04:30:43 am
Hi Dave

Yes, AMD Ryzen 5 5600G - 6 cores but "12 processors initialised".


Already "tuned" using mem /v

Both reports are from immediately after boot:-
[H:\SYS\BIN]mem /v

Total physical memory:     14,271 MB
Accessible to system:       3,036 MB
Additional (PAE) memory:   11,235 MB

Resident memory:              183 MB
Available virtual memory:   1,225 MB

Available process memory:
  Private low memory:         375 MB
  Private high memory:        896 MB
  Shared low memory:          340 MB
  Shared high memory:         844 MB



After this modification to config.sys

REM **** VIRTUALADDRESSLIMIT=1536 - original line
REM **** The next line works best to reduce shared memory use
VIRTUALADDRESSLIMIT=2560


[H:\SYS\BIN]mem /v

Total physical memory:     14,271 MB
Accessible to system:       3,036 MB
Additional (PAE) memory:   11,235 MB

Resident memory:              183 MB
Available virtual memory:   1,225 MB

Available process memory:
  Private low memory:         375 MB
  Private high memory:      1,792 MB
  Shared low memory:          340 MB
  Shared high memory:       1,740 MB


Definitely an increase in high memory, will have to try larger values for VIRTUALADDRESSLIMIT and see what happens on this system - previous systems have not liked 3072 at all.


Regards

Pete





Title: Re: ArcaOS 5.1.0 and cups
Post by: Dave Yeo on September 19, 2023, 07:03:31 am
Do you have the blocklist installed in Dooble? Helps cut back the ads, which usually are full of crappy JavaScript. Latest attached
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on September 20, 2023, 02:32:05 pm
Hi Dave

Seems to be a later file so, Thank You.


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Dave Yeo on September 20, 2023, 04:25:04 pm
There's also now a dooble_filter list in dooble/Data from AdGuard DNS filter, seems to work importing it into the blocked domains, attached.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Martin Iturbide on January 13, 2024, 05:59:48 pm
Hello

Now it was my turn to try CUPS in ArcaOS 5.1 with my Thinkpad T14s.

I'm getting this image when trying to search for my printer on the list. It says "Bad".
Any tips?

Regards
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on January 14, 2024, 05:51:32 am
Hi Martin

Presuming cups is successfully installed is the cups daemon running?

Is the printer local or network? - and powered on?


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Alex Taylor on January 14, 2024, 01:52:14 pm
Try running
Code: [Select]
lpinfo -mfrom a prompt and see what happens.
Title: Re: ArcaOS 5.1.0 and cups
Post by: Martin Iturbide on January 14, 2024, 05:16:09 pm
Hello

I have an Epson L4150, that has USB port and Wifi support (configured).  I had tried the IBM Legacy OMNI driver with the USB port and it worked. I was able to print a PDF.
Now I want to try CUPS. If possible, with Wifi and USB cable to test both ways.

lpinfo -m gives me:
Quote
lpinfo: Bad file number

I haven't made anything special with the CUPS installation. It is the first time I use it since I installed ArcaOS 5.1.

Regards
Title: Re: ArcaOS 5.1.0 and cups
Post by: Pete on January 14, 2024, 07:42:18 pm
Hi Martin

I get the same result with lpinfo -m when the cups daemon has not been started.
Is the cups daemon in the(a) Startup folder?

If "No" simply start cups daemon by doubleclicking [UnixRoot]:\usr\sbin\cupsd.exe

Then retry lpinfo -m


Regards

Pete
Title: Re: ArcaOS 5.1.0 and cups
Post by: Roderick Klein on January 14, 2024, 09:14:51 pm
Did you also open a ticket at Arca Noae so they are aware of this issue ?

Roderick
Title: Re: ArcaOS 5.1.0 and cups
Post by: Martin Iturbide on January 20, 2024, 02:26:34 pm
Hello.

I was getting ready to open the ticket. I was going to repeat my problem with CUPS to document it, but magically it got fixed. (Maybe some ANPM package update). Now all the printer drivers shows on the list.

I followed the procedure to install my Epson L4150, I used Epson L310 from the list. It recognize it as a Network printer, finish the installation.  I sent the print test page PDF to the printer with Lucide and it printed in color like a charm. I haven't print anything from OS/2 in years, now I feel like king of the world (for the next 20 minutes).

Regards