-
Notifications
You must be signed in to change notification settings - Fork 131
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
GPU and Display Information #237
Conversation
puff! you are made a great job! |
b6a17cb
to
68e3966
Compare
I've squashed some fixes together and re-ordered with |
dd449c1
to
edcab86
Compare
includes/computer.h
Outdated
gint width, height; | ||
|
||
/* new stuff */ | ||
xrr_info *xrr; | ||
|
||
/* don't free */ | ||
gchar *vendor; /* points to xrr->xi->vendor */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If somethings isn't supposed to be freed, it's best to just mark them as const
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: making it const introduced a warning when sending it through info_*()
@@ -88,6 +88,8 @@ if(NOT HARDINFO_NOSYNC) | |||
pkg_check_modules(LIBSOUP libsoup-2.4>=2.24) | |||
endif() | |||
|
|||
pkg_check_modules(X11 REQUIRED x11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is requiring X11 the way to go? GTK3 can use Wayland, and it's not really a good idea to require X11 in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but older machines need X11 and does not work with Wailand, some distributions does will not include never Wayland and seems for now, if wayland will be used , x11 will be used as base, such as debian 9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to have a machine with no xserver, nor xrandr, nor xdpyinfo, that still has an X-client application running on it. I was running on a x-less debian machine with ssh -X ...
and it left the whole display information empty, even though X is clearly being used. The xlib dep is for a fallback of getting information directly from X. Otherwise, (for example, in Debian) we need to make sure that x11-xserver-utils is an install dependency of the hardinfo package, so that we know that xrandr and xdpyinfo will be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we are guaranteed to have Xlib available if we have GDK. Honestly, we might try and get all the X information directly via Xlib instead of relying on xrandr
and/or xdpyinfo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm so then now X11 its a new depend, so about the reading of scsi older kernels vs newer kernels.. ? may runnign good hardware only work with older kernel.. to the list of TODO (theres at leas one in the issues) we must added the new depens and runtime-depends and i'll prepare a README introduction update and compilation info how to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reply didn't get added to this thread, but instead the PR thread, so I'll duplicate it here.
X11 was always required via GDK, only now the Xlib headers are needed to build. This really doesn't change anything for the binary, it just lets the cmake magic work to find the right linking config.
hardinfo/gpu_util.c
Outdated
|
||
/* TODO: In the future, when there is more vendor specific information available in | ||
* the gpu struct, then more precise names can be given to each gpu */ | ||
void make_nice_name(gpud *s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there a list of names maybe.. but..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, static.
umm @bp0 this will sustitue the "Display" section? and will include all the OpenGL/CL/XL/"any-L" information ? |
@mckaygerhard, the Display section as it is now is only for information from X, and if using X over network, it is about actual server being used and not the machine's X server. There is currently no Wayland information available in Hardinfo. I don't have a setup that can use Wayland, as I have an nVidia card, so I can't really work on it. I do have an old Radeon card that I might try, but it may be too old. To test out detecting multiple cards, I have only one 16x PCIE slot, so I actually used an old PCI S3 Virge card from the 90s that I found in a box. Linux won't even drive it for console anymore, which is sad, but it let me see what two cards in the GPU list would look like. |
@lpereira, @mckaygerhard: do either of you have a PRIME setup laptop with intel and nvidia graphics? |
7d2a518
to
7f16c28
Compare
sorry @bp0, not, i have one intel Haswell-ULT with Radeon 8690M, also have some dual intel+radeon very olders firts made.. some time ago i have a intel+nvidia but i really hate introduce binary only software so i change it i have access to many hardware but not to a prime: intel+nvidia setup.. sorry, but i can test with my intel+readeon. maybe @nerv55 can help me with that if i ask to |
X11 was always required via gdk, only now the xlib headers are needed to
build. This really doesn't change anything for the binary, it just let's
the cmake magic work to find the right linking config.
…On Tue, Mar 20, 2018, 2:36 PM PICCORO Lenz McKAY ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In CMakeLists.txt
<#237 (comment)>:
> @@ -88,6 +88,8 @@ if(NOT HARDINFO_NOSYNC)
pkg_check_modules(LIBSOUP libsoup-2.4>=2.24)
endif()
+pkg_check_modules(X11 REQUIRED x11)
umm so then now X11 its a new depend, so about the reading of scsi older
kernels vs newer kernels.. ? may runnign good hardware only work with older
kernel.. to the list of TODO (theres at leas one in the issues) we must
added the new depens and runtime-depends and i'll prepare a README
introduction update and compilation info how to
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#237 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABrTijmaFq79pHmd7YsdoZsNwLclyBfoks5tgVo-gaJpZM4SvBod>
.
|
@mckaygerhard, well I'd certainly appreciate information from any multi-gpu systems. |
I've rebased again to simplify the PR. |
i'll send you in a couple of hours, let me be free os some task and i feedback here |
8c90f0f
to
1bf4a13
Compare
Based on usb_util. Only current method is via lspci, but framework exists to add other methods. Signed-off-by: Burt P <pburt0@gmail.com>
Get X display info from Xlib, xrandr, xdpyinfo, and glxinfo. Also, Some simple Wayland info lives here for now. Signed-off-by: Burt P <pburt0@gmail.com>
Enumerates GPUs into a list. Currently from PCI and device tree. Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Burt P <pburt0@gmail.com>
This commit fixes: * lpereira#200 now using xrandr to get screen info instead of gdk, so it works from the cli * lpereira#27 opengl core and compatibility versions are both listed * lpereira#230 (by removing extension list) Signed-off-by: Burt P <pburt0@gmail.com>
Any problems, questions, or comments? Though there is more work to do for #225, this could be merged as it is now. |
sorry for late i have a bouild with this pull enable.. i post feedback in later |
Working on #225, I've started to enumerate GPU devices. Along the way I wrote new PCI utility functions, and changed Devices/PCI to use them. Added X utility functions and changed Computer/Display to use them.
This series also fixes the issue described at #162 for devices/pci.