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

Builds with Qt 5.8 do not work & Device detection issue on Hyperbola Linux #26

Closed
ralessi opened this issue Jun 19, 2019 · 40 comments
Closed
Milestone

Comments

@ralessi
Copy link

@ralessi ralessi commented Jun 19, 2019

Note: This is more a feedback from experience than an issue report.

When I plug a second screen in the VGA port of my X200, Projecteur works perfectly.

Otherwise, I had to struggle a bit to figure out how to make Projecteur work with a second HDMI screen plugged in the DisplayPort provided by the dock station of the X200. The only scenario that works is the following:

  1. Before launching Projecteur itself, disable the second screen, so that Projecteur sees it as "not connected" when it is launched.
  2. Launch Projecteur.
  3. After that, enable the second screen. If the spotlight doesn't show, select the appropriate screen in the settings of Projecteur.

The same scenario applies with so-called DisplayLink screens which are plugged in USB ports.

Otherwise, the spotlight shows, but it is limited to a small area stuck at the top left corner of the selected screen. This may be related to #22 (comment).

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Jun 19, 2019

Thanks for the description. Definitely something to put into the future Readme/Troubleshooting or Wiki page.
I did not have that issue on my setup with Notebook Screen + Additional 4K Monitor - unfortunately - so it's hard to find the issue. I am still thinking about how to make sure that most of the countless different setups (Linux Distro, Monitors, Window Managers, Graphic Drivers, Different Qt versions....) are working.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Jun 19, 2019

Yes, the different parameters seem way too intricate. At first, I thought that Projecteur may not work with USB DisplayLink. But I was wrong.
Does your Notebook have a VGA output as mine or something like DisplayPort or HDMI? My current impression is that difficulties arise when trying to connect VGA output to something more advanced (as DVI, HDMI and the like). But again, I may be wrong!

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Jun 21, 2019

My notebook has a (mini) DisplayPort output. I did test with that and a multi-monitor setup within a VirtualBox. The tricky part with the overlay window is that different window managers behave differently when setting the overlay windows size and/or set it to full screen + additional window flags to have no title bar etc... (via the Qt API) - I discovered the way that it works now (hopefully for most setups) basically by trial and error :) - also the order seems very important e.g. something like: resizing the window, hiding the window, placing it on the other screen and resizing it to the screens resolution...

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Jun 22, 2019

In addition to that, I also discovered that (at least on my side, that is: awesome wm + compton for transparency), Projecteur does not show the spotlight unless the user select the appropriate screen at least one time. So in case no external monitor is connected, it is not possible to select, say, "screen 1" and switch back to "screen 0" because there is no "screen 1" to select. But this could be easily solved by editing Projecteur.conf and setting screen= to 1 under [General]. This way, Projecteur shows "screen 1" as "not connected", and one is able to apply the scenario described above. Now I think I can operate Projecteur in any situation!

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 10, 2019

....awesome wm + compton for transparency), Projecteur does not show the spotlight unless the user select the appropriate screen at least one time. So in case no external monitor is connected, it is not possible to select, say, "screen 1" and switch back to "screen 0" because there is no "screen 1" to select. But this could be easily solved by editing Projecteur.conf and setting screen= to 1 under [General]....

@ralessi Does this issue still exist with the latest version from develop? (The screen should now switched automatically depending on where the cursor is)

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 10, 2019

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 10, 2019

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 11, 2019

But no screen selection dropdown, and no spotlight either. Is it required to have a second screen connected for this version of Projecteur to work?

No, the screen is now automatically set, depending on where the mouse cursor is.
(Edit: The setting is still there but it should not be necessary to set by the user)
So it seems the issue with your configuration is that as you described it: you have to set the screen at least once (back and forth) ... Could you try your trick with the screen setting in the config? (Edit: i.e. setting the screen to 1 or higher in the config before starting like you described in previous posts)

jahnf added a commit that referenced this issue Nov 11, 2019
@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 11, 2019

Please give it a try with

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 12, 2019

I just tested once 0.6-alpha.61 successfully (actually from 567f415 which came through git pull) with these udev rules:

# Rule for USB Receiver
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c53e", MODE="660", GROUP="spotlight-device", ENV{USB_HUB_TYPE}="046d:c53e"

# Rule when connected via Bluetooth
# Updated rule, thanks to Torsten Maehne (https://github.com/maehne)
SUBSYSTEMS=="input", ATTRS{name}=="SPOTLIGHT*", MODE="660", GROUP="spotlight-device"

Should I rather use the new 55-spotlight.rules in which no user group is specified?
I will test both versions extensively tomorrow.

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 12, 2019

Perfect, so the issue seems to be resolved. Did I understand that correctly?

With the commit you are referring to,
You are building from the feature/libusb-integration branch. Why so? Is that on purpose? That branch is currently just a test and play branch for future use of talking via USB to the device directly.
If you like an up to date version, you should build from develop. From this branch the next release version will be created.

You can try if the newer rules file works you. But if the current installed one works for you it's not important.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 12, 2019

Perfect, so the issue seems to be resolved. Did I understand that correctly?

Unfortunately, not quite. I just rebuilt Projecteur from [14d59c5]. (Sorry, I didn't pay attention earlier.) Here's what happens:

  1. With the new udev rules, the device is simply not detected. It may be detected occasionally, but that does not changes anything.
  2. With the previous udev rules, it is detected but the spotlight shows one time out of three or so, meaning that I have to quit Projecteur and relaunch it several times for the spotlight to finally appear.
@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 12, 2019

@ralessi We should sperate this in two things:

  1. Does the "spotlight" effect now work for you? (test Button) In the issue you said you had problems with screens and settings and the spotlight not showing.
  2. The detection of the spotlight device... What Linux Distro + Version are you running? Which Window Managers , Desktop and Versions.
@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 12, 2019

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 12, 2019

well up to 19f46bf
(https://github.com/jahnf/Projecteur/commits/develop)
all versions should behave the same as 0.6-alpha.5 - up to that commit there were no changes for screens and screen settings.

And sorry that I can't help you there, since I have no way to reproduce it 😞

For your problem about detection of the device: thats something with udev and the rules... make sure you dont't have conflicting rules. Do you have a spotlight rules file in different location for example? (e.g. one from a binary package and one that you yourself put somewhere..)

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 12, 2019

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 12, 2019

It seems to be a problem with the Qt version you have... Hyperbola has Qt 5.8.
I just reproduced the problem with Qt 5.8.
Qt 5.8 is a strange version to have in a distribution. Qt 5.9 is an LTS version.
Maybe its only Qt 5.8 - I have to try with 5.7 - I know 5.9 works and 5.11 and 5.12

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 12, 2019

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 12, 2019

So it's definitly Qt5.8 - 5.7 works... 5.9 works...

Yes the Qt5.8 is especially strange for a distribution, calling itself long-term distribution 😄

But you can always download precompiled binaries from Qt and build projecteur against that:
https://download.qt.io/archive/qt/
For example https://download.qt.io/archive/qt/5.12/5.12.5/qt-opensource-linux-x64-5.12.5.run (5.12 is also an LTS release)

No, I compile Projecteur from source every time and always copy the rule file to /etc/udev/rule.d

If the "old" rules file works for you, you should use that file. The "new" rules files with uaccess works on all my machines. And seems to work for other users also.
Maybe Hyperbola Linux has also a strange udev version ?? 😉

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 12, 2019

@jahnf jahnf changed the title How to make projecteur work with a second screen in high resolution Qt 5.8 does not work & Device detection issue on Hyperbola Linux Nov 12, 2019
@jahnf jahnf changed the title Qt 5.8 does not work & Device detection issue on Hyperbola Linux Builds with Qt 5.8 do not work & Device detection issue on Hyperbola Linux Nov 12, 2019
@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

I have no idea as to whether this helps or not, but compiling the latest projecteur with Qt 5.8/Hyperbola return this message in the end:

/usr/lib/libQt5Network.so.5.8.0: warning : EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 14, 2019

Thank for the info, but that message seems to be coming directly from Qt itself and some dependencies it uses (EVP_CipherFinal is something from openssl). QNetwork module is not related to screen issue.
I decided to put a warning about NOT to use Qt 5.8 in the README.md and build instructions. I see no point in investigating further towards Qt 5.8, since all other Qt versions don't have this problem (5.7 up the current version work). And as I mentioned earlier, Qt 5.8 is a strange version to see in the field, since 5.9 is an LTS release and there is already another LTS release out there with 5.12.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 14, 2019

I mistakenly thought that this issue was still being looked into

I adjusted the title, so others know with one look what the actual outcome of this long issue is :)
I will close this issue as soon as I updated the README for the upcoming version 0.6.

Many thanks again!

You're very welcome.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

I just tried to build Projecteur with Qt 5.12.5 which I installed following your advice. But when I try to launch Projecteur from the command line, I get this error message. What did I miss?

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Quit

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 14, 2019

Can you try to start GUI tools that come with that Qt 5.12.5 (e.g. Qt/Tools/QtCreator/bin/qtcreator or Qt/5.12.5/gcc_64/bin/qdbusviewer) (from the command line); Do they show the same error?

If yes then I guess the pre-built-binaries from Qt are having some issues with the libraries on your system. (You could try Qt 5.7 or Qt 5.9 then) (https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found)

Edit: Out of interest: any specific reason to use Hyperbola Linux? If you prefer Arch Linux there is Manjaro-Linux and many others.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

Can you try to start GUI tools that come with that Qt 5.12.5 (e.g. Qt/Tools/QtCreator/bin/qtcreator or Qt/5.12.5/gcc_64/bin/qdbusviewer) (from the command line); Do they show the same error?

Yes, both showed the same error...

If yes then I guess the pre-built-binaries from Qt are having some issues with the libraries on your system. (You could try Qt 5.7 or Qt 5.9 then) (https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found)

Well, I tried 5.7 and 5.9 but no avail. I guess that's about it! I will ask the maintainers of Hyperbola if they can update Qt5 and wait for their answer for I think I can't do anything by myself at this point.

Edit: Out of interest: any specific reason to use Hyperbola Linux? If you prefer Arch Linux there is Manjaro-Linux and many others.

Actually there are two: free software and stability. Additionally, at least in my opinion, the developers made very good decisions, such as the adoption of openrc, libressl, etc. Anyway, I will find a way to follow Projecteur!

jahnf added a commit that referenced this issue Nov 14, 2019
@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 14, 2019

Well, I tried 5.7 and 5.9 but no avail. I guess that's about it! I will ask the maintainers of Hyperbola if they can update Qt5 and wait for their answer for I think I can't do anything by myself at this point.

no avail = didn't work either?

You can still build Qt yourself 😄 - but that can be quiet an adventure in itself.
Anyway please let me know when you had any success or progress.

Is it okay for you if I close this issue?

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

no avail = didn't work either?

Exactly, I get the same error over and over... As to building Qt, I will not venture into this!

Yes, helas for me, this issue can be closed :-( I will keep you posted, meanwhile, thanks a lot again!

@jahnf jahnf closed this Nov 14, 2019
@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 14, 2019

Now I am totally confused!

I just compiled the latest Projecteur (0.6-alpha.75 [7586960]) and it worked out of the box, that is not one time out of three, but every time.

One (unrelated I think) issue that remains is about the zoom: when dual-screen is enabled and the screens are set to display different areas, the magnifier superimposes the two different screens and makes them as one. Of course, this does not happen if the two screens are set to display one single identical area.

Well, the breaking news is that the latest Projecteur seems to work on Hyperbola + Qt 5.8! I will do some further testing tomorrow and try to confirm this.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 15, 2019

Again, with 0.6-alpha.78 [b6bbc32], I confirm that the issue reported here about Qt 5.8 is completely gone. Projecteur definitely works with Qt 5.8.

Don't you think it might be useful to do a bisect to try to identify a possible offending commit between the first version known not to work (bad) and [7586960] (good)?

I enjoy very much working with this version Projecteur!

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 15, 2019

Glad to hear it works and the project is used.
Most likely what made it work also with Qt 5.8 is this change: ece5781

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 15, 2019

Good to know it has been spotted! A missing command to make a window top level?

By the way, do you experience the same that I do with the magnifier when the two screens are set to display different areas?

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 16, 2019

By the way, do you experience the same that I do with the magnifier when the two screens are set to display different areas?

No on my multi-monitor setups and when I attach an additional monitor/tv/whatever to my notebook it works fine. What do you mean by "two screens to display different areas"? Just a regular two monitor setup?

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 16, 2019

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 16, 2019

What I am experiencing under such a configuration is that the magnifier, say on monitor 2, displays magnified two images superimposed: that of monitor 2 and that of monitor 1

I can't reproduce that, sounds very stange , any chance that you could make a screenshot of that?

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 17, 2019

Might it be another Qt 5.8 only related issue? ;-)

Here is a screenshot.

projecteur

@jahnf

This comment has been minimized.

Copy link
Owner

@jahnf jahnf commented Nov 20, 2019

@ralessi Please give it a try with branch feature/wayland-zoom-support, besides changes for Wayland there are also changes in there that might fix your zoom issue.

@ralessi

This comment has been minimized.

Copy link
Author

@ralessi ralessi commented Nov 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.