[Wiki] Adding tvservice to Video Issues
-
Hi folks,
I would like to add some common uses of tvservice to the Video Issues page. This thread is for their discussion and (hopefully) approval.
------------------------ snip ------------------------
Show and set the current video mode
Note: This guide is only for operating systems that use
tvservice
to change the video mode, e.g. Raspbian, Xbian, and OSMC.tvservice -s
will show the current video mode. Example:tvservice -s state 0x12000a [HDMI DMT (51) RGB full 4:3], 1600x1200 @ 60.00Hz, progressive
The option
-m
will show the CEA (HDMI) and DMT (DVI) modes that are supported by the display device:tvservice -m CEA tvservice -m DMT
The preferred mode that is listed as
(prefer)
can be set by the-p
option:tvservice -p
Any other mode has to be specified by its Group (CEA or DMT) and the mode number that was listed by the
-m
option. Example for the mode 1600x1200 @ 60.00Hz in the example above:tvservice -e "DMT 51" Powering on HDMI with explicit settings (DMT mode 51)
Reset the frame buffer after changing the video mode
After changing the video mode via
tvservice
, it may neccessary to reset the frame buffer. This can be achieved by changing its colour depth to 8 and then back to 16:fbset -depth 8 && fbset -depth 16
Switch the display off and on again
The
-o
(off) option oftvservice
disables the video output. It can be switched on again by either the-p
(preferred) option or the-e
(explicit) option, see above. Example:tvservice -o Powering off HDMI tvservice -p Powering on HDMI with preferred settings
------------------------ snip ------------------------
So much for now.
Many guides on the web also use the
fbset
command twice with differentdepth
values afterwards, but I don't know anything about it. (When) Is that neccessary, and why twice?A stylistic question: Should I put a prompt indicator
$
before the commands (only) in the examples to separate them visually from their output?Any feedback and suggestions are welcome. :)
Cheers
Clydeedit: Aaand found the first typo myself ("exampla"). :)
-
@Clyde regarding fbset, switching to 8 then 16/32 bit has the side effect of resetting the framebuffer. Can be needed after switching videomode for example.
-
@BuZz Aahh, that makes sense! It seemed so very strange to repeat the same command just with a different value, and no guide that I found on the web explained it. Thanks! :)
-
@Clyde IMHO you should leave out the
$
prompt, it usually hampers copying and pasting - users will copy the command with the prompt and they'll get an error.
As a suggestion, specify thattvservice
is Raspbian only - it's not present for other SBCs or on PC (wherexrandr
can be used to change the resolution). -
Beware that other OSes for the RPI also come with
tvservice
. As far as I know two of these are Xbian and OSMC. -
@mitu Thanks for the suggestion, I will add a note about it. edit: And I will omit the
$
.@hhromic Also thanks for the information, I will use a more general wording.
Update: I added a section about
fbset
and a remark abouttvservice
being only available on certain OS.A question about
fbset
: Is my wording okay that resetting the fb "may be neccessary", or is it neccessary every time? -
Hi again. I was occupied with a heavy cold, but I'm better know and I want to finish this little project.
If nobody has further contributions until this time tomorrow, I'll put it up in the Wiki.
Thanks for any of your assistance. 😊
-
Done!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.