Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I retrieve monitor brand name programmatically?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Sep 22, 2012 9:41 pm    Post subject: How do I retrieve monitor brand name programmatically? Reply with quote

Hi.

Xfce's Display parameter manager shows monitor models instead of DVI-I-1 or VGA-0 etc. I just wondered how to do that in a script. Xrandr doesn't output model names but [predefined] output names, such as DVI-I-1 or VGA-0 etc.

Thanks in advance.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sat Sep 22, 2012 10:23 pm    Post subject: Reply with quote

It might show up in the /var/log/Xorg.0.log file. If not there, then not sure.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Sep 23, 2012 2:36 am    Post subject: Reply with quote

You could parse it out of /sys/class/drm/*/edid but the log file is probably easier.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sun Sep 23, 2012 5:53 pm    Post subject: Reply with quote

Ant P. wrote:
You could parse it out of /sys/class/drm/*/edid but the log file is probably easier.

I don't seem to have that node. However I tried to parse EDID using read-edid but there's no monitor name there:
get-edid | parse-edid:
parse-edid: parse-edid version 2.0.0
get-edid: get-edid version 2.0.0

   Performing real mode VBE call
   Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
   Function supported
   Call successful

   VBE version 300
   VBE string at 0x11100 "NVIDIA"

VBE/DDC service about to be called
   Report DDC capabilities

   Performing real mode VBE call
   Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0
   Function supported
   Call successful

   Monitor and video card combination does not support DDC1 transfers
   Monitor and video card combination supports DDC2 transfers
   0 seconds per 128 byte EDID block transfer
   Screen is not blanked during DDC transfer

Reading next EDID block

VBE/DDC service about to be called
   Read EDID

   Performing real mode VBE call
   Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
   Function supported
   Call successful

parse-edid: EDID checksum passed.
parse-edid: first bytes don't match EDID version 1 header
parse-edid: do not trust output (if any).

   # EDID version 219 revision 11
Section "Monitor"
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   Identifier "UUJ:5100"
   VendorName "UUJ"
   ModelName "UUJ:5100"
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # DPMS capabilities: Active off:no  Suspend:no  Standby:no

   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
   # Block type: 2:0 3:0
EndSection


Anon-E-moose wrote:
It might show up in the /var/log/Xorg.0.log file. If not there, then not sure.

Yup, it appears to be there. I'd prefer a more “reliable” source (IIRC nouveau doesn't log the output name right next to the detected monitor name). The log format is rather arbitrary in that there's no obvious syntax requirement on logging such an information. Sure the information is there but I'm pretty certain Xfce display control panel doesn't check the log. I guess my only bet is to check the source code.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum